[PATCH] D150460: [gcov] Add nosanitize metadata to memory access instructions inserted by emitProfileNotes()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 20:36:16 PDT 2023
MaskRay added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp:922
Counters->getValueType(), Counters, 0, I);
if (Options.Atomic) {
+ AtomicRMWInst *RMW = Builder.CreateAtomicRMW(
----------------
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.`
================
Comment at: llvm/test/Transforms/GCOVProfiling/nosanitize.ll:2
+;; Ensure that the loads, stores, and atomicrmw adds for gcov have nosanitize metadata.
+; RUN: mkdir -p %t && cd %t
+; RUN: opt < %s -S -passes=insert-gcov-profiling | FileCheck %s
----------------
`; RUN: rm -rf %t && mkdir %t && cd %t` clean up the directory which may be clobbered.
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