http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48836

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-04-30 
16:32:30 UTC ---
The reason why we conclude updating is needed is redirecting of callees:
#0  0x00000000006abdd4 in bitmap_element_link (head=0x7ffff539b760,
bit=Unhandled dwarf expression opcode 0xf3
) at ../../gcc/bitmap.c:431
#1  bitmap_set_bit (head=0x7ffff539b760, bit=Unhandled dwarf expression opcode
0xf3
) at ../../gcc/bitmap.c:653
#2  0x0000000000a7225a in finalize_ssa_defs (stmt=0x7ffff349a720) at
../../gcc/tree-ssa-operands.c:463
#3  finalize_ssa_stmt_operands (stmt=0x7ffff349a720) at
../../gcc/tree-ssa-operands.c:566
#4  build_ssa_operands (stmt=0x7ffff349a720) at
../../gcc/tree-ssa-operands.c:1078
#5  update_stmt_operands (stmt=0x7ffff349a720) at
../../gcc/tree-ssa-operands.c:1137
#6  0x0000000000b9fe63 in cgraph_redirect_edge_call_stmt_to_callee
(e=0x7ffff30f1548) at ../../gcc/cgraphunit.c:2209
#7  0x0000000000bb47d3 in inline_transform (node=Unhandled dwarf expression
opcode 0xf3
) at ../../gcc/ipa-inline-transform.c:305


We are probably right that update_ssa TODO should be dropped with aliasing on.

This patch fixes the problem, but I am not sure it is the best approach around.
Index: ipa-inline-transform.c
===================================================================
--- ipa-inline-transform.c      (revision 173216)
+++ ipa-inline-transform.c      (working copy)
@@ -45,6 +45,7 @@
 #include "ipa-prop.h"
 #include "ipa-inline.h"
 #include "tree-inline.h"
+#include "tree-pass.h"

 int ncalls_inlined;
 int nfunctions_inlined;
@@ -305,6 +306,9 @@
       cgraph_redirect_edge_call_stmt_to_callee (e);
       if (!e->inline_failed || warn_inline)
         inline_p = true;
+      /* Redirecting edges might lead to a need for vops to be recomputed.  */
+      if (need_ssa_update_p (cfun))
+       todo |= TODO_update_ssa_only_virtuals;
     }

   if (inline_p)

Reply via email to