- kill:
- /* kill this one if required */
- if (kill)
- {
- bool volLeft = IS_SYMOP (IC_LEFT (ic))
- && isOperandVolatile (IC_LEFT (ic), FALSE);
- bool volRight = IS_SYMOP (IC_RIGHT (ic))
- && isOperandVolatile (IC_RIGHT (ic), FALSE);
-
- /* a dead address-of operation should die, even if volatile */
- if (ic->op == ADDRESS_OF)
- volLeft = FALSE;
-
- if (ic->next && ic->seqPoint == ic->next->seqPoint
- && (ic->next->op == '+' || ic->next->op == '-'))
- {
- if (isOperandEqual (IC_LEFT(ic), IC_LEFT(ic->next))
- || isOperandEqual (IC_LEFT(ic), IC_RIGHT(ic->next)))
- volLeft = FALSE;
- if (isOperandEqual (IC_RIGHT(ic), IC_LEFT(ic->next))
- || isOperandEqual (IC_RIGHT(ic), IC_RIGHT(ic->next)))
- volRight = FALSE;
- }
-
- if (POINTER_GET (ic) && IS_VOLATILE (operandType (IC_LEFT (ic))->next))
- {
- if (SPIL_LOC (IC_RESULT (ic)))
- {
- IC_RESULT (ic) = newiTempFromOp (IC_RESULT (ic));
- SPIL_LOC (IC_RESULT (ic)) = NULL;
- }
- continue;
- }
-
- change = 1;
- gchange++;
-
- /* now delete from defUseSet */
- deleteItemIf (&ebbs[i]->outExprs, ifDiCodeIsX, ic);
- bitVectUnSetBit (ebbs[i]->outDefs, ic->key);
-
- /* and defset of the block */
- bitVectUnSetBit (ebbs[i]->defSet, ic->key);
-
- /* If this is the last of a register equivalent, */
- /* look for a successor register equivalent. */
- bitVectUnSetBit (OP_DEFS (IC_RESULT (ic)), ic->key);
- if (IS_ITEMP (IC_RESULT (ic))
- && OP_SYMBOL (IC_RESULT (ic))->isreqv
- && bitVectIsZero (OP_DEFS (IC_RESULT (ic))))
- {
- symbol * resultsym = OP_SYMBOL (IC_RESULT (ic));
- symbol * prereqv = resultsym->prereqv;
-
- if (prereqv && prereqv->reqv && (OP_SYMBOL (prereqv->reqv) == resultsym))
- {
- operand * newreqv;
-
- IC_RESULT (ic) = NULL;
- newreqv = findReqv (prereqv, ebbs, count);
- if (newreqv)
- {
- prereqv->reqv = newreqv;
- }
- }
- }
-
- /* delete the result */
- IC_RESULT (ic) = NULL;
-
- if (volLeft || volRight)
- {
- /* something is volatile, so keep the iCode */
- /* and change the operator instead */
- ic->op = DUMMY_READ_VOLATILE;
-
- /* keep only the volatile operands */
- if (!volLeft)
- IC_LEFT (ic) = NULL;
- if (!volRight)
- IC_RIGHT (ic) = NULL;
- }
- else
- {
- /* nothing is volatile, eliminate the iCode */
- remiCodeFromeBBlock (ebbs[i], ic);
-
- /* for the left & right remove the usage */
- if (IS_SYMOP (IC_LEFT (ic)))
- bitVectUnSetBit (OP_USES (IC_LEFT (ic)), ic->key);
-
- if (IS_SYMOP (IC_RIGHT (ic)))
- bitVectUnSetBit (OP_USES (IC_RIGHT (ic)), ic->key);
- }
- }
-
- } /* end of all instructions */
-
- if (!ebbs[i]->sch && !ebbs[i]->noPath)
- disconBBlock (ebbs[i], ebbi);
-
- } /* end of for all blocks */
+ kill:
+ /* kill this one if required */
+ if (kill)
+ {
+ bool volLeft = IS_SYMOP (IC_LEFT (ic))
+ && isOperandVolatile (IC_LEFT (ic), FALSE);
+ bool volRight = IS_SYMOP (IC_RIGHT (ic))
+ && isOperandVolatile (IC_RIGHT (ic), FALSE);
+
+ /* a dead address-of operation should die, even if volatile */
+ if (ic->op == ADDRESS_OF)
+ volLeft = FALSE;
+
+ if (ic->next && ic->seqPoint == ic->next->seqPoint
+ && (ic->next->op == '+' || ic->next->op == '-'))
+ {
+ if (isOperandEqual (IC_LEFT(ic), IC_LEFT(ic->next))
+ || isOperandEqual (IC_LEFT(ic), IC_RIGHT(ic->next)))
+ volLeft = FALSE;
+ if (isOperandEqual (IC_RIGHT(ic), IC_LEFT(ic->next))
+ || isOperandEqual (IC_RIGHT(ic), IC_RIGHT(ic->next)))
+ volRight = FALSE;
+ }
+
+ if (POINTER_GET (ic) && IS_VOLATILE (operandType (IC_LEFT (ic))->next))
+ {
+ if (SPIL_LOC (IC_RESULT (ic)))
+ {
+ IC_RESULT (ic) = newiTempFromOp (IC_RESULT (ic));
+ SPIL_LOC (IC_RESULT (ic)) = NULL;
+ }
+ continue;
+ }
+
+ change = 1;
+ gchange++;
+
+ /* now delete from defUseSet */
+ deleteItemIf (&ebbs[i]->outExprs, ifDiCodeIsX, ic);
+ bitVectUnSetBit (ebbs[i]->outDefs, ic->key);
+
+ /* and defset of the block */
+ bitVectUnSetBit (ebbs[i]->defSet, ic->key);
+
+ /* If this is the last of a register equivalent, */
+ /* look for a successor register equivalent. */
+ bitVectUnSetBit (OP_DEFS (IC_RESULT (ic)), ic->key);
+ if (IS_ITEMP (IC_RESULT (ic))
+ && OP_SYMBOL (IC_RESULT (ic))->isreqv
+ && bitVectIsZero (OP_DEFS (IC_RESULT (ic))))
+ {
+ symbol * resultsym = OP_SYMBOL (IC_RESULT (ic));
+ symbol * prereqv = resultsym->prereqv;
+
+ if (prereqv && prereqv->reqv && (OP_SYMBOL (prereqv->reqv) == resultsym))
+ {
+ operand * newreqv;
+
+ IC_RESULT (ic) = NULL;
+ newreqv = findReqv (prereqv, ebbs, count);
+ if (newreqv)
+ {
+ prereqv->reqv = newreqv;
+ }
+ }
+ }
+
+ /* delete the result */
+ IC_RESULT (ic) = NULL;
+
+ if (volLeft || volRight)
+ {
+ /* something is volatile, so keep the iCode */
+ /* and change the operator instead */
+ ic->op = DUMMY_READ_VOLATILE;
+
+ /* keep only the volatile operands */
+ if (!volLeft)
+ IC_LEFT (ic) = NULL;
+ if (!volRight)
+ IC_RIGHT (ic) = NULL;
+ }
+ else
+ {
+ /* nothing is volatile, eliminate the iCode */
+ remiCodeFromeBBlock (ebbs[i], ic);
+
+ /* for the left & right remove the usage */
+ if (IS_SYMOP (IC_LEFT (ic)))
+ bitVectUnSetBit (OP_USES (IC_LEFT (ic)), ic->key);
+
+ if (IS_SYMOP (IC_RIGHT (ic)))
+ bitVectUnSetBit (OP_USES (IC_RIGHT (ic)), ic->key);
+ }
+ }
+
+ } /* end of all instructions */
+
+ if (!ebbs[i]->sch && !ebbs[i]->noPath)
+ disconBBlock (ebbs[i], ebbi);
+
+ } /* end of for all blocks */