[PATCH] D11197: [PeepholeOptimizer] Look through PHIs to find additional register sources

Quentin Colombet qcolombet at apple.com
Tue Jul 14 14:49:00 PDT 2015


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

Hi Bruno,

LGTM with one fix.

Thanks,
-Quentin


================
Comment at: lib/CodeGen/PeepholeOptimizer.cpp:105
@@ +104,3 @@
+    "rewrite-phi-limit", cl::Hidden, cl::init(10),
+    cl::desc("Limit the length of PHI chains nested PHIs to lookup"));
+
----------------
I believe “nested PHIs” shouldn't appear in this sentence :).

================
Comment at: lib/CodeGen/PeepholeOptimizer.cpp:236
@@ +235,3 @@
+    bool operator==(const ValueTrackerResult &Other) {
+      for (int i = 0, e = Other.getNumSources(); i != e; ++i)
+        if (Other.getSrcReg(i) != this->getSrcReg(i) ||
----------------
We should check that the number of sources is the same for both trackers as well.

Same for the Inst member.


Repository:
  rL LLVM

http://reviews.llvm.org/D11197







More information about the llvm-commits mailing list