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: Fix ICE with -fauto-profile when walking vdefs


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)


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