Trailing-Edge
-
PDP-10 Archives
-
bb-4157j-bm_fortran20_v11_16mt9
-
fortran-compiler/ph2s.bli
There are 12 other files named ph2s.bli in the archive. Click here to see a list.
!COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1972, 1987
!ALL RIGHTS RESERVED.
!
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
!ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
!INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
!COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
!OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY
!TRANSFERRED.
!
!THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
!AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
!CORPORATION.
!
!DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
!SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!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 = #11^24 + 0^18 + #2500; ! Version Date: 16-Nov-84
%(
***** 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.
***** Begin Version 10 *****
2474 TFV 21-Sep-84
Fix continuation processing to handle unlimited numbers of blank
and comment lines between continuation lines. The lines are
recorded in a linked list of four word entries, defined in
LEXAID.BLI. If there are too many blank and comment lines, the
buffer will get an overflow. When this happens, the buffer is
compacted using the information in the linked list. The info is
also used to speed up continuation processing in the lexeme
scan.
2500 AlB 14-Nov-84
Change the list of entries for source lines from a linked list
in dynamic memory to a fixed-length list in static memory.
This edit blew away all that was done in edit 2474, leaving not so
much as a mumble.
***** End V10 Development *****
***** 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)