[PATCH] D118460: [DebugInfo][InstrRef] Use a depth-first search to reduce the lifetime of tracking information
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 07:57:21 PST 2022
Orlando added a comment.
Once @dblaikie's concerns are addressed, this LGTM.
Would it be worth caching `getBlocksForScope` results? If I'm reading this right it looks like it's called a few times with what should be the same inputs and outputs in a few places in the pass?
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:2986
+ auto DILocIt = ScopeToDILocation.find(WS);
+ if (HighestDFSIn <= WS->getDFSIn() && DILocIt != ScopeToDILocation.end()) {
+ const DILocation *DILoc = DILocIt->second;
----------------
Repeating offline discussion so it's noted on the review -- it looks as though it might be possible to simplify this by removing the `HighestDFSIn` check and moving the body of this block into the `if (ChildNum < (ssize_t)Children.size()) { ... }` block below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118460/new/
https://reviews.llvm.org/D118460
More information about the llvm-commits
mailing list