Applied patch #2762516
[fw/sdcc] / src / SDCCBBlock.h
index 8f0429c7666a3888ea91ff2cbe67eb4aa7f41a30..1f853df87d61af37a5e8aaa9092e3453b6b67e94 100644 (file)
@@ -49,9 +49,9 @@ 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    */
@@ -71,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
   {
 
@@ -79,6 +87,7 @@ typedef struct edge
   }
 edge;
 
+
 extern int eBBNum;
 extern set *graphEdges;
 
@@ -86,17 +95,17 @@ 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 (int, eBBlock **, int);
+void dumpEbbsToFileExt (int, ebbIndex *);
 void dumpLiveRanges (int, hTab * liveRanges);
 void closeDumpFiles();