Commit dcf89d57 by Martin Jambor Committed by Martin Jambor

[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.

From-SVN: r232215
parent fa59e957
2016-01-11 Martin Jambor <mjambor@suse.cz> 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.
2016-01-11 Martin Jambor <mjambor@suse.cz>
PR ipa/66616 PR ipa/66616
* cgraphclones.c (duplicate_thunk_for_node): Copy can_change_signature * cgraphclones.c (duplicate_thunk_for_node): Copy can_change_signature
flag. flag.
......
...@@ -2518,7 +2518,8 @@ estimate_local_effects (struct cgraph_node *node) ...@@ -2518,7 +2518,8 @@ estimate_local_effects (struct cgraph_node *node)
known_aggs_ptrs = agg_jmp_p_vec_for_t_vec (known_aggs); known_aggs_ptrs = agg_jmp_p_vec_for_t_vec (known_aggs);
int devirt_bonus = devirtualization_time_bonus (node, known_csts, int devirt_bonus = devirtualization_time_bonus (node, known_csts,
known_contexts, known_aggs_ptrs); 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; struct caller_statistics stats;
inline_hints hints; inline_hints hints;
......
2016-01-11 Martin Jambor <mjambor@suse.cz>
PR ipa/69044
* gcc.target/i386/chkp-pr69044.c: New test.
2016-01-11 Tom de Vries <tom@codesourcery.com> 2016-01-11 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/69109 PR tree-optimization/69109
......
/* { dg-do compile } */
/* { dg-require-effective-target mpx } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */
int i;
int strncasecmp (char *p1, char *p2, long p3) { return 0; }
int special_command ()
{
if (strncasecmp (0, 0, 0))
i++;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment