}
+
/*-----------------------------------------------------------------*/
/* computeDataFlow - does computations for data flow accross blocks */
/*-----------------------------------------------------------------*/
{
set *pred;
- set *oldOut;
+ set *oldOutExprs = NULL;
+ bitVect *oldOutDefs = NULL;
int firstTime;
eBBlock *pBlock;
/* get blocks that can come to this block */
pred = edgesTo (ebbs[i]);
- /* make a copy of the outExpressions : to be */
+ /* make a copy of the outExpressions or outDefs : to be */
/* used for iteration */
- oldOut = setFromSet (ebbs[i]->outExprs);
+ if (optimize.global_cse)
+ oldOutExprs = setFromSet (ebbs[i]->outExprs);
+ else
+ oldOutDefs = bitVectCopy (ebbs[i]->outDefs);
setToNull ((void **) &ebbs[i]->inDefs);
/* indefitions are easy just merge them by union */
cseBBlock (ebbs[i], TRUE, ebbs, count);
/* if it change we will need to iterate */
- change += !isSetsEqualWith (ebbs[i]->outExprs, oldOut, isCseDefEqual);
+ if (optimize.global_cse)
+ change += !isSetsEqualWith (ebbs[i]->outExprs, oldOutExprs, isCseDefEqual);
+ else
+ change += !bitVectEqual (ebbs[i]->outDefs, oldOutDefs);
}
if (!change) /* iterate till no change */