Google
 

Trailing-Edge - PDP-10 Archives - FORTRAN-10_V7wLink_Feb83 - gopt2.bli
There are 12 other files named gopt2.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

!COPYRIGHT (C) DIGITAL EQUIPMENT CORPORATION 1973, 1983
!AUTHOR: NORMA ABEL

MODULE GOP2(RESERVE(0,1,2,3),SREG=#17,VREG=#15,FREG=#16,DREGS=4)=
BEGIN


!MODULE CONTAINS UTILITY ROUTINES USED BY FORTD AND FORTE ONLY.

GLOBAL BIND GOPT2V = 6^24 + 0^18 + 75;	! Version Date: 13-Jan-74

%(

***** Begin Revision History *****

***** End Revision History *****

)%

SWITCHES NOLIST;
REQUIRE FIRST.BLI;
REQUIRE TABLES.BLI;
SWITCHES LIST;







GLOBAL ROUTINE CLEANUP=
BEGIN
	!GO THROUGH THE SYMBOL TABLES AND ZERO THE FIELDS THAT
	!A USED BY THE OPTIMIZER AND THE GLOBAL REGISTER ALLOCATOR.

	!CALLED FROM THE DEFINITION POINT ALGORITHM AND GLOBAL ALLOCATOR



	MACRO IDDOTF=0,3,24,12$;
	MACRO REGSTUFF=0,2,LEFT$;

	INCR I FROM 0 TO SSIZ-1 DO
	BEGIN
		REGISTER BASE T;

		T_.SYMTBL[.I];
		WHILE .T NEQ 0 DO
		BEGIN
			!KLUDGE BECAUSE OF THE %&$#() STATEMENT FUNCTION
			!"OPTIMIZATIONS"

			IF .T[IDDOTF] NEQ SIXBIT".F" THEN
			BEGIN
			T[REGSTUFF]_0;
			!IF THIS IS A FORMAL ARRAY THE PSEUDO
			!ENTRY MUST ALSO BE ZEROED IF NOT ADJUSTABLY
			!DIMENSIONED

			IF .T[OPERSP] EQL FORMLARRAY THEN
			BEGIN
				REGISTER BASE ET;
				ET_.T[IDDIM];
				IF NOT .ET[ADJDIMFLG] THEN
				BEGIN
					ET_.ET[ARADDRVAR];
					!THIS PSEUDO ENTRY IS POINTED TO BY THE
					!ARADDRVAR FIELD OF THE DIMENNSION TABLE ENTRY
					ET[REGSTUFF]_0;
				END;
			END;		!SPECIAL STUFF FOR FORMAL ARAYS
			END;		!SFN KLUDGE
			T_.T[CLINK];
		END;		!WHILE ON T
	END;		!INCR LOOP
END;		!CLEANUP
GLOBAL ROUTINE MAKCONTINUE=
BEGIN
	!MAKE AND RETURN A CONTINUE STATEMENT NODE
	EXTERNAL QQ;
	MAP BASE QQ;
	EXTERNAL NAME,CORMAN;

	NAME<LEFT>_SRCSIZ+CONTSIZ;
	QQ_CORMAN();

	!FILL IS SRCID
	QQ[OPRCLS]_STATEMENT;
	QQ[SRCID]_CONTID;

	.QQ
END;
GLOBAL ROUTINE MAKASGN(LHEXPR,RHEXPR)=
BEGIN
	!MAKE AN ASSIGNMENT STATEMENT NODE OF THE FORM
	!LHEXPR=RHEXPR

	EXTERNAL CORMAN;
	MAP BASE LHEXPR:RHEXPR;
	EXTERNAL BASE QQ;
	!ALSO SET THE VAL FLAGS

	NAME<LEFT>_SRCSIZ+ASGNSIZ;
	QQ_CORMAN();

	QQ[OPRCLS]_STATEMENT;
	QQ[SRCID]_ASGNID;
	QQ[LHEXP]_.LHEXPR;
	QQ[RHEXP]_.RHEXPR;

	IF .LHEXPR[OPRCLS] EQL DATAOPR THEN
		QQ[A1VALFLG]_1;

	IF .RHEXPR[OPRCLS] EQL DATAOPR OR
	 .RHEXPR[OPRCLS] EQL CMNSUB
	OR .RHEXPR[OPRCLS] EQL REGCONTENTS THEN
		QQ[A2VALFLG]_1;
	.QQ
END;

END
ELUDOM