This patch adds an implementation for the
`avoid_store_forwarding_reorder_cost_p`
function on AArch64, which always returns `true`, as we have observed that in
most cases the ASF tranformation is profitable on this target.
gcc/ChangeLog:
* config/aarch64/aarch64.cc
(aarch64_avoid_store_forwarding_reorder_cost_p): New function.
(TARGET_AVOID_STORE_FORWARDING_REORDER_COST_P): New definition.
Signed-off-by: Konstantinos Eleftheriou <[email protected]>
---
(no changes since v1)
gcc/config/aarch64/aarch64.cc | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 74e2f20de4e1..a752a6f8f269 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -31985,6 +31985,15 @@ aarch64_check_target_clone_version (string_slice str,
location_t *loc)
gcc_unreachable ();
}
+/* Implement TARGET_AVOID_STORE_FORWARDING_REORDER_COST_P. */
+
+static bool
+aarch64_avoid_store_forwarding_reorder_cost_p (machine_mode, machine_mode,
+ HOST_WIDE_INT)
+{
+ return true;
+}
+
/* Target-specific selftests. */
#if CHECKING_P
@@ -32521,6 +32530,10 @@ aarch64_libgcc_floating_mode_supported_p
#undef TARGET_INSN_COST
#define TARGET_INSN_COST aarch64_insn_cost
+#undef TARGET_AVOID_STORE_FORWARDING_REORDER_COST_P
+#define TARGET_AVOID_STORE_FORWARDING_REORDER_COST_P \
+ aarch64_avoid_store_forwarding_reorder_cost_p
+
#undef TARGET_SCALAR_MODE_SUPPORTED_P
#define TARGET_SCALAR_MODE_SUPPORTED_P aarch64_scalar_mode_supported_p
--
2.50.1