/* all blocks that have dfnumbers between dfMin & dfMax are also
part of loop */
for (i = 0 ; i < count ; i++) {
- if (ebbs[i]->dfnum > dfMin && ebbs[i]->dfnum < dfMax) {
- loopInsert(&aloop->regBlocks,ebbs[i]);
+ if (ebbs[i]->dfnum > dfMin &&
+ ebbs[i]->dfnum < dfMax &&
+ !isinSet(aloop->regBlocks,ebbs[i])) {
+ if (!ebbs[i]->partOfLoop) ebbs[i]->partOfLoop = aloop;
}
}
+
/* now add it to the set */
addSetHead (allRegion, aloop);
return 0;
iCode *newic = newiCode ('=', NULL,
operandFromOperand (IC_RIGHT (ic)));
IC_RESULT (newic) = operandFromOperand (IC_RESULT (ic));
- OP_DEFS (IC_RESULT (newic)) =
- bitVectSetBit (OP_DEFS (IC_RESULT (newic)), newic->key);
- OP_USES (IC_RIGHT (newic)) =
- bitVectSetBit (OP_USES (IC_RIGHT (newic)), newic->key);
+ OP_DEFS_SET ((IC_RESULT (newic)),
+ bitVectSetBit (OP_DEFS (IC_RESULT (newic)), newic->key));
+ OP_USES_SET ((IC_RIGHT (newic)),
+ bitVectSetBit (OP_USES (IC_RIGHT (newic)), newic->key));
/* and add it */
if (eblock->sch && eblock->sch->op == LABEL)
addiCodeToeBBlock (eblock, newic, eblock->sch->next);