Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.30
 
1.31
 
MAIN:ragge:20050701181741
 
optim2.c
_>345345 {
 346346         struct interpass *ip;
 347347         struct basicblock *bb = NULL;
<>348 -        int leader = 1;
  348+//      int leader = 1;
349349         int low, high;
 350350         int count = 0;
 351351         int i;
     
 !
359359          * Any statement that is target of a jump is a leader.
 360360          * Any statement that immediately follows a jump is a leader.
 361361          */
<>362 -
363362         DLIST_FOREACH(ip, &ipole, qelem) {
<> 363+                if (bb == NULL || (ip->type == IP_EPILOG) ||
  364+                    (ip->type == IP_DEFLAB) || (ip->type == IP_DEFNAM)) {
  365+                        bb = tmpalloc(sizeof(struct basicblock));
  366+                        bb->first = ip;
  367+                        SLIST_INIT(&bb->children);
  368+                        SLIST_INIT(&bb->parents);
  369+                        bb->dfnum = 0;
  370+                        bb->dfparent = 0;
  371+                        bb->semi = 0;
  372+                        bb->ancestor = 0;
  373+                        bb->idom = 0;
  374+                        bb->samedom = 0;
  375+                        bb->bucket = NULL;
  376+                        bb->df = NULL;
  377+                        bb->dfchildren = NULL;
  378+                        bb->Aorig = NULL;
  379+                        bb->Aphi = NULL;
  380+                        DLIST_INSERT_BEFORE(&bblocks, bb, bbelem);
  381+                        count++;
  382+                }
  383+                bb->last = ip;
  384+                if ((ip->type == IP_NODE) && (ip->ip_node->n_op == GOTO ||
  385+                    ip->ip_node->n_op == CBRANCH))
  386+                        bb = NULL;
  387+                if (ip->type == IP_PROLOG)
  388+                        bb = NULL;
  389+        }
  390+#if 0
  391+        DLIST_FOREACH(ip, &ipole, qelem) {
364392                 /* Garbage, skip it */
 365393                 if (leader) {
 366394                         bb = tmpalloc(sizeof(struct basicblock));
     
 !
386414                 /* Prologue and epilogue in their own bblock */
 387415                 if ((ip->type == IP_PROLOG) || (ip->type == IP_EPILOG)) {
 388416                         bb->last = ip;
<>389 -                        if (ip->type == IP_EPILOG)
 390 -                                high = MAX(ip->ip_lbl, high);
391417                         leader = 1;
 392418                         continue;
 393419                 }
     
 !
473499 
 474500                 bb->last = ip;
 475501         }
<> 502+#endif
476503 
<>477 -        BDEBUG(("Basic blocks in func: %d\n", count));
 478 -        BDEBUG(("Label range in func: %d\n", high - low + 1));
  504+        if (b2debug) {
  505+                printf("Basic blocks in func: %d\n", count);
  506+                DLIST_FOREACH(bb, &bblocks, bbelem) {
  507+                        printf("bb %p: first %p last %p\n", bb,
  508+                            bb->first, bb->last);
  509+                }
  510+        }
479511 
<>480 -
481512         labinfo->low = low;
 482513         labinfo->size = high - low + 1;
 483514         labinfo->arr = tmpalloc(labinfo->size * sizeof(struct basicblock *));
     
 !
516547         
 517548         DLIST_FOREACH(bb, &bblocks, bbelem) {
 518549 
<> 550+printf("bb: %p\n", bb);
<_519551                 if (bb->first->type == IP_EPILOG) {
 520552                         break;
 521553                 }
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-29 00:38 +0100