diff options
author | Patrick O'Neill <patrick@rivosinc.com> | 2023-04-05 09:49:20 -0700 |
---|---|---|
committer | Patrick O'Neill <patrick@rivosinc.com> | 2023-05-02 13:08:04 -0700 |
commit | 942ab49b5f8955371cf5db23608ba5f5f5244152 (patch) | |
tree | 224064d4b8c0e99acdd7ad6fcfa6a0f247b5a0e3 /gcc/tree-ssa-phiopt.cc | |
parent | 08c5d1804a027f1e4bee4ed5fda25522d9ac8806 (diff) | |
download | gcc-942ab49b5f8955371cf5db23608ba5f5f5244152.zip gcc-942ab49b5f8955371cf5db23608ba5f5f5244152.tar.gz gcc-942ab49b5f8955371cf5db23608ba5f5f5244152.tar.bz2 |
RISC-V: Weaken LR/SC pairs
Introduce the %I and %J flags for setting the .aqrl bits on LR/SC pairs
as needed.
Atomic compare and exchange ops provide success and failure memory
models. C++17 and later place no restrictions on the relative strength
of each model, so ensure we cover both by using a model that enforces
the ordering of both given models.
This change brings LR/SC ops in line with table A.6 of the ISA manual.
2023-04-27 Patrick O'Neill <patrick@rivosinc.com>
gcc/ChangeLog:
* config/riscv/riscv-protos.h (riscv_union_memmodels): Expose
riscv_union_memmodels function to sync.md.
* config/riscv/riscv.cc (riscv_union_memmodels): Add function to
get the union of two memmodels in sync.md.
(riscv_print_operand): Add %I and %J flags that output the
optimal LR/SC flag bits for a given memory model.
* config/riscv/sync.md: Remove static .aqrl bits on LR op/.rl
bits on SC op and replace with optimized %I, %J flags.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions