[PATCH] D118857: [DWARF][codegen] Fix for Aranges when split inlining is present
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 19:14:00 PST 2022
dblaikie added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:70-71
const MCSymbol *Label) {
+ bool NoneSkeletonCU = DD->useSplitDwarf() && Skeleton;
+ bool ShouldEmitArangeLabel = NoneSkeletonCU || !DD->useSplitDwarf();
// Don't use the address pool in non-fission or in the skeleton unit itself.
----------------
This boils down to:
```
bool ShouldEmitArangeLabel = Skeleton || !DD->useSplitDwarf();
```
I think?
`DD->useSplitDwarf() && Skeleton) || !DD->useSplitDwarf();`
->
`(D->useSplitDwarf() || !DD->useSplitDwarf()) && (Skeleton || !D->useSplitDwarf())`
->
`true && (Skeleton || !D->useSplitDwarf())`
->
`Skeleton || !D->useSplitDwarf()`
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:76-77
- if (Label)
+ if (ShouldEmitArangeLabel && Label)
DD->addArangeLabel(SymbolCU(this, Label));
----------------
Could this be moved to above line 74 and then removed from the `addLocalLabelAddress` rather than duplicated? (would avoid needing to pass the extra parameter to `addLocalLabelAddress`)
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:511
// symbols are (with entries in .debug_addr).
- // For now, since we only ever use index 0, this should work as-is.
+ // For now, since we only ever use index 0, this should work as-is.
addUInt(*Loc, dwarf::DW_FORM_data4, FrameBase.Location.WasmLoc.Index);
----------------
Could you remove this unrelated change (you can commit it separately if you like)
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