From: Lang Hames Date: Wed, 19 Aug 2009 01:36:14 +0000 (+0000) Subject: Added an option to have the PBQP allocator attempt coalescing during allocation. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8481e3b368444386d5be5b74cd1e0ba6f858d983;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp index 3da25533772..227ce391e54 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 +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;