[llvm-commits] [llvm] r79397 - /llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp

Lang Hames lhames at gmail.com
Tue Aug 18 18:36:14 PDT 2009


Author: lhames
Date: Tue Aug 18 20:36:14 2009
New Revision: 79397

URL: http://llvm.org/viewvc/llvm-project?rev=79397&view=rev
Log:
Added an option to have the PBQP allocator attempt coalescing during allocation.

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

Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=79397&r1=79396&r2=79397&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Tue Aug 18 20:36:14 2009
@@ -59,6 +59,11 @@
 registerPBQPRepAlloc("pbqp", "PBQP register allocator.",
                       llvm::createPBQPRegisterAllocator);
 
+static cl::opt<bool>
+pbqpCoalescing("pbqp-coalescing",
+               cl::desc("Attempt coalescing during PBQP register allocation."),
+               cl::init(false), cl::Hidden);
+
 namespace {
 
   ///
@@ -537,7 +542,11 @@
   }
 
   // Get the set of potential coalesces.
-  CoalesceMap coalesces;//(findCoalesces());
+  CoalesceMap coalesces;
+
+  if (pbqpCoalescing) {
+    coalesces = findCoalesces();
+  }
 
   // Construct a PBQP solver for this problem
   PBQP::SimpleGraph problem;





More information about the llvm-commits mailing list