[PATCH] D70121: [DebugInfo][LDV] Teach LDV how to identify source variables and handle fragments
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 03:06:47 PST 2019
Orlando marked 7 inline comments as done.
Orlando added a comment.
Thanks for taking a look @aprantl.
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:109
- DbgValueLocation() : LocNo(0) {}
+ DbgValueLocation() : LocNo(0), Expression(nullptr) {}
----------------
aprantl wrote:
> `DbgValueLocation() = default;`
I'll update this in the next revision, thanks!
================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:338
+/// which are live in specific intervals.
+class SourceVariable {
+ using FragmentInfo = DIExpression::FragmentInfo;
----------------
aprantl wrote:
> Should this use https://reviews.llvm.org/D70486?
The point of `SourceVariable` is to, for any given def, allow us to quickly find
overlapping fragments and explicitly terminate the range of any previous defs.
The key difference between `SourceVariable` and `DebugVariable` (from D70486)
is that a `SourceVariable` represents a group of fragments, and a `DebugVariable`
is closer to what I've called a `Fragment` here; it represents a unique _part of_
a variable only.
So I don't believe we can use `DebugVariable` in place of `SourceVariable`. But at
the cost of some refactoring and a couple of redundant fields (repeated
`DIVariable*`, `DILocation*`, and bool part of OptFragInfo per `DebugVariable`)
I could replace `Fragment` with `DebugVariable`? I do not feel particularly
strongly either way.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70121/new/
https://reviews.llvm.org/D70121
More information about the llvm-commits
mailing list