From 28d5335f1e7d01bae9ff4c2332f62b210e1c0d61 Mon Sep 17 00:00:00 2001 From: rguenth Date: Sat, 23 Jun 2007 18:17:57 +0000 Subject: 2007-06-23 Richard Guenther PR tree-optimization/16876 PR middle-end/29478 * tree.h (CALL_CANNOT_INLINE_P): New macro to access static_flag for CALL_EXPRs. * tree-inline.c (initialize_inlined_parameters): Do not call lang_hooks.tree_inlining.convert_parm_for_inlining. * cgraphbuild.c (initialize_inline_failed): Set inline failed reason for mismatched types. * gimplify.c (gimplify_call_expr): Verify the call expression arguments match the called function type signature. Otherwise mark the call expression to be not considered for inlining using CALL_CANNOT_INLINE_P flag. * ipa-inline.c (cgraph_mark_inline): Honor CALL_CANNOT_INLINE_P on the edges call expression. (cgraph_decide_inlining_of_small_function): Likewise. (cgraph_decide_inlining): Likewise. * c-objc-common.h (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Remove define. * c-tree.h (c_convert_parm_for_inlining): Remove declaration. * c-typeck.c (c_convert_parm_for_inlining): Remove. * langhooks-def.h (lhd_tree_inlining_convert_parm_for_inlining): Remove declaration. (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): Remove define. * langhooks.c (lhd_tree_inlining_convert_parm_for_inlining): Remove. * langhooks.h (struct lang_hooks_for_tree_inlining): Remove convert_parm_for_inlining member. * gcc.dg/pr29254.c: The warning is bogus. * gcc.dg/warn-1.c: Likewise. * gcc.dg/assign-warn-3.c: Likewise. * gcc.dg/noncompile/pr16876.c: The testcase is bogus, remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125974 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ipa-inline.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gcc/ipa-inline.c') diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index ee9d7e6ca00..c682f86866f 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -288,22 +288,21 @@ cgraph_mark_inline (struct cgraph_edge *edge) struct cgraph_node *to = edge->caller; struct cgraph_node *what = edge->callee; struct cgraph_edge *e, *next; - int times = 0; /* 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) + if (e->caller == to && e->inline_failed + && !CALL_CANNOT_INLINE_P (e->call_stmt)) { cgraph_mark_inline_edge (e, true); if (e == edge) edge = next; - times++; } } - gcc_assert (times); + return edge; } @@ -885,7 +884,7 @@ cgraph_decide_inlining_of_small_functions (void) } gcc_assert (edge->aux); edge->aux = NULL; - if (!edge->inline_failed) + if (!edge->inline_failed || CALL_CANNOT_INLINE_P (edge->call_stmt)) continue; /* When not having profile info ready we don't weight by any way the @@ -1076,7 +1075,7 @@ cgraph_decide_inlining (void) for (e = node->callers; e; e = next) { next = e->next_caller; - if (!e->inline_failed) + if (!e->inline_failed || CALL_CANNOT_INLINE_P (e->call_stmt)) continue; if (cgraph_recursive_inlining_p (e->caller, e->callee, &e->inline_failed)) -- cgit v1.2.1