Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.14
 
1.15
 
MAIN:pj:20050223153725
 
optim2.c
_>6565 ancestorwithlowestsemi(struct basicblock *bblock, struct bblockinfo *bbinfo);
 6666 void link(struct basicblock *parent, struct basicblock *child);
 6767 void computeDF(struct basicblock *bblock, struct bblockinfo *bbinfo);
<> 68+void remunreach(void);
6869 
 6970 
 7071 static struct basicblock bblocks;
     
 !
286287                         cfg_build(&labinfo);
 287288                         dominators(&bbinfo);
 288289                         computeDF(DLIST_NEXT(&bblocks, bbelem), &bbinfo);
<> 290+                        remunreach();
289291 #if 0
 290292                         if (xssaflag) {
 291293                                 dfg = dfg_build(cfg);
     
 !
751753                 }
 752754         }
 753755 }
<_ 756+
  757+/*
  758+ * Remove unreachable nodes in the CFG.
  759+ */
  760+
  761+void
  762+remunreach(void)
  763+{
  764+        struct basicblock *bb, *nbb;
  765+        struct interpass *next, *ctree;
  766+
  767+        bb = DLIST_NEXT(&bblocks, bbelem);
  768+        while (bb != &bblocks) {
  769+                nbb = DLIST_NEXT(bb, bbelem);
  770+
  771+                /* Code with dfnum 0 is unreachable */
  772+                if (bb->dfnum != 0) {
  773+                        bb = nbb;
  774+                        continue;
  775+                }
  776+
  777+                /* Need the epilogue node for other parts of the
  778+                   compiler, set its label to 0 and backend will
  779+                   handle it. */
  780+                if (bb->first->type == IP_EPILOG) {
  781+                        bb->first->ip_lbl = 0;
  782+                        bb = nbb;
  783+                        continue;
  784+                }
  785+
  786+                next = bb->first;
  787+                do {
  788+                        ctree = next;
  789+                        next = DLIST_NEXT(ctree, qelem);
  790+                        
  791+                        if (ctree->type == IP_NODE)
  792+                                tfree(ctree->_un._p);
  793+                        DLIST_REMOVE(ctree, qelem);
  794+                } while (ctree != bb->last);
  795+                        
  796+                DLIST_REMOVE(bb, bbelem);
  797+                bb = nbb;
  798+        }
  799+}
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 16:52 +0100