Trailing-Edge
-
PDP-10 Archives
-
BB-4157F-BM_1983
-
fortran/compiler/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) DIGITAL EQUIPMENT CORPORATION 1972, 1983
!AUTHOR: S MURPHY/EGM/TFV
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;
GLOBAL BIND PH2SV = 7^24 + 0^18 + #1633; ! Version Date: 1-Sep-82
%(
***** Begin Revision History *****
30 ----- ----- DELETE REFERENCE TO NOFRTEMP
***** Begin Version 6 *****
31 1047 EGM 22-Jan-81 Q10-05325
Add support for TOPS-10 execute only.
***** Begin Version 7 *****
32 1500 SRM 11-Feb-82
Give CHO message if have bypassed the optimizer because of
character data in program.
1633 TFV 1-Sep-82
Count number of executable statements.
***** End Revision History *****
)%
%1633% EXTERNAL STCNT; ! Number of executable statements
EXTERNAL P2SKL1DISP;
%1500% EXTERNAL FATLERR,E181;
%1500% EXTERNAL TURNOFFOPT; !Flag for /OPT turned off for this subroutine
! because it had character data
%[1047]% PORTAL 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
%1500% ! If we have bypassed the optimizer because of character data
%1500% ! in the program, give a warning message
%1500% IF .TURNOFFOPT
%1500% THEN
%1500% FATLERR(-1,E181<0,0>);
%(***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
%1633% STCNT = .STCNT + 1; ! Count executable statements
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)