Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.60
 
1.61
 
MAIN:pantzer:20081207103745
 
optim2.c
_>769769         
 770770         if (SLIST_FIRST(&defsites.stack[tempnr])==NULL) {
 771771                 stacke=tmpcalloc(sizeof (struct varstack));
<>772 -                stacke->tmpregno=regno(p->n_left);
  772+                stacke->tmpregno=-regno(p->n_left);
773773                 SLIST_INSERT_FIRST(&defsites.stack[tempnr],stacke,varstackelem);
 774774         }
 775775 }
     
 !
862862                            
 863863                                 if (phifound==0) {
 864864                                         if (b2debug)
<>865 -                                            printf("Phi in %d for %d\n",y->dfnum,i+defsites.low);
  865+                                            printf("Phi in %d (%p) for %d\n",y->dfnum,y,i+defsites.low);
866866 
 867867                                         phi = tmpcalloc(sizeof(struct phiinfo));
 868868                            
     
 !
10201020         struct interpass *pip;
 10211021         TWORD n_type;
 10221022         int complex;
<>1023 -        int label;
  1023+        int label=0;
10241024         int newlabel;
 10251025         
 10261026         DLIST_FOREACH(bb, &p2e->bblocks, bbelem) {              
     
 !
10341034                                 
 10351035                                 complex = 0;
 10361036                                 
<> 1037+                                BDEBUG(("removephi: %p in %d",pip,bb->dfnum));
10371038                                 if (pip->type == IP_NODE && pip->ip_node->n_op == GOTO) {
<> 1039+                                        BDEBUG((" GOTO "));
10381040                                         label=pip->ip_node->n_left->n_lval;
 10391041                                         complex=1;
 10401042                                 } else if (pip->type == IP_NODE && pip->ip_node->n_op == CBRANCH) {
<> 1043+                                        BDEBUG((" CBRANCH "));
10411044                                         label=pip->ip_node->n_right->n_lval;
 10421045                                         
 10431046                                         if (bb==labinfo->arr[label - p2e->ipp->ip_lblnum])
 10441047                                                 complex=2;
 10451048                                 }       
<>1046 -                                                              
 1047 -                                                              
  1049+      
  1050+                                BDEBUG((" Complex: %d\n",complex));
  1051+
10481052                                 if (complex > 0) {
 10491053                                         /*
 10501054                                          This destroys basic block calculations.
     
 !
10621066                                         DLIST_INSERT_BEFORE((bb->first), ip, qelem);
 10631067                                         
 10641068                                         SLIST_FOREACH(phi,&bb->phi,phielem) {
<>1065 -                                                n_type=phi->n_type;
 1066 -                                                ip = ipnode(mkbinode(ASSIGN,
 1067 -                                                             mktemp(phi->newtmpregno, n_type),
 1068 -                                                             mktemp(phi->intmpregno[i],n_type),
 1069 -                                                             n_type));
  1069+                                                if (phi->intmpregno[i]>=0) {
  1070+                                                        n_type=phi->n_type;
  1071+                                                        ip = ipnode(mkbinode(ASSIGN,
  1072+                                                                     mktemp(phi->newtmpregno, n_type),
  1073+                                                                     mktemp(phi->intmpregno[i],n_type),
  1074+                                                                     n_type));
10701075                                         
<>1071 -                                                DLIST_INSERT_BEFORE((bb->first), ip, qelem);
  1076+                                                        DLIST_INSERT_BEFORE((bb->first), ip, qelem);
  1077+                                                }
10721078                                         }
 10731079                                         
 10741080                                         if (complex==1)
     
 !
10801086                                 } else {
 10811087                                         /* Construct move */
 10821088                                         SLIST_FOREACH(phi,&bb->phi,phielem) {
<>1083 -                                                n_type=phi->n_type;
 1084 -                                                ip = ipnode(mkbinode(ASSIGN,
 1085 -                                                     mktemp(phi->newtmpregno, n_type),
 1086 -                                                     mktemp(phi->intmpregno[i],n_type),
 1087 -                                                     n_type));
  1089+                                                if (phi->intmpregno[i]>=0) {
  1090+                                                        n_type=phi->n_type;
  1091+                                                        ip = ipnode(mkbinode(ASSIGN,
  1092+                                                             mktemp(phi->newtmpregno, n_type),
  1093+                                                             mktemp(phi->intmpregno[i],n_type),
  1094+                                                             n_type));
10881095                                 
<>1089 -                                                /* Insert move at bottom of parent basic block */
 1090 -                                                DLIST_INSERT_AFTER((bbparent->last), ip, qelem);
 1091 -                                                bbparent->last=ip;
  1096+                                                        /* Insert move at bottom of parent basic block */
  1097+                                                        DLIST_INSERT_AFTER((bbparent->last), ip, qelem);
  1098+                                                }
<_10921099                                         }
 10931100                                 }
 10941101                                 i++;
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-10-31 00:18 +0100