Trailing-Edge
-
PDP-10 Archives
-
BB-4157E-BM
-
fortran-compiler/inpt.bli
There are 12 other files named inpt.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,1981 BY DIGITAL EQUIPMENT CORPORATION
!AUTHOR: S.MURPHY/HPW
MODULE INPT(RESERVE(0,1,2,3),DREGS=4,SREG=#17,FREG=#16,VREG=#15,GLOROUTINES)=
BEGIN
GLOBAL BIND INPTV = 6^24 + 0^18 + 83; ! Version Date: 26-Dec-73
%(
***** Begin Revision History *****
83 ----- ----- INTERFACE TO SKOPTIO
***** End Revision History *****
)%
SWITCHES NOLIST;
REQUIRE FIRST.BLI;
REQUIRE TABLES.BLI;
SWITCHES LIST;
EXTERNAL
CSTMNT,FOLDIOLST,NEGFLG,NOTFLG,P2SKL1DISP,P2SKSTMNT;
MAP BASE CSTMNT;
GLOBAL ROUTINE SKIOLIST=
%(***************************************************************************
ROUTINE TO PERFORM PHASE 2 SKEL OPTIMIZATIONS ON AN IOLIST.
WILL MAKE 3 PASSES OVER THE LIST:
1.PERFORM PHASE 2 SKEL OPTIMS ON THE EXPRESSIONS UNDER THE LIST ELEMS
2.DETECT DO-LOOPS THAT CAN BE FOLDED INTO ELISTS AND FOLD
THEM (NOT IMPLEMENTED IN RELEASE 1)
3. DETECT GROUPS OF DATACALLS AND SLISTCALLS THAT CAN BE FOLDED
INTO A SINGLE IOLISTCALL AND FOLD THEM
CALLED WITH THE GLOBAL CSTMNT POINTING TO A STATEMENT WITH A POTENTIAL IOLIST
***************************************************************************)%
BEGIN
LOCAL BASE IOLELEM;
LOCAL PEXPRNODE ARGNODE;
LOCAL BASE SAVSTMNT;
EXTERNAL DOWDP; !GLOBAL USED IN DETERMINING WHETHER A GIVEN LOOP CAN
! HAVE ITS LOOP INDEX LIVE IN A REGISTER
MAP OBJECTCODE DOWDP;
%(***IF THIS STMNT HAS NO IOLIST, RETURN***)%
IF .CSTMNT[IOLIST] EQL 0 THEN RETURN;
%(***SAVE PTR TO THIS STATEMENT (WILL RECURSE THRU STMNT ROUTINES IF THERE ARE
ANY STMNTS ON THIS IOLIST*******)%
SAVSTMNT_.CSTMNT;
%(***WALK THRU THE IOLIST PERFORMING PHASE 2 SKEL OPTIMS ON EACH ELEM***)%
IOLELEM_.CSTMNT[IOLIST];
UNTIL .IOLELEM EQL 0
DO
BEGIN
IF .IOLELEM[OPRCLS] EQL STATEMENT
THEN
BEGIN
CSTMNT_.IOLELEM;
P2SKSTMNT();
END
ELSE
IF .IOLELEM[OPRCLS] EQL IOLSCLS
THEN
BEGIN
%(***FOR A DATACALL NODE, PERFORM PHASE 2 SKEL OPTIMS ON
EXPRESSIONS UNDER THIS NODE***)%
IF .IOLELEM[OPERSP] EQL DATACALL
THEN
BEGIN
NEGFLG_FALSE;
NOTFLG_FALSE;
ARGNODE_.IOLELEM[DCALLELEM];
IOLELEM[DCALLELEM]_(.P2SKL1DISP[.ARGNODE[OPRCLS]])(.ARGNODE);
%(***CHECK WHETHER THE ARG TO FOROTS IS THE INDEX OF
THE CURRENT DO LOOP. IF SO, WILL NOT WANT IT
TO BE AN AOBJN LOOP (PROBLEMS WITH USING RIGHT-HALF OF REG)**)%
ARGNODE_.IOLELEM[DCALLELEM];
IF .ARGNODE EQL .DOWDP[DOINDUC] THEN DOWDP[DONOAOBJN]_1;
END;
END;
%(***GO ON TO NEXT ELEMENT***)%
IOLELEM_.IOLELEM[CLINK];
END;
%(****RESTORE CSTMNT*********)%
CSTMNT_.SAVSTMNT;
%(***WALK THRU THE LIST PERFORMING FOLDING OF DO-LLOPS.
NOT IMPLEMENTED IN RELEASE 1 (AUG 17,1972 - SRM) ***)%
%(***WALK THRU THE LIST, FOLDING GROUPS OF ELEMS THAT CAN FORM A SINGLE IOLIST***)%
FOLDIOLST();
END;
END
ELUDOM