A few places in the arm and aarch64 backends check whether an atomic operation needs acquire or release semantics.
A few places in the arm and aarch64 backends check whether an atomic
operation needs acquire or release semantics.
This is generally done with a check like
(is_mm_relaxed (model)
|| is_mm_consume (model)
|| is_mm_release (model))
In this patch we introduce two helper functions to make things a little
tidier.
There are a few places in the arm/ backend that check whether an
operation needs memory model semantics with an idiom that can now be
replaced with the new aarch_mm_needs_* functions, so we make that
replacement.
There is also some backslash removal to make things a little tidier.
Full bootstrap and regression test plus cross-compilation regression tests done
on arm-none-linux-gnueabihf.
Ok for trunk?
gcc/ChangeLog:
2018-09-20 Matthew Malcomson <matthew.malcomson@arm.com>
* config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
Use new helper functions.
* config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
Use new helper functions.
* config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
aarch_mm_needs_release): New declarations.
* config/arm/aarch-common.c (aarch_mm_needs_acquire,
aarch_mm_needs_release): New.
From-SVN: r264598