[PATCH] D21723: [RFC] Enhance synchscope representation
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 15:29:54 PDT 2017
kzhuravl added inline comments.
================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:4600
+ return SyncScope::ID(Val);
+ return SSIDs[Val];
+}
----------------
t-tye wrote:
> t-tye wrote:
> > Should this assert(Val < SSIDs.size()) to ensure that the bitcode is not using a value that is not in the SYNC_SCOPE_NAMES_BLOCK_ID block?
> Actually, since it is the bit code reader I guess it should use error().
>
> ```
> if (Val > SSIDs.size())
> return error("Invalid sync scope");
> return SSIDs[Val];
> ```
Mapped unknown to system as it was done before.
================
Comment at: lib/IR/Core.cpp:2747
LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering Ordering,
LLVMBool isSingleThread, const char *Name) {
return wrap(
----------------
t-tye wrote:
> Should this and the other atomic instruction support building with a syncscope?
I am not sure. Added a TODO.
https://reviews.llvm.org/D21723
More information about the llvm-commits
mailing list