Skip to content

Commit 8b2290d

Browse files
authored
[Atomic][doc] Fix outdated hook name and description (#66989)
`setInsertFencesForAtomic` is `shouldInsertFencesForAtomic` now.
1 parent 079b8ba commit 8b2290d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/docs/Atomics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ Atomics and Codegen
409409
Atomic operations are represented in the SelectionDAG with ``ATOMIC_*`` opcodes.
410410
On architectures which use barrier instructions for all atomic ordering (like
411411
ARM), appropriate fences can be emitted by the AtomicExpand Codegen pass if
412-
``setInsertFencesForAtomic()`` was used.
412+
``shouldInsertFencesForAtomic()`` returns true.
413413

414414
The MachineMemOperand for all atomic operations is currently marked as volatile;
415415
this is not correct in the IR sense of volatile, but CodeGen handles anything

llvm/lib/Target/XCore/XCoreISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ LowerATOMIC_LOAD(SDValue Op, SelectionDAG &DAG) const {
936936
assert(N->getOpcode() == ISD::ATOMIC_LOAD && "Bad Atomic OP");
937937
assert((N->getSuccessOrdering() == AtomicOrdering::Unordered ||
938938
N->getSuccessOrdering() == AtomicOrdering::Monotonic) &&
939-
"setInsertFencesForAtomic(true) expects unordered / monotonic");
939+
"shouldInsertFencesForAtomic(true) expects unordered / monotonic");
940940
if (N->getMemoryVT() == MVT::i32) {
941941
if (N->getAlign() < Align(4))
942942
report_fatal_error("atomic load must be aligned");
@@ -967,7 +967,7 @@ LowerATOMIC_STORE(SDValue Op, SelectionDAG &DAG) const {
967967
assert(N->getOpcode() == ISD::ATOMIC_STORE && "Bad Atomic OP");
968968
assert((N->getSuccessOrdering() == AtomicOrdering::Unordered ||
969969
N->getSuccessOrdering() == AtomicOrdering::Monotonic) &&
970-
"setInsertFencesForAtomic(true) expects unordered / monotonic");
970+
"shouldInsertFencesForAtomic(true) expects unordered / monotonic");
971971
if (N->getMemoryVT() == MVT::i32) {
972972
if (N->getAlign() < Align(4))
973973
report_fatal_error("atomic store must be aligned");

0 commit comments

Comments
 (0)