Created attachment 24152 [details] testcase. jh@evans:/abuild/jh/build-mozilla-new11-lto-noelfhackO3/extensions/spellcheck/src> /abuild/jh/trunk-install/bin/g++ -O3 ~/mozInlineSpellWordUtil.ii -flto -fno-strict-aliasing -S -g -fno-exceptions /abuild/jh/mozilla-central2/mozilla-central/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp: In member function '_ZNK14WordSplitState17ClassifyCharacterEii.constprop.25': /abuild/jh/mozilla-central2/mozilla-central/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp:863:1: internal compiler error: in execute_todo, at passes.c:1261 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
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)
+ /* Redirecting edges might lead to a need for vops to be recomputed. */ + if (need_ssa_update_p (cfun)) you can omit that check, the updater won't do anything if there is nothing to do.
> + /* Redirecting edges might lead to a need for vops to be recomputed. */ > + if (need_ssa_update_p (cfun)) > > you can omit that check, the updater won't do anything if there is nothing > to do. Yep, I worked that out in meantime. So should I re-check with that change and commit? Thanks, Honza
Author: hubicka Date: Sun Jun 12 18:08:52 2011 New Revision: 174970 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174970 Log: PR middle-end/48836 * ipa-inline-transform.c: Include tree-pass.h (inline_transform): Set TODO_update_ssa_only_virtuals. * Makefile.in (ipa-inline-transform.o): Add tree-pass.h. Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/ipa-inline-transform.c
Fixed.