ip->op = op;
ip->cval = constVal;
ip->ic = ic;
- updateSpillLocation(ic,1);
+//updateSpillLocation(ic,1);
return ip;
}
if (!exit)
return NULL;
-
+
succVect = bitVectCopy (exit->succVect);
for (exit = setNextItem (lexits); exit;
eBBlock *ebp = item;
V_ARG (operand *, op);
- return ebp->hasFcall || bitVectBitValue (ebp->ptrsSet, op->key);
+ if (ebp->hasFcall)
+ return 1;
+
+ if (bitVectBitValue (ebp->ptrsSet, op->key))
+ return 1;
+
+ /* Unfortunately, one of the other pointer set operations */
+ /* may be using an alias of this operand, and the above */
+ /* test would miss it. To be thorough, some aliasing */
+ /* analysis should be done here. In the meantime, be */
+ /* conservative and assume any other pointer set operation */
+ /* is dangerous */
+ if (!bitVectIsZero (ebp->ptrsSet))
+ return 1;
+
+ return 0;
}
/*-----------------------------------------------------------------*/
if (nexits == 1)
{
eBBlock *exit = setFirstItem (loopReg->exits);
-
/* if it is the same block then there is no
need to move it about */
if (exit != lBlock)
if (bitVectBitValue (loopSuccs, i))
{
- eBBlock *eblock = ebbs[i];
+ eBBlock *eblock = NULL;
+ int j;
+
+ /* Need to search for bbnum == i since ebbs is */
+ /* sorted by dfnum; a direct index won't do. */
+ for (j=0; j<count; j++)
+ if (ebbs[j]->bbnum == i)
+ {
+ eblock = ebbs[j];
+ break;
+ }
+ assert(eblock);
/* if the successor does not belong to the loop
and will be executed after the loop : then