This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix ICE with -fauto-profile when walking vdefs
- From: Richard Biener <rguenther at suse dot de>
- To: Sebastian Pop <sebpop at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Apr 2017 12:24:25 +0200 (CEST)
- Subject: Re: Fix ICE with -fauto-profile when walking vdefs
- Authentication-results: sourceware.org; auth=none
- References: <CAFk3UF-kgPKNpFmBsfSs_YH8iY=CN9W8dAkX9P3-gka4zbetvg@mail.gmail.com> <BF4FA606-5436-4C39-A7E9-41788FCA64DB@suse.de> <CAFk3UF-t=_yU8J_xH3K86MMavmUj_YsEbGy0=aFg9-PRYW3Rvg@mail.gmail.com> <8CB9ADFC-78AE-4058-A777-0EBB8D72DC3D@suse.de> <CAFk3UF_e+653MEPr4YR=tdKX=969WnNHt+0640NCUUk-yT+EdA@mail.gmail.com>
On Fri, 31 Mar 2017, Sebastian Pop wrote:
> On Fri, Mar 31, 2017 at 1:50 PM, Richard Biener <rguenther@suse.de> wrote:
> > That looks like a workaround rather than the correct fix. Who sets .MEM? It should assign the proper def.
> >
>
> Moving the auto_profile pass above several other passes fixes the problem.
> The minimal change to fix the problem is by disabling these two passes:
>
> --- a/gcc/passes.def
> +++ b/gcc/passes.def
> @@ -86,14 +86,12 @@ along with GCC; see the file COPYING3. If not see
> NEXT_PASS (pass_ccp, false /* nonzero_p */);
> /* After CCP we rewrite no longer addressed locals into SSA
> form if possible. */
> - NEXT_PASS (pass_forwprop);
> NEXT_PASS (pass_early_thread_jumps);
> NEXT_PASS (pass_sra_early);
> /* pass_build_ealias is a dummy pass that ensures that we
> execute TODO_rebuild_alias at this point. */
> NEXT_PASS (pass_build_ealias);
> NEXT_PASS (pass_fre);
> - NEXT_PASS (pass_early_vrp);
> NEXT_PASS (pass_merge_phi);
> NEXT_PASS (pass_dse);
> NEXT_PASS (pass_cd_dce);
>
> It seems to me that early_vrp is the one changing the IR in an inconsistent way.
No, that would have bombed in verify_ssa.