[PATCH] D78851: Debug Info Support for Basic Block Sections
Sriraman Tallam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 18 16:26:53 PDT 2020
tmsriram marked an inline comment as done.
tmsriram added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2122-2123
+ if (&MBB == &MF->front() || MBB.isBeginSection())
+ TheCU.addRange({Asm->MBBSectionRanges[MBB.getSectionID()].BeginLabel,
+ Asm->MBBSectionRanges[MBB.getSectionID()].EndLabel});
+ if (!MF->hasBBSections())
----------------
dblaikie wrote:
> Could we iterate MBBSectionRanges (it looks like it's built per-function?) instead of iterating BBs and looking up MBBSectionRanges? Looks like /maybe/ this code could be:
>
> ```
> for (const auto &R : Asm->MBBSectionRanges)
> TheCU.addRange(R.second.BeginLabel, R.second.EndLabel);
> ```
>
> (similarly for the code in updateSubprogramScopeDIE)
IndexedMap does not support begin() end() iterators, so this won't work right? This is a good idea but I might have to find a different Map data structure that is viable. A DenseMap variant looks good as section IDs can be mapped to a small dense set of integers, but DenseMap does not support this either?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78851/new/
https://reviews.llvm.org/D78851
More information about the llvm-commits
mailing list