[PATCH] D118857: [DWARF][codegen] Fix for Aranges when split inlining is present

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 16:49:43 PST 2022


ayermolo added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2941-2942
   // Filter labels by section.
   for (const SymbolCU &SCU : ArangeLabels) {
+    if (SkeletonCUs.count(SCU.CU))
+      continue;
----------------
dblaikie wrote:
> ayermolo wrote:
> > dblaikie wrote:
> > > Should we avoid putting these entries in `ArangeLabels` to begin with, rather than filtering them out here?
> > I looked at where this is added, and I think it would involve passing a flag through multiple levels of API. I wasn't sure what would be more acceptable. Just cleaning it up here, or doing that. This is more self contained.
> Could you roughly summarize the layers of API it'd have to go through? There might be some nice way to structure it.
Umm, nevermind. I looked at that code with fresh set of eyes and I think only API that needs to be modified is addLocalLabelAddress and in addLabelAddress we can do a check something like:

  bool IsSplitDebugInlining = this->getCUNode()->getSplitDebugInlining();
  bool IsSkeletonCU = DD->useSplitDwarf() && !Skeleton;
  bool ShouldEmitArangeLabel = IsSplidDebugInlining && IsSkeletonCU || !DD->useSplitDwarf();


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118857/new/

https://reviews.llvm.org/D118857



More information about the llvm-commits mailing list