diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-01-24 20:48:18 +0000 |
---|---|---|
committer | Yvan Roux <yvan.roux@linaro.org> | 2017-01-30 13:33:38 +0000 |
commit | 64e2a14f0130b24c994431c1ab26add5dbd1bf7d (patch) | |
tree | 080e00a3e6fe5653221c9f3ba8dfe9d47bd78c8c | |
parent | 0ba52ae4f96d71f9640697427cc723f25d713c8e (diff) | |
download | linaro-gcc-64e2a14f0130b24c994431c1ab26add5dbd1bf7d.tar.gz linaro-gcc-64e2a14f0130b24c994431c1ab26add5dbd1bf7d.tar.bz2 linaro-gcc-64e2a14f0130b24c994431c1ab26add5dbd1bf7d.zip |
gcc/
Backport from trunk r244586.
2017-01-18 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
New function.
(TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
Change-Id: Id6f8c329d97ca125353b04ab813a453097bf45c0
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index cbe82bd1862..c2bf18c1689 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -13667,6 +13667,26 @@ aarch64_sched_fusion_priority (rtx_insn *insn, int max_pri, return; } +/* Implement the TARGET_SCHED_ADJUST_PRIORITY hook. + Adjust priority of sha1h instructions so they are scheduled before + other SHA1 instructions. */ + +static int +aarch64_sched_adjust_priority (rtx_insn *insn, int priority) +{ + rtx x = PATTERN (insn); + + if (GET_CODE (x) == SET) + { + x = SET_SRC (x); + + if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_SHA1H) + return priority + 10; + } + + return priority; +} + /* Given OPERANDS of consecutive load/store, check if we can merge them into ldp/stp. LOAD is true if they are load instructions. MODE is the mode of memory operands. */ @@ -14436,6 +14456,9 @@ aarch64_optab_supported_p (int op, machine_mode mode1, machine_mode, #undef TARGET_CAN_USE_DOLOOP_P #define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost +#undef TARGET_SCHED_ADJUST_PRIORITY +#define TARGET_SCHED_ADJUST_PRIORITY aarch64_sched_adjust_priority + #undef TARGET_SCHED_MACRO_FUSION_P #define TARGET_SCHED_MACRO_FUSION_P aarch64_macro_fusion_p |