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

--- Comment #23 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-10 00:21:35 
UTC ---
> 5386    
> 5387      /* Allow the backend to decide if inlining is ok.  */
> 5388      if (!targetm.target_option.can_inline_p (caller, callee))
> 5389        {
> 5390          e->inline_failed = CIF_TARGET_OPTION_MISMATCH;
> 5391          gimple_call_set_cannot_inline (e->call_stmt, true);
> 5392          e->call_stmt_cannot_inline_p = true;
> 5393          return false;
> 5394        }
> 5395    
> (gdb) p e
> $1 = (struct cgraph_edge *) 0x7fffdaf9fd68
> (gdb) p e->call_stmt
> $2 = (union gimple_statement_d *) 0x0
> (gdb)
Obviously we can not set gimple_call_set_cannot_inline when call_stmt is
missing.
I guess just guardining the set with
if (e->call_stmt)
  gimple_call_set_cannot_inline (e->call_stmt, true);
in all occurences in the function should fix the issue. Consider it preaproved
if it helps.  In 4.7 we probably should drop the gimple_call_set_cannot_inline
calls completely, I don't see any value in them.

Can you do dump_cgraph_node (stderr, e->caller) and dump_cgraph_node (stderr,
e->callee)??  I think we should decide function to be uninlinable only in
presence of target optimization attributes and I can not think of any during
the bootstrap....

Honza

Reply via email to