Patchwork 0008-Don-t-kill-generated-expressions-in-hoist_expr_reach

login
register
mail settings
Submitter Maxim Kuvyrkov
Date July 1, 2010, 11:05 a.m.
Message ID <4C2C7683.4070302@codesourcery.com>
Download mbox | patch
Permalink /patch/57533/
State New
Headers show

Comments

Maxim Kuvyrkov - July 1, 2010, 11:05 a.m.
This patch fixes a quirk in hoist_expr_reaches_here_p that makes it to 
avoid moving an expression across its computation in another block.

Bootstrapped and regtested on x86[_64]-linux-gnu and regtested on 
arm-linux-gnu.  This change reduces PIC code size on ARM by 0.3% and 
doesn't increase non-PIC code size.

OK to check in?
Jeff Law - July 1, 2010, 2:26 p.m.
On 07/01/10 05:05, Maxim Kuvyrkov wrote:
> This patch fixes a quirk in hoist_expr_reaches_here_p that makes it to 
> avoid moving an expression across its computation in another block.
>
> Bootstrapped and regtested on x86[_64]-linux-gnu and regtested on 
> arm-linux-gnu.  This change reduces PIC code size on ARM by 0.3% and 
> doesn't increase non-PIC code size.
>
> OK to check in?
OK.
jeff

Patch

diff --git a/gcc/gcse.c b/gcc/gcse.c
index 47d0dba..f37e486 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4478,9 +4478,6 @@  hoist_expr_reaches_here_p (basic_block expr_bb, int expr_index, basic_block bb,
 	break;
       else if (pred_bb == expr_bb)
 	continue;
-      /* Does this predecessor generate this expression?  */
-      else if (TEST_BIT (comp[pred_bb->index], expr_index))
-	break;
       else if (! TEST_BIT (transp[pred_bb->index], expr_index))
 	break;