From: johanknol Date: Sat, 5 Apr 2003 16:53:11 +0000 (+0000) Subject: followup for the bug #460088 fix X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=2a9c4f02ccb67b822dcb95a7ec3cd2c3e38beee9;p=fw%2Fsdcc followup for the bug #460088 fix git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2485 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCcse.c b/src/SDCCcse.c index ea64e30c..8942590e 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1541,9 +1541,9 @@ cseBBlock (eBBlock * ebb, int computeOnly, aggrToPtr (operandType (IC_RESULT (ic)), FALSE)); } - /* if this is a condition statment then */ + /* if this is a condition statement then */ /* check if the condition can be replaced */ - if (!computeOnly && ic->op == IFX) + if (ic->op == IFX) { ifxOptimize (ic, cseSet, computeOnly, ebb, &change, @@ -1631,7 +1631,7 @@ cseBBlock (eBBlock * ebb, int computeOnly, } /* if left or right changed then do algebraic */ - if (change) + if (!computeOnly && change) { algebraicOpts (ic); while (constFold (ic, cseSet)); diff --git a/src/SDCCloop.c b/src/SDCCloop.c index f43e4837..d04b717c 100644 --- a/src/SDCCloop.c +++ b/src/SDCCloop.c @@ -307,7 +307,7 @@ DEFSETFUNC (addDefInExprs) V_ARG (int, count); addSetHead (&ebp->inExprs, cdp); - cseBBlock (ebp, 0, ebbs, count); + cseBBlock (ebp, optimize.global_cse, ebbs, count); return 0; }