[PATCH] D67132: [PATCH] Improve support for atomicrmw and cmpxchg in C API.
Nick Lewycky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 15:37:35 PDT 2019
nickwasmer created this revision.
Herald added a reviewer: deadalnix.
Herald added subscribers: llvm-commits, jfb, hiraditya.
Herald added a project: LLVM.
atomicrmw and cmpxchg have a volatile flag, so allow it to be set/get with
LLVMGetVolatile and LLVMSetVolatile. Add missing LLVMAtomicRMWBinOpFAdd and
LLVMAtomicRMWBinOpFSub enum constants. AtomicCmpXchg also has a weak flag,
add a getter/setter for that too. Add a getter/setter for the binary-op of
an atomicrmw.
While fixing atomics, I noticed that LLVMIsA## was missing for CatchSwitchInst,
CallBrInst and FenceInst, as well as AtomicCmpXchgInst and AtomicRMWInst.
Fixed them all.
Update llvm-c-test to include atomicrmw and to copy volatile for all four instructions.
https://reviews.llvm.org/D67132
Files:
llvm/include/llvm-c/Core.h
llvm/lib/IR/Core.cpp
llvm/tools/llvm-c-test/echo.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67132.218555.patch
Type: text/x-patch
Size: 9991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190903/2fa23786/attachment.bin>
More information about the llvm-commits
mailing list