[PATCH] D55987: [CodeGen] Skip over dbg-instr in twoaddr pass

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 2 00:06:54 PST 2019


markus marked an inline comment as done.
markus added inline comments.


================
Comment at: lib/CodeGen/TwoAddressInstructionPass.cpp:933
+  while (End != MBB->end()) {
+    End = skipDebugInstructionsForward(End, MBB->end());
+    if (End->isCopy() && regOverlapsSet(Defs, End->getOperand(1).getReg(), TRI))
----------------
Of course if 'End == MBB->end()' after this point bad things would happen, but on the other hand that would also have been problematic in the original loop (and apparently it was not a problem in practice). Perhaps simply adding an assertion to indicate that this has been considered would be sufficient?


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

https://reviews.llvm.org/D55987





More information about the llvm-commits mailing list