Add singlethreaded fence intrinsics.
These new intrinsics are comparable to `atomic_signal_fence` in C++, ensuring the compiler will not reorder memory accesses across the barrier, nor will it emit any machine instructions for it. Closes #24118, implementing RFC 888.
This commit is contained in:
@@ -189,8 +189,10 @@ extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B,
|
||||
failure_order
|
||||
));
|
||||
}
|
||||
extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B, AtomicOrdering order) {
|
||||
return wrap(unwrap(B)->CreateFence(order));
|
||||
extern "C" LLVMValueRef LLVMBuildAtomicFence(LLVMBuilderRef B,
|
||||
AtomicOrdering order,
|
||||
SynchronizationScope scope) {
|
||||
return wrap(unwrap(B)->CreateFence(order, scope));
|
||||
}
|
||||
|
||||
extern "C" void LLVMSetDebug(int Enabled) {
|
||||
|
||||
Reference in New Issue
Block a user