V_ARG (region *, lr);
/* mark the loop depth of this block */
- if (!ebp->depth)
+ //if (!ebp->depth)
+ if (ebp->depth<depth)
ebp->depth = depth;
/* put the loop region info in the block */
int lin, rin;
cseDef *ivar;
- /* if there are function calls in this block and this
- is a pointer get, the function could have changed it
- so skip, ISO-C99 according to David A. Long */
- if (fCallsInBlock && POINTER_GET(ic)) {
- continue;
+ /* jwk: TODO this is only needed if the call is between
+ here and the definition, but I am too lazy to do that now */
+
+ /* if there are function calls in this block */
+ if (fCallsInBlock) {
+
+ /* if this is a pointer get */
+ if (POINTER_GET(ic)) {
+ continue;
+ }
+
+ /* if this is an assignment from a global */
+ if (ic->op=='=' && isOperandGlobal(IC_RIGHT(ic))) {
+ continue;
+ }
}
if (SKIP_IC (ic) || POINTER_SET (ic) || ic->op == IFX)
OP_SYMBOL (IC_RESULT (indIc))->isind = 1;
ip = newInduction (IC_RIGHT (ic), dic->op, litValue, indIc, NULL);
- if (0) {
- fprintf (stderr, "%s:%d: stupid way to avoid bug #467035, but\n"
- "this will keep the regressions tests going.\n",
- __FILE__, __LINE__);
- continue;
- } continue;
-
/* replace the inducted variable by the iTemp */
replaceSymBySym (loopReg->regBlocks, IC_RESULT (ic), IC_RIGHT (ic));
/* add the induction variable vector to the last
block in the loop */
lastBlock->isLastInLoop = 1;
- lastBlock->linds = indVect;
+ lastBlock->linds = bitVectUnion(lastBlock->linds,indVect);
}
setToNull ((void **) &indVars);