summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 11:59:51 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 11:59:51 +0000
commitb868178827535fc486145bb412cc52d151bf4941 (patch)
treed5b42adfb7238acffc09b8dfa4f33bfe9f65cbab /gcc/ipa-inline-analysis.c
parentfa1fb6f0b8b3a53817ae81b8361f01f50d649d7e (diff)
downloadgcc-b868178827535fc486145bb412cc52d151bf4941.tar.gz
Correctly fill up cgraph_node::local.versionable flag.
* cgraphclones.c (cgraph_node::create_virtual_clone): Verify cgraph_node.local.versionable instead of calling tree_versionable_function_p. * ipa-cp.c (determine_versionability): Save the information to ipa_node_params summary. (ipcp_versionable_function_p): Use it. (ipcp_propagate_stage): Pass IPA_NODE_REF to a called function. (ipcp_generate_summary): Do not compute cgraph_node versionability. * ipa-inline-analysis.c (inline_generate_summary): Compute versionability for all cgraph nodes. * ipa-prop.c (ipa_node_params_t::duplicate): Duplicate ipa_node_params::versionability. * ipa-prop.h (struct ipa_node_params): Declare it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229055 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 38e1ec0d5c5..35322ccae57 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -4112,6 +4112,10 @@ inline_generate_summary (void)
{
struct cgraph_node *node;
+ FOR_EACH_DEFINED_FUNCTION (node)
+ if (DECL_STRUCT_FUNCTION (node->decl))
+ node->local.versionable = tree_versionable_function_p (node->decl);
+
/* When not optimizing, do not bother to analyze. Inlining is still done
because edge redirection needs to happen there. */
if (!optimize && !flag_generate_lto && !flag_generate_offload && !flag_wpa)