- {
-
- int lin, rin;
- cseDef *ivar;
-
- /* 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)
- continue;
-
- /* iTemp assignment from a literal may be invariant, but it
- will needlessly increase register pressure if the
- iCode(s) that use this iTemp are not also invariant */
- if (ic->op=='=' && IS_ITEMP (IC_RESULT (ic))
- && IS_OP_LITERAL (IC_RIGHT (ic)))
- continue;
-
- /* if result is volatile then skip */
- if (IC_RESULT (ic) &&
- (isOperandVolatile (IC_RESULT (ic), TRUE) ||
- IS_OP_PARM (IC_RESULT (ic))))
- continue;
-
- /* if result depends on a volatile then skip */
- if ((IC_LEFT(ic) && isOperandVolatile(IC_LEFT(ic), TRUE)) ||
- (IC_RIGHT(ic) && isOperandVolatile(IC_RIGHT(ic), TRUE)))
- continue;
-
- lin = rin = 0;
-
- /* special case */
- /* if address of then it is an invariant */
- if (ic->op == ADDRESS_OF &&
- IS_SYMOP (IC_LEFT (ic)) &&
- IS_AGGREGATE (operandType (IC_LEFT (ic))))
- lin++;
- else {
- /* check if left operand is an invariant */
- if ((lin = isOperandInvariant (IC_LEFT (ic), theLoop, lInvars)))
- /* if this is a pointer get then make sure
- that the pointer set does not exist in
- any of the blocks */
- if (POINTER_GET (ic) &&
- (applyToSet (theLoop->regBlocks,
- pointerAssigned, IC_LEFT (ic))))
- lin = 0;
- }
-
- /* do the same for right */
- rin = isOperandInvariant (IC_RIGHT (ic), theLoop, lInvars);
-
- /* if this is a POINTER_GET then special case, make sure all
- usages within the loop are POINTER_GET any other usage
- would mean that this is not an invariant , since the pointer
- could then be passed as a parameter */
- if (POINTER_GET (ic) &&
- applyToSet (theLoop->regBlocks, hasNonPtrUse, IC_LEFT (ic)))
- continue;
+ {
+
+ int lin, rin;
+ cseDef *ivar;
+
+ /* 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)
+ continue;
+
+ /* iTemp assignment from a literal may be invariant, but it
+ will needlessly increase register pressure if the
+ iCode(s) that use this iTemp are not also invariant */
+ if (ic->op=='=' && IS_ITEMP (IC_RESULT (ic))
+ && IS_OP_LITERAL (IC_RIGHT (ic)))
+ continue;
+
+ /* if result is volatile then skip */
+ if (IC_RESULT (ic) &&
+ (isOperandVolatile (IC_RESULT (ic), TRUE) ||
+ IS_OP_PARM (IC_RESULT (ic))))
+ continue;
+
+ /* if result depends on a volatile then skip */
+ if ((IC_LEFT(ic) && isOperandVolatile(IC_LEFT(ic), TRUE)) ||
+ (IC_RIGHT(ic) && isOperandVolatile(IC_RIGHT(ic), TRUE)))
+ continue;
+
+ lin = rin = 0;
+
+ /* special case */
+ /* if address of then it is an invariant */
+ if (ic->op == ADDRESS_OF &&
+ IS_SYMOP (IC_LEFT (ic)) &&
+ IS_AGGREGATE (operandType (IC_LEFT (ic))))
+ lin++;
+ else {
+ /* check if left operand is an invariant */
+ if ((lin = isOperandInvariant (IC_LEFT (ic), theLoop, lInvars)))
+ /* if this is a pointer get then make sure
+ that the pointer set does not exist in
+ any of the blocks */
+ if (POINTER_GET (ic) &&
+ (applyToSet (theLoop->regBlocks,
+ pointerAssigned, IC_LEFT (ic))))
+ lin = 0;
+ }
+
+ /* do the same for right */
+ rin = isOperandInvariant (IC_RIGHT (ic), theLoop, lInvars);
+
+ /* if this is a POINTER_GET then special case, make sure all
+ usages within the loop are POINTER_GET any other usage
+ would mean that this is not an invariant , since the pointer
+ could then be passed as a parameter */
+ if (POINTER_GET (ic) &&
+ applyToSet (theLoop->regBlocks, hasNonPtrUse, IC_LEFT (ic)))
+ continue;