Commit 94cd932c by H.J. Lu Committed by H.J. Lu

Check e->call_stmt before calling gimple_call_set_cannot_inline.

2011-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR lto/46760
	* tree-inline.c (tree_can_inline_p): Check e->call_stmt before
	calling gimple_call_set_cannot_inline.

From-SVN: r168631
parent 18c9fa17
2011-01-10 H.J. Lu <hongjiu.lu@intel.com>
PR lto/46760
* tree-inline.c (tree_can_inline_p): Check e->call_stmt before
calling gimple_call_set_cannot_inline.
2011-01-10 Iain Sandoe <iains@gcc.gnu.org> 2011-01-10 Iain Sandoe <iains@gcc.gnu.org>
* config/darwin-sections.def: Remove unused section. * config/darwin-sections.def: Remove unused section.
......
...@@ -5380,6 +5380,7 @@ tree_can_inline_p (struct cgraph_edge *e) ...@@ -5380,6 +5380,7 @@ tree_can_inline_p (struct cgraph_edge *e)
if (inline_forbidden_into_p (caller, callee)) if (inline_forbidden_into_p (caller, callee))
{ {
e->inline_failed = CIF_UNSPECIFIED; e->inline_failed = CIF_UNSPECIFIED;
if (e->call_stmt)
gimple_call_set_cannot_inline (e->call_stmt, true); gimple_call_set_cannot_inline (e->call_stmt, true);
return false; return false;
} }
...@@ -5388,6 +5389,7 @@ tree_can_inline_p (struct cgraph_edge *e) ...@@ -5388,6 +5389,7 @@ tree_can_inline_p (struct cgraph_edge *e)
if (!targetm.target_option.can_inline_p (caller, callee)) if (!targetm.target_option.can_inline_p (caller, callee))
{ {
e->inline_failed = CIF_TARGET_OPTION_MISMATCH; e->inline_failed = CIF_TARGET_OPTION_MISMATCH;
if (e->call_stmt)
gimple_call_set_cannot_inline (e->call_stmt, true); gimple_call_set_cannot_inline (e->call_stmt, true);
e->call_stmt_cannot_inline_p = true; e->call_stmt_cannot_inline_p = true;
return false; return false;
...@@ -5405,6 +5407,7 @@ tree_can_inline_p (struct cgraph_edge *e) ...@@ -5405,6 +5407,7 @@ tree_can_inline_p (struct cgraph_edge *e)
|| !gimple_check_call_args (e->call_stmt))) || !gimple_check_call_args (e->call_stmt)))
{ {
e->inline_failed = CIF_MISMATCHED_ARGUMENTS; e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
if (e->call_stmt)
gimple_call_set_cannot_inline (e->call_stmt, true); gimple_call_set_cannot_inline (e->call_stmt, true);
e->call_stmt_cannot_inline_p = true; e->call_stmt_cannot_inline_p = true;
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment