From: Jakob Stoklund Olesen Date: Sat, 30 Apr 2011 01:37:54 +0000 (+0000) Subject: Use a greedy algorithm for allocating registers. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5aa3211e2d9c618f1f2ae590792067dbcb572741;p=oota-llvm.git Use a greedy algorithm for allocating registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130568 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index c62227535fc..914c78b0b14 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -57,8 +57,8 @@ FunctionPass *llvm::createRegisterAllocator(CodeGenOpt::Level OptLevel) { // This forces linking of the greedy register allocator, so -regalloc=greedy // works in clang. - if (Ctor == createGreedyRegisterAllocator) - return createGreedyRegisterAllocator(); + if (Ctor == createLinearScanRegisterAllocator) + return createLinearScanRegisterAllocator(); if (Ctor != createDefaultRegisterAllocator) return Ctor(); @@ -68,6 +68,6 @@ FunctionPass *llvm::createRegisterAllocator(CodeGenOpt::Level OptLevel) { case CodeGenOpt::None: return createFastRegisterAllocator(); default: - return createLinearScanRegisterAllocator(); + return createGreedyRegisterAllocator(); } }