[PATCH] D50867: [InstrProf] Use atomic profile counter updates for TSan

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 14:53:22 PDT 2018


vsk added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:608
+    Builder.CreateAtomicRMW(AtomicRMWInst::Add, Addr, Inc->getStep(),
+                            AtomicOrdering::SequentiallyConsistent);
+  } else {
----------------
jfb wrote:
> Counters could just be `relaxed`, no need to use `seq_cst`.
Thanks for calling this out.


https://reviews.llvm.org/D50867





More information about the llvm-commits mailing list