From: tecodev Date: Sun, 23 Jan 2005 19:14:19 +0000 (+0000) Subject: * src/SDCCopt.c (killDeadCode): restored original behaviour X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=6f28b22e862a0cc4910fdb75d4eed1f89a3cc60a;p=fw%2Fsdcc * src/SDCCopt.c (killDeadCode): restored original behaviour (volatile operands might get thrown away though) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3652 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index df79fc72..a8f0d5b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ * src/pic16/main.c (_process_pragma): fixed nasty malloc bug (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)), this might fix SIGSEGVs on MinGW... + * src/SDCCopt.c (killDeadCode): restored original behaviour + (volatile operands might get thrown away though) 2005-01-23 Vangelis Rokas diff --git a/src/SDCCopt.c b/src/SDCCopt.c index af7d6b6d..f7e67ce6 100644 --- a/src/SDCCopt.c +++ b/src/SDCCopt.c @@ -879,14 +879,6 @@ killDeadCode (eBBlock ** ebbs, int count) if (IC_RESULT (ic) && isOperandVolatile (IC_RESULT (ic), FALSE)) continue; - /* We also cannot remove the iCode, when an operand is volatile. */ - /* Even read access can cause side effects on some hardware registers! */ - - /* if the left operand is volatile then continue */ - if (IC_LEFT(ic) && isOperandVolatile (IC_LEFT (ic), TRUE)) - continue; - - /* if the result is a temp & isaddr then skip */ if (IC_RESULT (ic) && POINTER_SET (ic)) continue;