summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocPBQP.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-08-19 01:36:14 +0000
committerLang Hames <lhames@gmail.com>2009-08-19 01:36:14 +0000
commit8481e3b368444386d5be5b74cd1e0ba6f858d983 (patch)
treeb37673c472852e0bdd056e18315411a921193dc4 /lib/CodeGen/RegAllocPBQP.cpp
parent021d664a3838b89620b3fb9d995083f1da77d451 (diff)
downloadllvm-8481e3b368444386d5be5b74cd1e0ba6f858d983.tar.gz
llvm-8481e3b368444386d5be5b74cd1e0ba6f858d983.tar.bz2
llvm-8481e3b368444386d5be5b74cd1e0ba6f858d983.tar.xz
Added an option to have the PBQP allocator attempt coalescing during allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocPBQP.cpp')
-rw-r--r--lib/CodeGen/RegAllocPBQP.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp
index 3da2553377..227ce391e5 100644
--- a/lib/CodeGen/RegAllocPBQP.cpp
+++ b/lib/CodeGen/RegAllocPBQP.cpp
@@ -59,6 +59,11 @@ static RegisterRegAlloc
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 @@ PBQP::SimpleGraph PBQPRegAlloc::constructPBQPProblem() {
}
// 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;