[PATCH] D105201: [hwasan] Detect use after scope within function.
Florian Mayer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 02:43:05 PDT 2021
fmayer added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h:52
+template <typename F>
+void tagLifetimeEnd(DominatorTree *DT, PostDominatorTree *PDT,
+ IntrinsicInst *Start, IntrinsicInst *End,
----------------
eugenis wrote:
> fmayer wrote:
> > eugenis wrote:
> > > tagLifetimeEnd is not descriptive enough for namespace llvm. M/b something like ForAllReachableExits? Start and End can be just Instruction *, and RetVec should be const. Instead of erasing End I'd rather return a bool that's true if any callbacks were invoked on any of the RetVec, and caller can remove lifetime.end then.
> > >
> > > This refactoring is better done in a separate change.
> > > This refactoring is better done in a separate change.
> >
> > Confirming that you mean I should split this change and pull this helper function out before?
> yes
Done.
The instructions (except Start) cannot be const because they will eventually end up in the IRBuilder constructor (which does not take a const).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105201/new/
https://reviews.llvm.org/D105201
More information about the llvm-commits
mailing list