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: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs


> On Mon, Mar 2, 2015 at 6:34 AM, Aldy Hernandez <aldyh@redhat.com> wrote:
> > As I mention in the PR...
> >
> > What's happening here is that the ipa_polymorphic_call_context constructor
> > is calling walk_ssa_copies on a PHI node that has no arguments.  This
> > happens because finalize_jump_threads eventually removes some PHI arguments
> > as it's redirecting some edges, leaving a PHI with no arguments:
> >
> > SR.33_23 = PHI <>
> >
> > This should get cleaned up later, but the IPA polymorphic code gets called
> > during the actual CFG clean-up, and walk_ssa_copies cannot handle an empty
> > PHI.
> >
> > Approved by Honza.
> >
> > Fully tested on x86-64 Linux and verified that the patch fixes the ICE on an
> > x86-64 Linux cross aarch64-linux-gnu cc1plus.
> >
> > Committed to mainline.
> 
> I think the real issue is that the walking code is executed via fold_stmt when
> called with an API that tells you not to walk SSA use-def chains.

OK, adding arugment to ipa_polymorphic_call_context disabling use-def walks on
request is easy. How does one say what uses of fold_stmt are not supposed to walk
use-def chains?

Honza


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