[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 28 21:58:57 PDT 2019
MaskRay added a comment.
In D59923#1447245 <https://reviews.llvm.org/D59923#1447245>, @dblaikie wrote:
> OK - could you include/describe which sets of options disable split-dwarf, then? (adding that to the patch description along with the matrix of g1/2, etc?
I've already updated the description to mention the computed debug info level for some composition: (didn't mention `-gline-directives-only` though)
`-g0`, `-gline-directives-only`, and `-gmlt -fsplit-dwarf-inling` will disable `-gsplit-dwarf`. The rule hasn't changed.
> (specifically, I'd expect "-gmlt -gsplit-dwarf" means 2+split, "-gsplit-dwarf -gmlt" means 1+non-split, and "-fno-split-dwarf-inlining -gsplit-dwarf -gmlt" (with -fno-split-dwarf-inlining anywhere in the command line (so long as it's after an -fsplit-dwarf-inlining) is 1+split)
The following two composition rules (as you expect) haven't changed:
- `-gmlt -gsplit-dwarf` -> 2 + split
- `-fno-split-dwarf-inlining -gsplit-dwarf -gmlt` -> 1 + split
> I'm still not quite sure changing the meaning of "-gmlt -gsplit-dwarf -fno-split-dwarf-inlining" is important. It feels to me like in that mode, -gmlt and -gsplit-dwarf compose naturally in either order. Is it code complexity or user interface complexity you're trying to address? I'm still a bit curious/trying to better understand the motivation here.
Just the insistent handling of `-g0 -gsplit-dwarf` `-gmlt -gsplit-dwarf -fsplit-dwarf-inlining` and `-gmlt -gsplit-dwarf -fno-split-dwarf-inlining ` motivated me to create this patch. I don't have a specific use case.
The new logic is equivalent to the following patch. It reorders code to make it tighter, thoguh.
if (DwarfFission != DwarfFissionKind::None) {
if (A->getIndex() > SplitDWARFArg->getIndex()) {
if (DebugInfoKind == codegenoptions::NoDebugInfo ||
DebugInfoKind == codegenoptions::DebugDirectivesOnly ||
(DebugInfoKind == codegenoptions::DebugLineTablesOnly &&
SplitDWARFInlining))
DwarfFission = DwarfFissionKind::None;
}
- else if (SplitDWARFInlining)
- DebugInfoKind = codegenoptions::NoDebugInfo;
}
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59923/new/
https://reviews.llvm.org/D59923
More information about the cfe-commits
mailing list