From: sandeep Date: Fri, 28 Jan 2000 22:55:42 +0000 (+0000) Subject: Remove icodes from the iCodeHashTable when X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=84f5e268d1f3dbe1966c9c4afe025163f75a4f19;p=fw%2Fsdcc Remove icodes from the iCodeHashTable when they are deleted during register packing git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@35 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/mcs51/ralloc.c b/src/mcs51/ralloc.c index 2ae154ab..8cd4764b 100644 --- a/src/mcs51/ralloc.c +++ b/src/mcs51/ralloc.c @@ -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; } }