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: Sebastian Pop <sebpop at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 Mar 2017 13:10:51 -0500
- 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>
On Fri, Mar 31, 2017 at 12:06 PM, Richard Biener <rguenther@suse.de> wrote:
> That's not a default definition but bogus SSA form. You have to fix that, not this symptom.
>
Ok.
It also crashes when adding a call to verifty_ssa
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index 4b21340c6f0..b834a40af4d 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -1589,6 +1590,7 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
static void
early_inline ()
{
+ verify_ssa (true, true);
compute_inline_parameters (cgraph_node::get (current_function_decl), true);
unsigned todo = early_inliner (cfun);
if (todo & TODO_update_ssa_any)
The crash is on:
gcc_assert (!need_ssa_update_p (cfun));
and after adding a call to update the SSA, it finishes compilation
without errors.
I am testing the following patch:
* auto-profile.c (early_inline): Call update_ssa.
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -1589,6 +1589,8 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
static void
early_inline ()
{
+ if (need_ssa_update_p (current_function_decl))
+ update_ssa (TODO_update_ssa);
compute_inline_parameters (cgraph_node::get (current_function_decl), true);
unsigned todo = early_inliner (cfun);
if (todo & TODO_update_ssa_any)