> On 2015.01.20 at 21:04 +0100, Jan Hubicka wrote:
> > this patch fixes ICE in ipa_merge_profiles on speculative edges. 
> > 
> > Bootstrapped/regtested x86_64-linux, comitted. Also tested by Markus on
> > Firefox build.
> 
> This needs one additional fix. See below.
> 
> Otherwise it will crash:
> 
> lto1: internal compiler error: Segmentation fault
> 0xa12f6f crash_signal
>         ../../gcc/gcc/toplev.c:381
> 0x88b190 ipa_merge_profiles(cgraph_node*, cgraph_node*)
>         ../../gcc/gcc/ipa-utils.c:637
> 0x603722 lto_cgraph_replace_node
>         ../../gcc/gcc/lto/lto-symtab.c:124
> 0x604cf3 lto_symtab_merge_symbols_1
>         ../../gcc/gcc/lto/lto-symtab.c:619
> 0x604cf3 lto_symtab_merge_symbols()
>         ../../gcc/gcc/lto/lto-symtab.c:647
> 0x5fa52e read_cgraph_and_symbols
>         ../../gcc/gcc/lto/lto.c:3109
> 0x5fa52e lto_main()
>         ../../gcc/gcc/lto/lto.c:3436
> Please submit a full bug report,
> with preprocessed source if appropriate.

I see, thanks.  It means that we do have comdats that diverge in their call 
statements.
I guess we ought to just cancel merging in that case, otherwise the profile can 
be completely
off :(
I will need to write some call target compare then. So far the code assumes 
that if #of BBs match
then the bodies match and proceeds with merging.

Martin, perhaps we can re-use some of ipa-icf infrastructure here to quickly 
check that at least
CFG shapes and call targets match?

I will commit this hack for now; hopefully it is only infrequent side case.

Honza

Reply via email to