[PATCH] D57271: [DebugInfo] Handle restore instructions in LiveDebugValues

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 18:42:58 PST 2019


wolfgangp added inline comments.


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:430
+
+  auto ProcessVarLoc = [&MI, &OpenRanges, &Transfers,
+                        &VarLocIDs](VarLoc &VL, MachineInstr *NewDMI) {
----------------
aprantl wrote:
> as far as I can this lambda is called three times with the same arguments at the end of each if block. Why can't this code just remain at the end of the function?
> Ah.. because VarLoc doesn't yet have an empty constructor?
Right. Restructuring VarLoc a bit could help with this, but the lambda seemed to be slightly less awkward option. I could attempt this if you're interested, but perhaps a different patch would be better?


================
Comment at: lib/CodeGen/LiveDebugValues.cpp:591
+
+  // To identify a restore instruction, use the same criteria as in AsmPrinter.
+  if (TII->isLoadFromStackSlotPostFE(MI, FI))
----------------
aprantl wrote:
> This comment makes it sound as if this should be a method of MachineInstr used by both instead?
I gave MachineInstr a few more functions to identify spill and restore instructions. Could be done in a different patch as well.


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

https://reviews.llvm.org/D57271





More information about the llvm-commits mailing list