[llvm] [LLVM] Add a C API for creating instructions with custom syncscopes. (PR #104775)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 03:20:15 PDT 2024


================
@@ -4611,6 +4629,22 @@ int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
 LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst);
 void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread);
 
+/**
+ * Returns whether an instruction is an atomic instruction, e.g., atomicrmw,
+ * cmpxchg, fence, or loads and stores with atomic ordering.
+ */
+LLVMBool LLVMIsAtomic(LLVMValueRef Inst);
----------------
nikic wrote:

Looks like we currently don#t have any functions named `LLVMInstructionIs*`, so I think this is ok.

https://github.com/llvm/llvm-project/pull/104775


More information about the llvm-commits mailing list