diff options
author | Djordje Todorovic <djordje.todorovic@syrmia.com> | 2021-05-21 05:29:23 -0700 |
---|---|---|
committer | Djordje Todorovic <djtodoro@cisco.com> | 2021-05-31 02:59:19 -0700 |
commit | dee85d47d9f15fc268f7b18f279dac2774836615 (patch) | |
tree | 23808f70d6a36ad156fb9544a2c76be76fca8860 /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 2b37c405cc18019ea5056a63fa65f839a4890b50 (diff) | |
download | llvm-dee85d47d9f15fc268f7b18f279dac2774836615.zip llvm-dee85d47d9f15fc268f7b18f279dac2774836615.tar.gz llvm-dee85d47d9f15fc268f7b18f279dac2774836615.tar.bz2 |
[LiveDebugVariables] Stop trimming locations of non-inlined vars
The D35953, D62650 and D73691 introduced trimming of variables locations
in LiveDebugVariables pass, since there are some cases where after
the virtregrewrite we have exploded number of DBG_VALUEs created for some
inlined variables. As it looks, all problematic cases were regarding
inlined variables, so it seems reasonable to stop trimming the location
ranges for non-inlined variables.
It has very good impact on the llvm-locstats report.
Differential Revision: https://reviews.llvm.org/D102917
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index e04e248..0244f45 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -1154,7 +1154,11 @@ void UserValue::computeIntervals(MachineRegisterInfo &MRI, // location's lexical scope. In this case, splitting of an interval // can result in an interval outside of the scope being created, // causing extra unnecessary DBG_VALUEs to be emitted. To prevent - // this, trim the intervals to the lexical scope. + // this, trim the intervals to the lexical scope in the case of inlined + // variables, since heavy inlining may cause production of dramatically big + // number of DBG_VALUEs to be generated. + if (!dl.getInlinedAt()) + return; LexicalScope *Scope = LS.findLexicalScope(dl); if (!Scope) |