Remove icodes from the iCodeHashTable when
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 28 Jan 2000 22:55:42 +0000 (22:55 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 28 Jan 2000 22:55:42 +0000 (22:55 +0000)
they are deleted during register packing

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@35 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/mcs51/ralloc.c

index 2ae154ab80cf6b6b565f92f8bfbb4dad1f90b33f..8cd4764beeb9a4c12dc7ab8bdf9aefadcbbf22e2 100644 (file)
@@ -1554,6 +1554,7 @@ pack:
     }
         
     remiCodeFromeBBlock(ebp,ic);
+    hTabDeleteItem (&iCodehTab,ic->key,ic,DELETE_ITEM,NULL);
     return 1;
     
 }
@@ -1655,7 +1656,8 @@ static int packRegsForSupport (iCode *ic, eBBlock *ebp)
        IC_LEFT(ic)->operand.symOperand =
            IC_RIGHT(dic)->operand.symOperand;
        IC_LEFT(ic)->key = IC_RIGHT(dic)->operand.symOperand->key;
-       remiCodeFromeBBlock(ebp,dic);   
+       remiCodeFromeBBlock(ebp,dic);
+       hTabDeleteItem (&iCodehTab,dic->key,dic,DELETE_ITEM,NULL);
        change++;      
     }
     
@@ -1687,6 +1689,7 @@ static int packRegsForSupport (iCode *ic, eBBlock *ebp)
        IC_RIGHT(ic)->key = IC_RIGHT(dic)->operand.symOperand->key;
        
        remiCodeFromeBBlock(ebp,dic);
+       hTabDeleteItem (&iCodehTab,dic->key,dic,DELETE_ITEM,NULL);
        change ++;
     }
    
@@ -2001,7 +2004,8 @@ static void packForPush(iCode *ic, eBBlock *ebp)
        and the that the definition is an assignment */
     IC_LEFT(ic) = IC_RIGHT(dic);
 
-    remiCodeFromeBBlock(ebp,dic);      
+    remiCodeFromeBBlock(ebp,dic);
+    hTabDeleteItem (&iCodehTab,dic->key,dic,DELETE_ITEM,NULL);
 }
 
 /*-----------------------------------------------------------------*/
@@ -2177,6 +2181,7 @@ static void packRegisters (eBBlock *ebp)
                    if (IS_ARITHMETIC_OP(dic)) {
                        IC_RESULT(dic) = IC_RESULT(ic);
                        remiCodeFromeBBlock(ebp,ic);
+                       hTabDeleteItem (&iCodehTab,ic->key,ic,DELETE_ITEM,NULL);
                        ic = ic->prev;
                    } else
                        OP_SYMBOL(IC_RIGHT(ic))->ruonly =  0;
@@ -2191,6 +2196,7 @@ static void packRegisters (eBBlock *ebp)
                    if (dic) {
                        IC_RESULT(dic) = IC_RESULT(ic);
                        remiCodeFromeBBlock(ebp,ic);
+                       hTabDeleteItem (&iCodehTab,ic->key,ic,DELETE_ITEM,NULL);
                        ic = ic->prev;
                    }
                }