summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2013-03-20 17:20:22 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2013-03-20 17:20:22 +0100
commit19321415eedc7cde0db631fb9a4dfbf36d351660 (patch)
treea434eb85e3009252d458c9b59655cf3c3b1a0e64 /gcc/ipa-cp.c
parentc6d5ff8310ce6c8c675b9be815bcb091e6cb51ba (diff)
downloadgcc-19321415eedc7cde0db631fb9a4dfbf36d351660.tar.gz
params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): New parameter.
2013-03-20 Martin Jambor <mjambor@suse.cz> * params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): New parameter. * ipa-cp.c (hint_time_bonus): Add abonus for known array indices. From-SVN: r196832
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index d01b053a3f9..69d7d23acb2 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1622,9 +1622,12 @@ devirtualization_time_bonus (struct cgraph_node *node,
static int
hint_time_bonus (inline_hints hints)
{
+ int result = 0;
if (hints & (INLINE_HINT_loop_iterations | INLINE_HINT_loop_stride))
- return PARAM_VALUE (PARAM_IPA_CP_LOOP_HINT_BONUS);
- return 0;
+ result += PARAM_VALUE (PARAM_IPA_CP_LOOP_HINT_BONUS);
+ if (hints & INLINE_HINT_array_index)
+ result += PARAM_VALUE (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS);
+ return result;
}
/* Return true if cloning NODE is a good idea, given the estimated TIME_BENEFIT