[llvm-commits] [llvm] r129764 - /llvm/trunk/lib/CodeGen/Passes.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Apr 19 10:17:59 PDT 2011
Author: stoklund
Date: Tue Apr 19 12:17:58 2011
New Revision: 129764
URL: http://llvm.org/viewvc/llvm-project?rev=129764&view=rev
Log:
Force the greedy register allocator to be linked alongside linear scan.
This means that the new register allocator can be used with 'clang -mllvm -regalloc=greedy'.
Modified:
llvm/trunk/lib/CodeGen/Passes.cpp
Modified: llvm/trunk/lib/CodeGen/Passes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/Passes.cpp?rev=129764&r1=129763&r2=129764&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/Passes.cpp (original)
+++ llvm/trunk/lib/CodeGen/Passes.cpp Tue Apr 19 12:17:58 2011
@@ -55,6 +55,11 @@
RegisterRegAlloc::setDefault(RegAlloc);
}
+ // This forces linking of the greedy register allocator, so -regalloc=greedy
+ // works in clang.
+ if (Ctor == createGreedyRegisterAllocator)
+ return createGreedyRegisterAllocator();
+
if (Ctor != createDefaultRegisterAllocator)
return Ctor();
More information about the llvm-commits
mailing list