summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-11 10:09:17 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-11 10:09:17 +0000
commitff375d11bfdf9c36d679967652e80efd6a597a25 (patch)
tree086f88caa72ec423d6a48e38183d429a5fd6f9dc /gcc/ipa-cp.c
parent2ebf191d9a9429c4ccfa1affd48a65e9ab3a723e (diff)
downloadgcc-ff375d11bfdf9c36d679967652e80efd6a597a25.tar.gz
[PR ipa/69044] Do not clone for param removal when not possible
2016-01-11 Martin Jambor <mjambor@suse.cz> PR ipa/69044 * ipa-cp.c (estimate_local_effects): Do not clone for removal of useless parameters if we cannot change function signature. testsuite/ * gcc.target/i386/chkp-pr69044.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232215 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index e17cc57f20c..5900d4d9158 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -2518,7 +2518,8 @@ estimate_local_effects (struct cgraph_node *node)
known_aggs_ptrs = agg_jmp_p_vec_for_t_vec (known_aggs);
int devirt_bonus = devirtualization_time_bonus (node, known_csts,
known_contexts, known_aggs_ptrs);
- if (always_const || devirt_bonus || removable_params_cost)
+ if (always_const || devirt_bonus
+ || (removable_params_cost && node->local.can_change_signature))
{
struct caller_statistics stats;
inline_hints hints;