[PATCH] D139811: sanmd: improve precision of UAR analysis
Dmitry Vyukov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 02:17:32 PST 2022
dvyukov marked an inline comment as done.
dvyukov added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp:280-293
+ if (isa<LoadInst>(U))
+ continue;
+ if (auto *SI = dyn_cast<StoreInst>(U)) {
+ // If storing TO the alloca, then the address isn't taken.
+ if (SI->getOperand(1) == &V)
+ continue;
+ }
----------------
melver wrote:
> LoadInst, StoreInst, GetElementPtrInst and BitCastInst all are derived from Instruction, so these checks can be moved in the 'if (... dyn_cast<Instruction>' branch.
Can users be a non-instruction?
I assumed that I need a cast to Instruction just to get access to its methods.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139811/new/
https://reviews.llvm.org/D139811
More information about the llvm-commits
mailing list