aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-28 18:13:31 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-28 18:13:31 +0000
commitbe2e9a88ba4028d6152b7b8a613b949a5fc7b903 (patch)
tree2d6d819eadce0782c9f5558450f3c0dd9acea9f5
parent69677eadf881ba02d1a36e55c3b9a520769aa3c3 (diff)
Let the backend decide which scheduler and register allocator to use.
Currently, the backend uses the same policy, but it will soon switch to -regalloc=fast for -O0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104984 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Frontend/CodeGenAction.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/Frontend/CodeGenAction.cpp b/lib/Frontend/CodeGenAction.cpp
index 3416aa825f..c9c5048afc 100644
--- a/lib/Frontend/CodeGenAction.cpp
+++ b/lib/Frontend/CodeGenAction.cpp
@@ -237,8 +237,6 @@ bool BackendConsumer::AddEmitPasses() {
return true;
}
- bool Fast = CodeGenOpts.OptimizationLevel == 0;
-
// Create the TargetMachine for generating code.
std::string Error;
std::string Triple = TheModule->getTargetTriple();
@@ -324,11 +322,6 @@ bool BackendConsumer::AddEmitPasses() {
if (CodeGenOpts.RelaxAll)
TM->setMCRelaxAll(true);
- // Set register scheduler & allocation policy.
- RegisterScheduler::setDefault(createDefaultScheduler);
- RegisterRegAlloc::setDefault(Fast ? createLocalRegisterAllocator :
- createLinearScanRegisterAllocator);
-
// Create the code generator passes.
FunctionPassManager *PM = getCodeGenPasses();
CodeGenOpt::Level OptLevel = CodeGenOpt::Default;