*** empty log message ***
[fw/sdcc] / src / xa51 / ralloc.c
index 037e79830a8d88a10e18fd8d78ebcececbf1167a..7274ca78dcff2d4c554acb365abda645769acb0a 100755 (executable)
@@ -1883,8 +1883,6 @@ static void packRegisters (eBBlock * ebp) {
   iCode *ic;
   int change = 0;
   
-  return; // that's it for now
-
   while (1) {
     change = 0;
     
@@ -1899,6 +1897,24 @@ static void packRegisters (eBBlock * ebp) {
 
   for (ic = ebp->sch; ic; ic = ic->next)
     {
+      /* if the condition of an if instruction
+         is defined in the previous instruction and
+        this is the only usage then
+         mark the itemp as a conditional */
+      if ((IS_CONDITIONAL (ic) ||
+          (IS_BITWISE_OP(ic) && isBitwiseOptimizable (ic)))) {
+       if (ic->next && ic->next->op == IFX &&
+           bitVectnBitsOn (OP_USES(IC_RESULT(ic)))==1 &&
+           isOperandEqual (IC_RESULT (ic), IC_COND (ic->next)) &&
+           OP_SYMBOL (IC_RESULT (ic))->liveTo <= ic->next->seq) {
+         OP_SYMBOL (IC_RESULT (ic))->regType = REG_CND;
+         continue;
+       }
+      }
+
+      // that's all for now
+      continue;
+
       /* if this is an itemp & result of an address of a true sym 
          then mark this as rematerialisable   */
       if (ic->op == ADDRESS_OF &&
@@ -1966,21 +1982,6 @@ static void packRegisters (eBBlock * ebp) {
       if (POINTER_GET (ic))
        OP_SYMBOL (IC_LEFT (ic))->uptr = 1;
 
-      /* if the condition of an if instruction
-         is defined in the previous instruction and
-        this is the only usage then
-         mark the itemp as a conditional */
-      if ((IS_CONDITIONAL (ic) ||
-          (IS_BITWISE_OP(ic) && isBitwiseOptimizable (ic))) &&
-         ic->next && ic->next->op == IFX &&
-         bitVectnBitsOn (OP_USES(IC_RESULT(ic)))==1 &&
-         isOperandEqual (IC_RESULT (ic), IC_COND (ic->next)) &&
-         OP_SYMBOL (IC_RESULT (ic))->liveTo <= ic->next->seq)
-       {
-         OP_SYMBOL (IC_RESULT (ic))->regType = REG_CND;
-         continue;
-       }
-
       /* reduce for support function calls */
       if (ic->supportRtn || ic->op == '+' || ic->op == '-')
        packRegsForSupport (ic, ebp);