!* !*********************************************************************** !* Optimiser record formats * !*********************************************************************** !* %RECORDFORMAT BLRECF(%BYTEINTEGER FLAGS,DEPTH,%SHORTINTEGER CHAIN, %INTEGER FCON, %INTEGER BCON,BDOM,BTARG,TEXT, %INTEGER CORRUPT,BUB1, %INTEGER USE,DEF,BOE) !* %RECORDFORMAT CONRECF((%INTEGER COUNT %OR %INTEGERARRAY BLOCK(0:1000))) !* %RECORDFORMAT LOOPRECF(%INTEGER BLOCK,DOWN,ACROSS,ST) !* %RECORDFORMAT CLOOPRECF(%INTEGER BLOCK,PDCHAIN,PDBACKCHAIN) !* %RECORDFORMAT PROPRECF(%SHORTINTEGER DEFCT,TEXT,DEFN, %BYTEINTEGER FLAGS,COORD2, %RECORD(RESF) REPL) !* %RECORDFORMAT SREDF(%SHORTINTEGER MODE,IDENT,LOOP,DUMP,INIT, %BYTEINTEGER FLAGS,SPARE1, %SHORTINTEGER USECT,SPARE2, %INTEGER WEIGHT, %INTEGER CHAIN, (%SHORTINTEGERARRAY INCR(1:3),TEST(1:3),USE(1:1000) %C %OR %SHORTINTEGERARRAY ALLREFS(1:1006))) !* !*********************************************************************** !* Constant definitions * !*********************************************************************** !* %CONSTINTEGER USE = 0 ;! variable usage %CONSTINTEGER DEF = 1 ;! !* %CONSTINTEGER TDUMP = 1 ;! dump triads before optimiastion %CONSTINTEGER BDUMP = 2 ;! dump block tables %CONSTINTEGER LDUMP = 4 ;! dump loop tables %CONSTINTEGER T1DUMP = 8 ;! dump triads after OP1 %CONSTINTEGER T2DUMP = 16 ;! dump triads after OP2 %CONSTINTEGER T3DUMP = X'200' ;! dump triads after OP3 %CONSTINTEGER SDUMP = 32 ;! give reconstructed source %CONSTINTEGER S1DUMP = X'800' ;! reconstructed source after OP1 %CONSTINTEGER S2DUMP = X'1000' ;! reconstructed source after OP2 %CONSTINTEGER EDUMP = 64 ;! dump elimination info %CONSTINTEGER CDUMP = X'80' ;! constant elimination %CONSTINTEGER PDUMP = X'100';! proptabs %CONSTINTEGER SEOBDUMP = X'400' ;! dump triads for block after SUBSEOB %CONSTINTEGER SSDUMP = X'2000' ;! trace path through SUBSUM !* %CONSTINTEGER INHIBSUBSUM = 1 %CONSTINTEGER INHIBOP2A = 2 %CONSTINTEGER INHIBEXPOPTS = 4 %CONSTINTEGER INHIBBMOVE = 8 %CONSTINTEGER INHIBEXPELIM = 16 %CONSTINTEGER INHIBSTR = 32 !* %CONSTINTEGER FUNCBIT = X'80' ;! block contains a function call %CONSTINTEGER RETBIT = X'20' ;! block is a procedure return block %CONSTINTEGER LEBIT = X'10' ;! block is a loop entry block %CONSTINTEGER ARTICBIT = X'08' ;! block is an articulation block !* %CONSTINTEGER EBBIT = X'08' ;! entry block marker in label table !* %CONSTINTEGER SOB = X'80' ;! start of block marker in STMT triad %CONSTINTEGER BMBIT = x'80' ;! in TR_OP indicates it has been backward moved %CONSTINTEGER BMBIT OFF = x'7F' ;! mask for deleting BMBIT %CONSTINTEGER BMBIT SHIFT = 7 !* %CONSTINTEGER TESTREPBIT = 2 %CONSTINTEGER REVTESTBIT = 1 %CONSTINTEGER BREGBIT = 4 %CONSTINTEGER SCANDBIT = 8 !* %CONSTINTEGER SRTEMPBIT = 1 %CONSTINTEGER ACTARGBIT = 2 %CONSTINTEGER INITLOADBIT = 4 !* %CONSTINTEGER FROM = 0 ;! param to BUSYONX %CONSTINTEGER TO = 1 ;! ditto %CONSTINTEGER BUSY = 1 %CONSTINTEGER NOT BUSY = 0 !* %CONSTBYTEINTEGERARRAY DEFTEST(0:116)= %C 0(7),1,0(4),1,0(38),5,0,1,0(11),3,4,0(3),6,0,2,0(44);! ASMT,ASGN,FUN,CALL,DARG !* !* %RECORDFORMAT OPTDFMT( %C %INTEGER ADICT ,{ @ of dictionary area} %INTEGER MAXDICT ,{ currect available length of dictionary} %INTEGER ANAMES ,{ @ of name table} %INTEGER ABLOCKS ,{ @ of block table} %INTEGER MAXBLOCKS ,{ current available length of block table area} %INTEGER NEXTBLOCK ,{ next available block index} %INTEGER FREEBLOCKS, %INTEGER CBNPTR ,{ listhead of common block records} %INTEGER SCPTR ,{ listhead of local identifiers} %INTEGER ATABS ,{ @ of area for assorted optimiser tables} %INTEGER MAXTABS ,{ curent available length of opt table area} %INTEGER FREETABS ,{ next free location in opt table area} %INTEGER EXBPTR ,{ exit block table} %INTEGER ENTBPTR ,{ entry block table} %INTEGER ALOOPS ,{ @ loop table area} %INTEGER MAXLOOPS ,{ current available length of loop table area} %INTEGER FREELOOPS ,{ next free location in loop table area} %INTEGER ATRIADS ,{ @ of triad area} %INTEGER LASTTRIAD ,{ last allocated triad index} %INTEGER MAXTRIADS ,{ current available number of triads} %INTEGER FREETRIADS,{ listhead of released triads} %INTEGER BLSIZE ,{ length (in architecture units) of a block entry} %INTEGER BSBITS ,{ length (in bits) of bit string} %INTEGER BSSIZE ,{ length (in architecture units) of a bit strip} %INTEGER BSWORDS ,{ length in 2900 words of a bit strip} %INTEGER OPT ,{ optimisation level 0, 1 or 2} %INTEGER OPTFLAGS ,{ tracing level 1 Triads 2 Blocks 4 Loops } %INTEGER INHIBMASK ,{ inhibits specific optimisations} %INTEGER SRFLAGS ,{ strength reduction diagnostic flags} %INTEGER SRHEAD, %INTEGER SRCH, %INTEGER APROPTABS ,{ @ bsbits * prop table entries} %INTEGER CLOOPHEAD ,{ head of list of all blocks in current loop } %INTEGER PLOOPHEAD ,{ subset of CLOOPHEAD list already processed} %INTEGER DLOOPHEAD ,{ CLOOPHEAD list - PLOOPHEAD list} %INTEGER CLOOPTAIL, %INTEGER PLOOPTAIL, %INTEGER DLOOPTAIL, %INTEGER DLOOPPTR ,{ current DLOOP record} %INTEGER LOOP ,{ current pointer to looptab} %INTEGER BACKTARG ,{ blocktab index of back target block} %INTEGER BTARGTRIAD,{ index of triad within back target block to which new triads chained} %INTEGER OLDBTARGTRIAD, %INTEGER LOOPDEPTH ,{ depth of current loop} %INTEGER LOOPENT ,{ blocktab index of loop entry block} %INTEGER CURRBLK ,{ blocktab index of current block} %INTEGER CURRTRIAD ,{ triad index of triad currently being processed} %INTEGER PREVTRIAD ,{ previous triad (for rechaining)} %INTEGER ACMNCOORDS,{ @ CMNCOORDS} %INTEGER ACURRDEF ,{ @ CURRDEF} %INTEGER ASTFNDEF, %INTEGER ARGRISK, %INTEGER VALTEMPHEAD, %INTEGER DESTEMPHEAD, %INTEGER DTINDEX, %INTEGER TEINDEX, %INTEGER TECH, %INTEGER DTCH) !*