[PATCH] D78851: Debug Info Support for Basic Block Sections
Sriraman Tallam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 22:39:33 PDT 2020
tmsriram added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:402-412
+ SmallVector<RangeSpan, 2> BB_List;
+ BB_List.push_back({Asm->getFunctionBegin(), Asm->getFunctionEnd()});
+ // If basic block sections are on, the [getFunctionBegin(),
+ // getFunctionEnd()] range will include all BBs which are in the same
+ // section as the entry block. Ranges for the other BBs have to be emitted
+ // separately.
+ for (auto &MBB : *Asm->MF) {
----------------
dblaikie wrote:
> dblaikie wrote:
> > Does this code produce the correct behavior when !BBSections? If so, I don't think it's worth the special-case for !BBSections - happy to just let it flow out from this code.
> This is a bit of a duplicate of the code in DwarfDebug::endFunctionImpl - perhaps it could be refactored into a reusable function in some way?
It is really small now. deduping complicates it as one is a simple list and the other is DwarfCompileUnit::addRange.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78851/new/
https://reviews.llvm.org/D78851
More information about the llvm-commits
mailing list