From c26fb5727a9812fc54aad7b114f5adb710b8690d Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Wed, 19 Aug 2009 01:36:14 +0000 Subject: [PATCH] Added an option to have the PBQP allocator attempt coalescing during allocation. llvm-svn: 79397 --- lib/CodeGen/RegAllocPBQP.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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;