summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 14:06:20 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-26 14:06:20 +0000
commit3c97c75dbc59497ed3a56c20eb66a50f554c4a6a (patch)
tree4e831ce4ac2924d53233e6215470e4dbd88eea9a /gcc/cgraphunit.c
parent781e865e57a326f2336833e05f25de3ce4dc1fb3 (diff)
downloadgcc-3c97c75dbc59497ed3a56c20eb66a50f554c4a6a.tar.gz
PR target/47237
* cgraph.h (cgraph_local_info): New field can_change_signature. * ipa-cp.c (ipcp_update_callgraph): Only compute args_to_skip if callee signature can change. (ipcp_estimate_growth): Call sequence simplify only if calle signature can change. (ipcp_insert_stage): Only compute args_to_skip if signature can change. (cgraph_function_versioning): We can not change signature of functions that don't allow that. * lto-cgraph.c (lto_output_node): Stream local.can_change_signature. (lto_input_node): Likewise. * ipa-inline.c (compute_inline_parameters): Compute local.can_change_signature. * ipa-split.c (visit_bb): Never split away APPLY_ARGS. * tree-sra.c (ipa_sra_preliminary_function_checks): Give up on functions that can not change signature. * i386.c (ix86_function_regparm, ix86_function_sseregparm, init_cumulative_args): Do not use local calling conventions for functions that can not change signature. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 2eb3285290b..2245164c3eb 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2014,6 +2014,8 @@ cgraph_function_versioning (struct cgraph_node *old_version_node,
if (!tree_versionable_function_p (old_decl))
return NULL;
+ gcc_assert (old_version_node->local.can_change_signature || !args_to_skip);
+
/* Make a new FUNCTION_DECL tree node for the
new version. */
if (!args_to_skip)