Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.8
 
1.9
 
MAIN:pj:20050206114953
 
optim2.c
_>6060 
 6161 int bblocks_build(struct labelinfo *labinfo, struct bblockinfo *bbinfo);
 6262 void cfg_build(struct labelinfo *labinfo);
 6363 void cfg_dfs(struct basicblock *bb, unsigned int parent,
 6464              struct bblockinfo *bbinfo);
 6565 void dominators(struct bblockinfo *bbinfo);
<> 66+struct basicblock *
  67+ancestorwithlowestsemi(struct basicblock *bblock, struct bblockinfo *bbinfo);
  68+void link(struct basicblock *parent, struct basicblock *child);
  69+void computeDF(struct basicblock *bblock, struct bblockinfo *bbinfo);
6670 
 6771 
 6872 static CIRCLEQ_HEAD(, basicblock) bblocks = CIRCLEQ_HEAD_INITIALIZER(bblocks);
 6973 
 7074 static void
 7175 addcand(TWORD type, int off, int avoid)
     
 !
277281         //              deljumps();     /* Delete redundant jumps and dead code */
 278282         if (xssaflag) {
 279283                 CIRCLEQ_INIT(&bblocks);
 280284                 if (bblocks_build(&labinfo, &bbinfo)) {
 281285                         cfg_build(&labinfo);
 282286                         dominators(&bbinfo);
<> 287+                        computeDF(CIRCLEQ_FIRST(&bblocks), &bbinfo);
283288 #if 0
 284289                         if (xssaflag) {
 285290                                 dfg = dfg_build(cfg);
 286291                                 ssa = ssa_build(cfg, dfg);
 287292                         }
 288293 #endif
     
 !
610615         bbinfo->arr[bb->dfnum] = bb;
 611616         SIMPLEQ_FOREACH(cnode, &bb->children, cfgelem) {
 612617                 cfg_dfs(cnode->bblock, bb->dfnum, bbinfo);
 613618         }
 614619 }
 615620 
<>616 -struct basicblock *
 617 -ancestorwithlowestsemi(struct basicblock *bblock, struct bblockinfo *bbinfo);
 618 -void link(struct basicblock *parent, struct basicblock *child);
 619 -void
 620 -computeDF(struct basicblock *bblock, struct bblockinfo *bbinfo);
 621 -
622621 /*
 623622  * Algorithm 19.9, pp 414 from Appel.
 624623  */
 625624 
 626625 void
 627626 dominators(struct bblockinfo *bbinfo)
     
 !
630629         struct basicblock *bb, *y, *v;
 631630         struct basicblock *s, *sprime, *p;
 632631         int i;
 633632 
 634633         CIRCLEQ_FOREACH(bb, &bblocks, bbelem) {
 635634                 bb->bucket = tmpalloc((bbinfo->size + 7)/8);
<> 635+                memset(bb->bucket, 0, (bbinfo->size + 7)/8);
636636         }
 637637 
 638638         dfsnum = 0;
 639639         cfg_dfs(CIRCLEQ_FIRST(&bblocks), 0, bbinfo);
 640640 
 641641         CIRCLEQ_FOREACH_REVERSE(bb, &bblocks, bbelem) {
     
 !
702702         struct cfgnode *cnode;
 703703         int i;
 704704         
 705705         if (bblock->df)
 706706                 comperr("Har redan DF, hm");
 707707         
<>708 -        if (!bblock->df)
  708+        if (!bblock->df) {
709709                 bblock->df = tmpalloc((bbinfo->size + 7)/8);
<> 710+                memset(bblock->df, 0, (bbinfo->size + 7)/8);
  711+        }
<_710712 
 711713 
 712714         SIMPLEQ_FOREACH(cnode, &bblock->children, cfgelem) {
 713715                 if (cnode->bblock->idom != bblock->dfnum)
 714716                         BITSET(bblock->df, cnode->bblock->dfnum);
 715717         }
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-22 16:39 +0100