diff --git a/util/ncgg/output.c b/util/ncgg/output.c index 7dbf5f3e2..48ba9510b 100644 --- a/util/ncgg/output.c +++ b/util/ncgg/output.c @@ -631,6 +631,8 @@ varinfo *kills,*allocates,*generates,*yields,*leaving; int vil; int cocono= -1; cost_t totcost; + int nremoves; + int removelist[100]; static char tlab[] = "0:"; extern int optexact,optstack,startline; extern char *filename; @@ -690,6 +692,23 @@ varinfo *kills,*allocates,*generates,*yields,*leaving; codenl(); } } + nremoves=0; + for(vp=generates;vp!=0;vp=vp->vi_next) { + if (vp->vi_int[0] != INSREMOVE) + continue; + for(i=0;ivi_int[1]==removelist[i]) + break; + if (i==nremoves) { + assert(nremoves<(sizeof(removelist)/sizeof(int))); + removelist[nremoves++] = vp->vi_int[1]; + } + } + for(i=0;ivi_next) { @@ -740,6 +759,8 @@ varinfo *kills,*allocates,*generates,*yields,*leaving; totcost.ct_space += instp->i_cost.ct_space; totcost.ct_time += instp->i_cost.ct_time ; break; + case INSREMOVE: + break; case INSMOVE: codecoco(cocono); code8(DO_MOVE);