[PATCH] D28585: [RegisterCoalescing] Remove partial redundent copy

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 16:10:52 PST 2017


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

Hi Wei,

LGTM.
Couple of nitpicks below before you push (no need for additional review).

Cheers,
-Quentin



================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:991
+  // If CopyLeftBB is not nullptr, ensure CopyLeftBB has a single succ so
+  // MBB is hoter than CopyLeftBB.
+  if (CopyLeftBB && CopyLeftBB->succ_size() > 1)
----------------
typo: hotter


================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:1001
+    DEBUG(dbgs() << "\tremovePartialRedundancy: Remove the copy from BB#"
+                 << MBB.getNumber() << '\t' << CopyMI);
+
----------------
We could move the debug statements in the next if and add a else condition.
Would be more natural IMHO.


Repository:
  rL LLVM

https://reviews.llvm.org/D28585





More information about the llvm-commits mailing list