===================================================================
@@ -1606,9 +1606,12 @@ devirtualization_time_bonus (struct cgra
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
===================================================================
@@ -919,6 +919,12 @@ DEFPARAM (PARAM_IPA_CP_LOOP_HINT_BONUS,
"bounds or strides known.",
64, 0, 0)
+DEFPARAM (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS,
+ "ipa-cp-array-index-hint-bonus",
+ "Compile-time bonus IPA-CP assigns to candidates which make an array "
+ "index known.",
+ 48, 0, 0)
+
/* WHOPR partitioning configuration. */
DEFPARAM (PARAM_LTO_PARTITIONS,