aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-27 23:57:25 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-27 23:57:25 +0000
commit700bfada6375546f82000bdd1b4cdbe87beebea5 (patch)
tree08201eccc3aed612163606f2bb3461be5c87d717 /lib/CodeGen/LLVMTargetMachine.cpp
parent1fa1c7b23bd06d2c1b37aa0f0cf7740fa6759e0b (diff)
downloadexternal_llvm-700bfada6375546f82000bdd1b4cdbe87beebea5.tar.gz
external_llvm-700bfada6375546f82000bdd1b4cdbe87beebea5.tar.bz2
external_llvm-700bfada6375546f82000bdd1b4cdbe87beebea5.zip
Add a -regalloc=default option that chooses a register allocator based on the -O
optimization level. This only really affects llc for now because both the llvm-gcc and clang front ends override the default register allocator. I intend to remove that code later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index b584704bff..7f1a7c4f25 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -358,7 +358,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
/* allowDoubleDefs= */ true);
// Perform register allocation.
- PM.add(createRegisterAllocator());
+ PM.add(createRegisterAllocator(OptLevel));
printAndVerify(PM, "After Register Allocation");
// Perform stack slot coloring and post-ra machine LICM.