From: cuz Date: Sat, 15 Apr 2006 20:46:05 +0000 (+0000) Subject: Repeatedly call OptStore1 after OptJumpTarget because it is able to do some X-Git-Tag: V2.12.0~126 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=585791a789241476468fc8027c52124c8e1ccf45;p=cc65 Repeatedly call OptStore1 after OptJumpTarget because it is able to do some more work in case of for loops. git-svn-id: svn://svn.cc65.org/cc65/trunk@3729 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/codeopt.c b/src/cc65/codeopt.c index 0a5a227cd..fa6ab9bfe 100644 --- a/src/cc65/codeopt.c +++ b/src/cc65/codeopt.c @@ -2277,6 +2277,7 @@ static unsigned RunOptGroup3 (CodeSeg* S) C += RunOptFunc (S, &DOptDupLoads, 1); C += RunOptFunc (S, &DOptStoreLoad, 1); C += RunOptFunc (S, &DOptTransfers1, 1); + C += RunOptFunc (S, &DOptStore1, 1); C += RunOptFunc (S, &DOptStore5, 1); C += RunOptFunc (S, &DOptPushPop, 1); C += RunOptFunc (S, &DOptPrecalc, 1); @@ -2319,7 +2320,7 @@ static unsigned RunOptGroup5 (CodeSeg* S) /* Run another round of pattern replacements. These are done late, since there * may be better replacements before. */ -{ +{ unsigned Changes = 0; Changes += RunOptFunc (S, &DOptPush1, 1); @@ -2353,6 +2354,7 @@ static unsigned RunOptGroup6 (CodeSeg* S) */ Changes += RunOptFunc (S, &DOptUnusedLoads, 1); Changes += RunOptFunc (S, &DOptJumpTarget, 5); + Changes += RunOptFunc (S, &DOptStore5, 1); } } C = RunOptFunc (S, &DOptSize2, 1); @@ -2363,6 +2365,7 @@ static unsigned RunOptGroup6 (CodeSeg* S) */ Changes += RunOptFunc (S, &DOptUnusedLoads, 1); Changes += RunOptFunc (S, &DOptJumpTarget, 5); + Changes += RunOptFunc (S, &DOptStore5, 1); } /* Adjust branch distances */