1) don't mark a liverange as Live across a functioncall if it is
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:14:21 +0000 (04:14 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 18 Dec 2001 04:14:21 +0000 (04:14 +0000)
defined by the function call

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

src/SDCClrange.c

index df34ff86633348204b3f8350b4e6b50aa09774b6..376d3caae4b7677bfc1878b375f746c8efe76777 100644 (file)
@@ -578,7 +578,9 @@ rlivePoint (eBBlock ** ebbs, int count)
                /* if it is live then add the lrange to ic->rlive */
                if (lrange->liveFrom <= ic->seq &&
                    lrange->liveTo >= ic->seq) {
-                   lrange->isLiveFcall |= (ic->op == CALL || ic->op == PCALL || ic->op == SEND);
+                   lrange->isLiveFcall |= ((lrange->liveFrom < ic->seq) && 
+                                           (ic->op == CALL || ic->op == PCALL || ic->op == SEND));
+                   if (ic->op == CALL && lrange->liveFrom == ic->seq) continue;
                    ic->rlive = bitVectSetBit (ic->rlive, lrange->key);
                }
            }