[Patch AArch64 Obvious] Unify branch costs to generic_branch_cost
authorJames Greenhalgh <james.greenhalgh@arm.com>
Wed, 26 Jul 2017 17:39:12 +0000 (17:39 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Wed, 26 Jul 2017 17:39:12 +0000 (17:39 +0000)
All the cores in AArch64 use the pair {1, 3} for their branch costs. As
that is covered by generic_branch_cost, we can just use that directly and
save the tiny amount of redundant code. If in future any core wants to
modify this, they can always add a special-case branch-cost back.

gcc/

* config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
(thunderx2t99_branch_cost): Likewise.
(cortexa35_tunings): Update to use generic_branch_cost.
(cortexa53_tunings): Likewise.
(cortexa57_tunings): Likewise.
(cortexa72_tunings): Likewise.
(cortexa73_tunings): Likewise.
(thunderx2t99_tunings): Likewise.

From-SVN: r250582

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index f2697b12b60d3abaca8e5fdef2aa177bc641e41b..188b0f3bbd2a01490c14db1d7a9edc91f9c66889 100644 (file)
@@ -1,3 +1,14 @@
+2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
+       (thunderx2t99_branch_cost): Likewise.
+       (cortexa35_tunings): Update to use generic_branch_cost.
+       (cortexa53_tunings): Likewise.
+       (cortexa57_tunings): Likewise.
+       (cortexa72_tunings): Likewise.
+       (cortexa73_tunings): Likewise.
+       (thunderx2t99_tunings): Likewise.
+
 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
 
        * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
index d753666ef67fc524260c41f36743df3649a0a98a..31c0d8b692099b3d94110b4c869f5fa21663818e 100644 (file)
@@ -488,20 +488,6 @@ static const struct cpu_branch_cost generic_branch_cost =
   3   /* Unpredictable.  */
 };
 
-/* Branch costs for Cortex-A57.  */
-static const struct cpu_branch_cost cortexa57_branch_cost =
-{
-  1,  /* Predictable.  */
-  3   /* Unpredictable.  */
-};
-
-/* Branch costs for Vulcan.  */
-static const struct cpu_branch_cost thunderx2t99_branch_cost =
-{
-  1,  /* Predictable.  */
-  3   /* Unpredictable.  */
-};
-
 /* Generic approximation modes.  */
 static const cpu_approx_modes generic_approx_modes =
 {
@@ -612,7 +598,7 @@ static const struct tune_params cortexa35_tunings =
   &generic_addrcost_table,
   &cortexa53_regmove_cost,
   &generic_vector_cost,
-  &cortexa57_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost  */
   1, /* issue_rate  */
@@ -638,7 +624,7 @@ static const struct tune_params cortexa53_tunings =
   &generic_addrcost_table,
   &cortexa53_regmove_cost,
   &generic_vector_cost,
-  &cortexa57_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost  */
   2, /* issue_rate  */
@@ -664,7 +650,7 @@ static const struct tune_params cortexa57_tunings =
   &cortexa57_addrcost_table,
   &cortexa57_regmove_cost,
   &cortexa57_vector_cost,
-  &cortexa57_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost  */
   3, /* issue_rate  */
@@ -690,7 +676,7 @@ static const struct tune_params cortexa72_tunings =
   &cortexa57_addrcost_table,
   &cortexa57_regmove_cost,
   &cortexa57_vector_cost,
-  &cortexa57_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost  */
   3, /* issue_rate  */
@@ -716,7 +702,7 @@ static const struct tune_params cortexa73_tunings =
   &cortexa57_addrcost_table,
   &cortexa57_regmove_cost,
   &cortexa57_vector_cost,
-  &cortexa57_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost.  */
   2, /* issue_rate.  */
@@ -871,7 +857,7 @@ static const struct tune_params thunderx2t99_tunings =
   &thunderx2t99_addrcost_table,
   &thunderx2t99_regmove_cost,
   &thunderx2t99_vector_cost,
-  &thunderx2t99_branch_cost,
+  &generic_branch_cost,
   &generic_approx_modes,
   4, /* memmov_cost.  */
   4, /* issue_rate.  */