[PATCH] D94784: [llvm][nvptx] add atomicity to counter in ISelLowering
Benjamin Kramer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 09:43:30 PST 2021
bkramer accepted this revision.
bkramer added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:68
-static unsigned int uniqueCallSite = 0;
+static std::atomic<unsigned> GlobalUniqueCallSite = ATOMIC_VAR_INIT(0);
----------------
Unnecessary, globals are always initialized to 0.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:1246
const SmallVectorImpl<ISD::OutputArg> &Outs, MaybeAlign retAlignment,
- const CallBase &CB) const {
+ const CallBase &CB, const unsigned &UniqueCallSite) const {
auto PtrVT = getPointerTy(DL);
----------------
Just pass `unsigned` by value
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94784/new/
https://reviews.llvm.org/D94784
More information about the llvm-commits
mailing list