forked from OSchip/llvm-project
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. llvm-svn: 104984
This commit is contained in:
parent
bc3c5dc767
commit
f298e02c9d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue