[PATCH] D141311: [RISCV] Avoid emitting hardware fences for singlethread fences
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 11:20:22 PST 2023
reames created this revision.
reames added reviewers: craig.topper, kito-cheng, asb, frasercrmck.
Herald added subscribers: sunshaoce, VincentWu, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
singlethread fences only synchronize with code running on the same hardware thread (i.e. signal handlers). Because of this, we need to prevent instruction rewordering, but do not need to emit hardware fence instructions.
The implementation strategy here matches many other backends. The main motivation of this patch is to introduce the MEMBARRIER node and get some test coverage for it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141311
Files:
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/test/CodeGen/RISCV/atomic-fence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141311.487510.patch
Type: text/x-patch
Size: 4847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230109/d3555b0f/attachment.bin>
More information about the llvm-commits
mailing list