[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
Fri Feb 4 19:28:25 PST 2022
ayermolo 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.
----------------
dblaikie wrote:
> 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()`
ah right.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:76-77
- if (Label)
+ if (ShouldEmitArangeLabel && Label)
DD->addArangeLabel(SymbolCU(this, Label));
----------------
dblaikie wrote:
> 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`)
addLocalLabelAddress is a public API. Right now it's only used from here, but in the future if someone else uses it, they will need to know that addArangeLabel needs to be called before it is invoked. Maybe just eliminate it entirely and move functionality into addLabelAddress?
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