aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-12-05 08:51:53 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-12-05 08:51:53 +0000
commit89faf322d87cbfad71c079acc8b96a5a145a60f7 (patch)
tree06f9d8d603ca3da5bab04e63d6fb3e6ded7f762d /gcc/ipa-inline.c
parent5275901c43a4c3f8feb32999af281ae5d009bac6 (diff)
downloadgcc-89faf322d87cbfad71c079acc8b96a5a145a60f7.zip
gcc-89faf322d87cbfad71c079acc8b96a5a145a60f7.tar.gz
gcc-89faf322d87cbfad71c079acc8b96a5a145a60f7.tar.bz2
cgraph.c (cgraph_create_edge_1): Initialize call_stmt_cannot_inline_p from the stmt if possible.
2011-12-05 Richard Guenther <rguenther@suse.de> * cgraph.c (cgraph_create_edge_1): Initialize call_stmt_cannot_inline_p from the stmt if possible. (cgraph_make_edge_direct): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Do not call gimple_call_set_cannot_inline. * gimple.h (enum gf_mask): Remove GF_CALL_CANNOT_INLINE, shift values. (gimple_call_set_cannot_inline): Remove. (gimple_call_cannot_inline_p): Likewise. * ipa-inline-analysis.c (initialize_inline_failed): Look at the edge call_stmt_cannot_inline_p flag. * ipa-inline.c (can_inline_edge_p): Likewise. (early_inliner): Only update the edge flag. * ipa-prop.c (update_indirect_edges_after_inlining): Likewise. (ipa_modify_call_arguments): Do not call gimple_call_set_cannot_inline. * cgraphunit.c (assemble_thunk): Likewise. * gimple-fold.c (gimple_fold_call): Likewise. * tree.h (CALL_CANNOT_INLINE_P): Remove. * tree-mudflap.c (mf_xform_statements): Do not modify alloca calls. * builtins.c (expand_builtin_alloca): With -fmudflap do not expand alloca calls inline. * cfgexpand.c (expand_call_stmt): Do not set CALL_CANNOT_INLINE_P. * gimple.c (gimple_build_call_from_tree): Do not read CALL_CANNOT_INLINE_P. * gimplify.c (gimplify_call_expr): Do not copy CALL_CANNOT_INLINE_P. From-SVN: r182001
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index e3c6b3c..59852b5 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -246,14 +246,6 @@ can_inline_edge_p (struct cgraph_edge *e, bool report)
struct function *caller_cfun = DECL_STRUCT_FUNCTION (e->caller->decl);
struct function *callee_cfun
= callee ? DECL_STRUCT_FUNCTION (callee->decl) : NULL;
- bool call_stmt_cannot_inline_p;
-
- /* If E has a call statement in it, use the inline attribute from
- the statement, otherwise use the inline attribute in E. Edges
- will not have statements when working in WPA mode. */
- call_stmt_cannot_inline_p = (e->call_stmt)
- ? gimple_call_cannot_inline_p (e->call_stmt)
- : e->call_stmt_cannot_inline_p;
if (!caller_cfun && e->caller->clone_of)
caller_cfun = DECL_STRUCT_FUNCTION (e->caller->clone_of->decl);
@@ -278,7 +270,7 @@ can_inline_edge_p (struct cgraph_edge *e, bool report)
e->inline_failed = CIF_OVERWRITABLE;
return false;
}
- else if (call_stmt_cannot_inline_p)
+ else if (e->call_stmt_cannot_inline_p)
{
e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
inlinable = false;
@@ -1957,8 +1949,10 @@ early_inliner (void)
= estimate_num_insns (edge->call_stmt, &eni_size_weights);
es->call_stmt_time
= estimate_num_insns (edge->call_stmt, &eni_time_weights);
- edge->call_stmt_cannot_inline_p
- = gimple_call_cannot_inline_p (edge->call_stmt);
+ if (edge->callee->decl
+ && !gimple_check_call_matching_types (edge->call_stmt,
+ edge->callee->decl))
+ edge->call_stmt_cannot_inline_p = true;
}
timevar_pop (TV_INTEGRATION);
iterations++;