[PATCH] D105201: [hwasan] Detect use after scope within function.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 22 11:56:15 PDT 2021
vitalybuka added a comment.
I assume we still wait for IR tests?
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1484
+
+ if (LocalDT == nullptr) {
+ DeleteDT = std::make_unique<DominatorTree>(F);
----------------
Code around mostly uses if (!LocalDT) { style
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1476
+ if (LocalDT == nullptr) {
+ DeleteDT = std::make_unique<DominatorTree>(F);
+ LocalDT = DeleteDT.get();
----------------
fmayer wrote:
> vitalybuka wrote:
> > why we need these empty Trees?
> They aren't empty, they are constructed from the function.
>
> We need the unique_ptrs because sometimes we borrow the LocalDT from the passmanager, and sometimes we construct it ourselves, in which case we need to destruct it again.
I think it's very unusuall, you should get if from pass manager with getAnalysis<DominatorTreeWrapperPass>()
and addRequired or getResult<DominatorTreeAnalysis>
@eugenis ?
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