[PATCH] D150460: [gcov] Add nosanitize metadata to memory access instructions inserted by emitProfileNotes()

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 09:45:51 PDT 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:922
               Counters->getValueType(), Counters, 0, I);
           if (Options.Atomic) {
+            AtomicRMWInst *RMW = Builder.CreateAtomicRMW(
----------------
MaskRay wrote:
> Define `Instruction *Inst` outside before `if`. Call `Inst->setNoSanitizemetadata()` just once after `if`.
> 
> Add a comment `// Disable sanitizers to decrease size bloat. We don't expect sanitizers to catch interesting issues.`
It's either 1 or 2 instructions that need the metadata set.

The comment SGTM though that this is intentional/deliberate and not a bug.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150460/new/

https://reviews.llvm.org/D150460



More information about the llvm-commits mailing list