[llvm-commits] [llvm] r47448 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Evan Cheng evan.cheng at apple.com
Thu Feb 21 11:20:21 PST 2008


Author: evancheng
Date: Thu Feb 21 13:20:21 2008
New Revision: 47448

URL: http://llvm.org/viewvc/llvm-project?rev=47448&view=rev
Log:
Help testing.

Modified:
    llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=47448&r1=47447&r2=47448&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Thu Feb 21 13:20:21 2008
@@ -57,6 +57,10 @@
   CommuteDef("coalescer-commute-instrs",
              cl::init(false), cl::Hidden);
 
+  static cl::opt<int>
+  CommuteLimit("commute-limit",
+               cl::init(-1), cl::Hidden);
+
   RegisterPass<SimpleRegisterCoalescing> 
   X("simple-register-coalescing", "Simple Register Coalescing");
 
@@ -289,6 +293,9 @@
   if (HasOtherReachingDefs(IntA, IntB, AValNo, BValNo))
     return false;
 
+  if (CommuteLimit >= 0 && numCommutes >= CommuteLimit)
+    return false;
+
   // At this point we have decided that it is legal to do this
   // transformation.  Start by commuting the instruction.
   MachineBasicBlock *MBB = DefMI->getParent();





More information about the llvm-commits mailing list