This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 2 Mar 2015 09:38:20 +0100
- Subject: Re: [patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs
- Authentication-results: sourceware.org; auth=none
- References: <54F3F648 dot 8090400 at redhat dot com>
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.
Richard.