[PATCH] D106856: [LiveDebugValues] Cleanup Transfers when removing Entry Value Location
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 04:21:32 PDT 2021
djtodoro added inline comments.
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:807
using TransferMap = SmallVector<TransferDebugPair, 4>;
+ using TDPMap = std::multimap<const MachineInstr *, LocIndex>;
+ using RegSetterInstructionMap = DenseMap<Register, MachineInstr *>;
----------------
Please add comments describing these types (+ any better name for this type?)
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:808
+ using TDPMap = std::multimap<const MachineInstr *, LocIndex>;
+ using RegSetterInstructionMap = DenseMap<Register, MachineInstr *>;
----------------
`RegDefToInstMap`
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:1258-1260
+ if (EntryVL.Var == EmittedEV.Var &&
+ EntryVL.Locs[0].Value.RegNo == EmittedEV.Locs[0].Value.RegNo &&
+ EntryVL.Expr == EmittedEV.Expr) {
----------------
ntesic wrote:
> jmorse wrote:
> > Any reason to not use the VarLoc operator==?
> Well, the EntryVL is of a "backup" kind, and EmittedEV isn't. So, the == operator doesn't see them as equal.
can we use the `std::tie()` here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106856/new/
https://reviews.llvm.org/D106856
More information about the llvm-commits
mailing list