params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): New parameter.
authorMartin Jambor <mjambor@suse.cz>
Wed, 20 Mar 2013 16:20:22 +0000 (17:20 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 20 Mar 2013 16:20:22 +0000 (17:20 +0100)
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

gcc/ChangeLog
gcc/ipa-cp.c
gcc/params.def

index 1cc25b054b1eaae0f41830abe96c4e2eb257baff..217fe3bee6c05b496ca2be3d8a3211135317a14b 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2013-03-20  Pat Haugen <pthaugen@us.ibm.com>
 
        * config/rs6000/predicates.md (indexed_address, update_address_mem
index d01b053a3f9b7ac82e5aba19cbbeccb0305d01db..69d7d23acb2b218273486a4420d23704c054e241 100644 (file)
@@ -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
index 97d485745874f80977151bfe824cb6bc93ca3ed6..a25b8bce1ddc1e09dfbb43c0fe09b93ac3f883f2 100644 (file)
@@ -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,