[PATCH] D40987: Rewrite the cached map used for locating the most precise DIE among inlined subroutines for a given address.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 15:59:19 PST 2017
aprantl added inline comments.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h:457
+
+ void buildSubprogramDIEAddrMap();
+ void buildInlinedSubroutineDIEAddrMap(SubprogramDIEAddrInfo &SPInfo);
----------------
I think it would be nice to copy the high level overview of the two-level approach outlined in the phabricator review into a comment somewhere here.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:561
+ auto ParentIntervalIdx = ParentIntervalsBeginIdx;
+ for (int i = DieIntervalsBeginIdx, e = DieIntervalsEndIdx - 1; i < e;
+ ++i) {
----------------
LLVM style wants this to be `I` and `E`.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:690
+ return (J == SPInfo.InlinedSubroutineDIEAddrMap.begin() ||
+ (--J)->second == -1)
+ ? SPInfo.SubprogramDIE
----------------
That `--J` looks scary since we are using J later in the same expression.
Perhaps factor this into a separate statement?
https://reviews.llvm.org/D40987
More information about the llvm-commits
mailing list