diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-23 10:28:06 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-23 10:28:06 +0000 |
commit | 46f8e3b0dc1cbb88c7dde984d0f0c2ce8935011d (patch) | |
tree | efd8e61a3d2ff9dcff5eb5bf03e25922191f7df5 /gcc/ipa-inline.c | |
parent | e22d2ad745ca3d2ac08936833a802ffc161fc89b (diff) | |
download | gcc-46f8e3b0dc1cbb88c7dde984d0f0c2ce8935011d.tar.gz |
Add ability to set target options (ix86 only) and optimization options on a function specific basis
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 6d74c1f71b7..b7f1597691a 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -954,6 +954,14 @@ cgraph_decide_inlining_of_small_functions (void) } continue; } + if (!tree_can_inline_p (edge->caller->decl, edge->callee->decl)) + { + CALL_STMT_CANNOT_INLINE_P (edge->call_stmt) = true; + edge->inline_failed = N_("target specific option mismatch"); + if (dump_file) + fprintf (dump_file, " inline_failed:%s.\n", edge->inline_failed); + continue; + } if (cgraph_recursive_inlining_p (edge->caller, edge->callee, &edge->inline_failed)) { @@ -1098,6 +1106,11 @@ cgraph_decide_inlining (void) if (cgraph_recursive_inlining_p (e->caller, e->callee, &e->inline_failed)) continue; + if (!tree_can_inline_p (e->caller->decl, e->callee->decl)) + { + CALL_STMT_CANNOT_INLINE_P (e->call_stmt) = true; + continue; + } cgraph_mark_inline_edge (e, true); if (dump_file) fprintf (dump_file, @@ -1322,6 +1335,17 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, } continue; } + if (!tree_can_inline_p (node->decl, e->callee->decl)) + { + CALL_STMT_CANNOT_INLINE_P (e->call_stmt) = true; + if (dump_file) + { + indent_to (dump_file, depth); + fprintf (dump_file, + "Not inlining: Target specific option mismatch.\n"); + } + continue; + } if (gimple_in_ssa_p (DECL_STRUCT_FUNCTION (node->decl)) != gimple_in_ssa_p (DECL_STRUCT_FUNCTION (e->callee->decl))) { @@ -1418,6 +1442,17 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, } continue; } + if (!tree_can_inline_p (node->decl, e->callee->decl)) + { + CALL_STMT_CANNOT_INLINE_P (e->call_stmt) = true; + if (dump_file) + { + indent_to (dump_file, depth); + fprintf (dump_file, + "Not inlining: Target specific option mismatch.\n"); + } + continue; + } if (cgraph_default_inline_p (e->callee, &failed_reason)) inlined |= try_inline (e, mode, depth); else if (!flag_unit_at_a_time) |