[PATCH] D70121: [WIP][DebugInfo][LDV] Attempt to teach LDV how to handle fragments

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 09:41:51 PST 2019


Orlando marked 2 inline comments as done.
Orlando added inline comments.


================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:322
+/// A user value group contains the set of debug info user variables
+/// which refer to the same DILocalVariable in the same inlining scope.
+class UserValueGroup {
----------------
aprantl wrote:
> I don't know if this helps, but in other places we conceptually treat `std::pair<DILocalVariable *, FragmentInfo>` as unique "variables" and the remainder expression as part of a "location".
Yes that makes sense, I can probably improve the class name and comment here.


================
Comment at: llvm/lib/CodeGen/LiveDebugVariables.cpp:428
+  /// Map virtual register to UserValues which use it.
+  using VRMap = std::unordered_map<unsigned, SmallVector<UserValue *, 4>>;
+  VRMap VirtRegToUserVals;
----------------
aprantl wrote:
> Why this change?
This line was changed as part of the work for D68816 (see point 1 in my summary). In D68816 VRMap was a DenseMap and this has been changed to an unordered_map to avoid potentially reading from an invalid pointer.



Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70121/new/

https://reviews.llvm.org/D70121





More information about the llvm-commits mailing list