The avoid-store-forwarding pass is disabled by default and therefore
in the risk of bit-rotting. This patch addresses this by enabling
the pass at O2 or higher on AArch64.
Bootstrapped/regtested on AArch64 and x86_64.
Changes in v5:
- Move `store_bit_field` destination register fix to `store_bit_field_1`.
Changes in v4:
- Enable asf on AArch64 only.
- Remove `avoid_store_forwarding_reorder_cost_p` function.
- Remove `asf-default-cost-value` parameter.
Changes in v3:
- Add `avoid_store_forwarding_reorder_cost_p` function.
- Add `asf-default-cost-value` parameter.
- Use `avoid_store_forwarding_reorder_cost_p` for each store in ASF.
- Update x86_64 testcases.
- Update assembly patterns in `bitfield-bitint-abi-align16.c` and
`bitfield-bitint-abi-align8.c`.
- Fix bug where the result of `store_bit_field` is not used in the
following instructions.
Changes in v2:
- Update assembly patterns in `bitfield-bitint-abi-align16.c` and
`bitfield-bitint-abi-align8.c`.
Changes in v1:
- Enable asf by default at O2 or higher.
Konstantinos Eleftheriou (1):
expmed: Copy back the destination register in store_bit_field_1, when
needed
kelefth (1):
asf: Enable pass at O2 or higher on AArch64
gcc/common/config/aarch64/aarch64-common.cc | 2 ++
gcc/doc/invoke.texi | 2 +-
gcc/expmed.cc | 22 ++++++++++++--
.../aarch64/avoid-store-forwarding-6.c | 29 +++++++++++++++++++
.../aarch64/bitfield-bitint-abi-align16.c | 25 +++++++++-------
.../aarch64/bitfield-bitint-abi-align8.c | 25 +++++++++-------
6 files changed, 79 insertions(+), 26 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/avoid-store-forwarding-6.c
--
2.51.1