This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SRA bit-field optimization
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Roman Zippel <zippel at linux-m68k dot org>, Bernd Schmidt <bernds_cb1 at t-online dot de>, Diego Novillo <dnovillo at acm dot org>, Daniel Berlin <dberlin at dberlin dot org>, Andrew Pinski <pinskia at gmail dot com>
- Date: Thu, 04 Oct 2007 15:36:24 -0300
- Subject: Re: SRA bit-field optimization
- References: <orfy4czoyq.fsf@oliva.athome.lsd.ic.unicamp.br> <or8x817e6t.fsf_-_@free.oliva.athome.lsd.ic.unicamp.br> <orzlz7iis1.fsf@free.oliva.athome.lsd.ic.unicamp.br> <200710030947.34535.ebotcazou@adacore.com>
On Oct 3, 2007, Eric Botcazou <ebotcazou@adacore.com> wrote:
> It apparently still misbehaves in some cases for Ada and has introduced an
> ACATS regression at -O2 on x86-64 (c37213b):
> The correctness problem is that the last statement of BB 4 is not
> tree_could_throw_p anymore, yielding:
Ugh, there was a thinko in the test for whether the original BB/stmt
could throw. Thanks for the testcase, this patch fixes it. I haven't
bootstrapped it yet, I'm on the road with a little computing
horsepower and limited network connection. I should be back home
tonight.
for gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* tree-sra.c (scalarize_lsdt): Fix thinko in testing whether
the original stmt can throw.
Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c.orig 2007-10-03 13:52:42.000000000 -0300
+++ gcc/tree-sra.c 2007-10-04 15:20:11.000000000 -0300
@@ -3431,7 +3431,7 @@ scalarize_ldst (struct sra_elt *elt, tre
{
tree_stmt_iterator tsi;
tree first, blist = NULL;
- bool thr = (bsi->bb->flags & EDGE_COMPLEX) != 0;
+ bool thr = tree_could_throw_p (stmt);
/* If the last statement of this BB created an EH edge
before scalarization, we have to locate the first
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}