Trailing-Edge
-
PDP-10 Archives
-
AP-D480B-SB_1978
-
ph2s.bli
There are 12 other files named ph2s.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) 1972,1977 BY DIGITAL EQUIPMENT CORPORATION
!AUTHOR: S MURPHY
MODULE PH2S(SREG=#17,VREG=#15,FREG=#16,DREGS=4,RESERVE(0,1,2,3),START,GLOROUTINES) =
BEGIN
SWITCHES NOLIST;
REQUIRE FIRST.BLI;
REQUIRE TABLES.BLI;
SWITCHES LIST;
EXTERNAL P2SKL1DISP;
GLOBAL BIND PH2SV = 2^24 + 2^18 + 30; !VERSION DATE: 14-MAR-1974
%(REVISION HISTORY
30 ----- ----- DELETE REFERENCE TO NOFRTEMP
)%
GLOBAL ROUTINE MRP2S=
BEGIN
%(****THIS MODULE MAKES A PASS OVER THE SOURCE PROGRAM, PERFORMING PHASE 2 SKEL
AND COMMON SUBEXPR ELIMINATION FOR ALL STATEMENTS***)%
EXTERNAL SEGINCORE,PHAZCONTROL;
EXTERNAL P2SKSTMNT,CSTMNT;
EXTERNAL LOCELIM;
EXTERNAL MEMCMCHK;
EXTERNAL BACKST,CORMAN,LENTRY,DOWDP,CDONODE;
EXTERNAL MAKASSOC; !ROUTINE TO SET UP LIST OF ALL ASSOCIATE VARS
! IN THE PROGRAM
MAP BASE CSTMNT;
EXTERNAL INNERLOOP; !GLOBAL FLAG THAT IS SET WHILE PROCESSING
! STMNTS IN AN INNER LOOP
%(***INIT GLOBALS USED BY COMMON SUBEXPR ELIM***)%
NAME<LEFT>_SRCSIZ+ASGNSIZ;
BACKST_CORMAN();
LENTRY_0;
%(***INIT GLOBAL USED BY THE ROUTINE THAT SUBSTITUTES REGCONTENTS NODES FOR DO
CONTROL VARIABLE*****)%
DOWDP_0;
INNERLOOP_FALSE; !INIT FLAG FOR "ARE CURRENTLY PROCESSING STMNTS
! IN AN INNER LOOP"
NAME<LEFT>_SRCSIZ+DOSIZ; !MAKE A DUMMY DO STMNT WHICH HAS
! ALL WDS ZERO
CDONODE_CORMAN(); !INIT PTR TO "CURRENT INNER DO" TO PT
! TO THIS DUMMY
MAKASSOC(); !MAKE A LINKED LIST OF ALL ASSOCIATE VARS IN THE PROGRAM
! (THIS LIST IS NEEDED BY THE BB REG ALLOCATOR)
CSTMNT_.SORCPTR<LEFT>; !GET PTR TO 1ST STMNT OF PROGRAM
%(***SKIP 1ST STMNT WHICH IS ALWAYS A DUMMY CONTINUE***)%
IF .CSTMNT NEQ 0
THEN
CSTMNT_.CSTMNT[SRCLINK];
WHILE .CSTMNT NEQ 0
DO
BEGIN
ISN_.CSTMNT[SRCISN];
P2SKSTMNT();
LOCELIM(.CSTMNT); !PERFORM LOCAL COMMON SUBEXPR ELIM
MEMCMCHK(); !DETECT OPS THAT CAN BE PERFORMED TO MEMORY
CSTMNT_.CSTMNT[SRCLINK];
END;
END; !END OF MRP2S
MACHOP POPJ=#263;
MRP2S();
POPJ(#17,0)