[PATCH] Enhance machine CSE to capture more opportunities
hfinkel at anl.gov
hfinkel at anl.gov
Thu Jul 31 07:22:22 PDT 2014
LGTM, thanks!
================
Comment at: lib/CodeGen/MachineCSE.cpp:116
@@ -114,3 +115,3 @@
-bool MachineCSE::PerformTrivialCoalescing(MachineInstr *MI,
- MachineBasicBlock *MBB) {
+/// The source register of COPY machine instruction can be propagated to all
+/// the users, and this propagation could increase the probability of finding
----------------
of COPY -> of a COPY
================
Comment at: lib/CodeGen/MachineCSE.cpp:117
@@ +116,3 @@
+/// The source register of COPY machine instruction can be propagated to all
+/// the users, and this propagation could increase the probability of finding
+/// common subexpression. If the COPY has only one user, the COPY itself can
----------------
the users -> its users
================
Comment at: lib/CodeGen/MachineCSE.cpp:118
@@ +117,3 @@
+/// the users, and this propagation could increase the probability of finding
+/// common subexpression. If the COPY has only one user, the COPY itself can
+/// be removed.
----------------
subexpression -> subexpressions
================
Comment at: lib/CodeGen/MachineCSE.cpp:158
@@ -155,2 +157,3 @@
DEBUG(dbgs() << "*** to: " << *MI);
+ // Propagate srcreg of copies to MI.
MO.setReg(SrcReg);
----------------
srcreg -> SrcReg
http://reviews.llvm.org/D4736
More information about the llvm-commits
mailing list