+2007-06-25 Jan Hubicka <jh@suse.cz>
+
+ * ipa-inline.c (cgraph_mark_inline): Assert that we never inline
+ uninlinable call.
+ (cgraph_decide_inlining_of_small_function, cgraph_decide_inlining,
+ cgraph_decide_inlining_incrementally): Move uninlinability checks to
+ places other call site specific checks are performed.
+
2007-06-25 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/32421
struct cgraph_node *what = edge->callee;
struct cgraph_edge *e, *next;
+ gcc_assert (!CALL_CANNOT_INLINE_P (edge->call_stmt));
/* Look for all calls, mark them inline and clone recursively
all inlined functions. */
for (e = what->callers; e; e = next)
{
next = e->next_caller;
- if (e->caller == to && e->inline_failed
- && !CALL_CANNOT_INLINE_P (e->call_stmt))
+ if (e->caller == to && e->inline_failed)
{
cgraph_mark_inline_edge (e, true);
if (e == edge)
}
gcc_assert (edge->aux);
edge->aux = NULL;
- if (!edge->inline_failed || CALL_CANNOT_INLINE_P (edge->call_stmt))
+ if (!edge->inline_failed)
continue;
/* When not having profile info ready we don't weight by any way the
else
{
struct cgraph_node *callee;
- if (!cgraph_check_inline_limits (edge->caller, edge->callee,
- &edge->inline_failed, true))
+ if (CALL_CANNOT_INLINE_P (edge->call_stmt)
+ || !cgraph_check_inline_limits (edge->caller, edge->callee,
+ &edge->inline_failed, true))
{
if (dump_file)
fprintf (dump_file, " Not inlining into %s:%s.\n",
if (node->callers && !node->callers->next_caller && !node->needed
&& node->local.inlinable && node->callers->inline_failed
+ && !CALL_CANNOT_INLINE_P (node->callers->call_stmt)
&& !DECL_EXTERNAL (node->decl) && !DECL_COMDAT (node->decl))
{
if (dump_file)
if (!e->callee->local.disregard_inline_limits
&& (mode != INLINE_ALL || !e->callee->local.inlinable))
continue;
+ if (CALL_CANNOT_INLINE_P (e->call_stmt))
+ continue;
/* When the edge is already inlined, we just need to recurse into
it in order to fully flatten the leaves. */
if (!e->inline_failed && mode == INLINE_ALL)
continue;
}
if (!cgraph_check_inline_limits (node, e->callee, &e->inline_failed,
- false))
+ false)
+ || CALL_CANNOT_INLINE_P (e->call_stmt))
{
if (dump_file)
{