X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCBBlock.h;h=1f853df87d61af37a5e8aaa9092e3453b6b67e94;hb=80972b2e54c9b88f11c27b878874fd2a6a681391;hp=d1dc54c8e5daf446aef7083773cfc540891f6a1d;hpb=29779804200986ce903b5086441b49265a122dc5;p=fw%2Fsdcc diff --git a/src/SDCCBBlock.h b/src/SDCCBBlock.h index d1dc54c8..1f853df8 100644 --- a/src/SDCCBBlock.h +++ b/src/SDCCBBlock.h @@ -38,6 +38,7 @@ typedef struct eBBlock unsigned int hasFcall:1; /* has a function call */ unsigned int noPath:1; /* there is no path from _entry to this block */ unsigned int isLastInLoop:1; /* is the last block in a loop */ + struct eBBlock *isConditionalExitFrom; /* this block ends with a return or goto from a conditional block*/ symbol *entryLabel; /* entry label */ iCode *sch; /* pointer to start of code chain */ @@ -48,13 +49,14 @@ typedef struct eBBlock /* control flow analysis */ set *succList; /* list eBBlocks which are successors */ - bitVect *succVect; /* bitVector of successors */ + bitVect *succVect; /* bitVector of successors (index is bbnum) */ set *predList; /* predecessors of this basic block */ - bitVect *domVect; /* list of nodes this is dominated by */ + bitVect *domVect; /* list of nodes this is dominated by (index is bbnum) */ /* data flow analysis */ set *inExprs; /* in coming common expressions */ set *outExprs; /* out going common expressions */ + set *killedExprs; /* killed common expressions */ bitVect *inDefs; /* in coming defintions */ bitVect *outDefs; /* out going defintions */ bitVect *defSet; /* symbols defined in block */ @@ -69,6 +71,14 @@ typedef struct eBBlock } eBBlock; +typedef struct ebbIndex + { + int count; /* number of blocks in the index */ + eBBlock **bbOrder; /* blocks in bbnum order */ + eBBlock **dfOrder; /* blocks in dfnum (depth first) order */ + } +ebbIndex; + typedef struct edge { @@ -77,6 +87,7 @@ typedef struct edge } edge; + extern int eBBNum; extern set *graphEdges; @@ -84,26 +95,18 @@ extern set *graphEdges; DEFSETFUNC (printEntryLabel); eBBlock *neweBBlock (); edge *newEdge (eBBlock *, eBBlock *); -eBBlock *eBBWithEntryLabel (eBBlock **, symbol *, int); +eBBlock *eBBWithEntryLabel (ebbIndex *, symbol *); DEFSETFUNC (ifFromIs); set *edgesTo (eBBlock *); void remiCodeFromeBBlock (eBBlock *, iCode *); void addiCodeToeBBlock (eBBlock *, iCode *, iCode *); -eBBlock **iCodeBreakDown (iCode *, int *); +ebbIndex *iCodeBreakDown (iCode *); void replaceSymBySym (set *, operand *, operand *); iCode *iCodeFromeBBlock (eBBlock **, int); int otherPathsPresent (eBBlock **, eBBlock *); void replaceLabel (eBBlock *, symbol *, symbol *); -void dumpEbbsToFileExt (char *, eBBlock **, int); - -#if defined(_MSC_VER) - -/*-----------------------------------------------------------------*/ -/* dumpLiveRanges - dump liverange information into a file */ -/*-----------------------------------------------------------------*/ - -void dumpLiveRanges (char *ext, hTab * liveRanges); - -#endif // _MSC_VER +void dumpEbbsToFileExt (int, ebbIndex *); +void dumpLiveRanges (int, hTab * liveRanges); +void closeDumpFiles(); #endif