[PATCH] D56265: [DebugInfo] MCP: collect and update DBG_VALUEs encountered in local block

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 11:16:08 PDT 2019


vsk accepted this revision.
vsk added a subscriber: bogner.
vsk added a comment.
This revision is now accepted and ready to land.

Lgtm, thanks for working on this. I haven't touched MCP myself, so could you wait for another +1? + @bogner in case he has time to take a look.



================
Comment at: include/llvm/CodeGen/MachineRegisterInfo.h:819
+  void updateDbgUsersToReg(unsigned Reg,
+                           SmallVectorImpl<MachineInstr*> &Users) const {
+    for (MachineInstr *MI : Users) {
----------------
nit: consider ArrayRef? It's a bit more flexible and this is a widely-used class.


================
Comment at: lib/CodeGen/MachineCopyPropagation.cpp:603
         // erase() will return the next valid iterator pointing to the next
         // element after the erased one.
         DI = MaybeDeadCopies.erase(DI);
----------------
Wdyt of leaving a comment here about erasing CopyDbgUsers[MaybeDead] to save memory? There's probably a cpu-time tradeoff so it'd need profiling.


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

https://reviews.llvm.org/D56265





More information about the llvm-commits mailing list