[PATCH] D58386: [DebugInfo] Pre-RA MachineSink: sink DBG_VALUEs that don't immediately follow the sunk instruction too

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 07:08:52 PDT 2019


jmorse marked 6 inline comments as done.
jmorse added inline comments.


================
Comment at: lib/CodeGen/MachineSink.cpp:952
+      continue;
+    if (!SeenDbgUsers.count(MO.getReg()))
+      continue;
----------------
aprantl wrote:
> this looks very similar to the body of `ProcessDbgInst`...
It's sort-of it's compliment, ProcessDbgInst builds up the contents of SeenDbgUsers as we walk backwards through a block spotting DBG_VALUEs, while this portion of code is detecting vreg defs that are going to be sunk and collecting those seen debug insts into one vector.

The common code would be "return the SeenDbgUsers element corresponding to this operand or nullptr", for me this is a sufficiently small similarity that duplication is OK, YMMV.


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

https://reviews.llvm.org/D58386





More information about the llvm-commits mailing list