This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug tree-optimization/26169] [4.2 Regression] ICE in duplicate_ssa_name


On Wed, 2006-02-08 at 12:43 +0000, pinskia at gcc dot gnu dot org wrote:
> 
> ------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-08 12:43 -------
> (In reply to comment #3)
> > I didn't trip over anything like this on my x86 testing, but I have
> > been able to reproduce it with a cross compiler.  The fix is
> > pretty trivial, but it'll take until sometime tomorrow before the
> > regression testing and such is complete.
> 
> I should mention why you did not trip over it on the x86 testing orginally.
> This:
>   if (p == 0)
>     if (do_create)
> Was orginally:
>   if (p == 0 && do_create)
> Which causes a slightly different IR.
This patch should fix the various instances of the ICE in
duplicate_ssa_name.

Basically VRP performed a constant propagation, changing  the
index in an array reference from a variable to a constant.  When
this occurs we queue SSA graph updates for the virtual operands
of the statement.  As a side effect, the virtual operands are
no longer SSA_NAMEs, but instead _DECL nodes.

We then find that we're able to thread through the block containing
the updated array reference.  The block duplication code doesn't
know how to handle this case and dies.

This patch simply handles any queued SSA updates before dealing
with jump threads.  DOM does the exact same thing.

However, my gut tells me that this "solution" is mostly an artifact
of how the old old old SSA graph updating code in DOM worked.  I
suspect that it wouldn't be terribly difficult to do all the
SSA graph updates at the same time.  Doing so would probably be a
compile-time win as well.

Regardless, this patch should bring various failing targets back
into bootstrap land.

Bootstrapped and regression tested on i686-pc-linux-gnu; I've
also verified the ICE is fixed using cross compilers.







 

Attachment: PPP
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]