forked from OSchip/llvm-project
Use a greedy algorithm for allocating registers.
llvm-svn: 130568
This commit is contained in:
parent
edfabc9aad
commit
6e399a6ecb
|
@ -57,8 +57,8 @@ FunctionPass *llvm::createRegisterAllocator(CodeGenOpt::Level OptLevel) {
|
||||||
|
|
||||||
// This forces linking of the greedy register allocator, so -regalloc=greedy
|
// This forces linking of the greedy register allocator, so -regalloc=greedy
|
||||||
// works in clang.
|
// works in clang.
|
||||||
if (Ctor == createGreedyRegisterAllocator)
|
if (Ctor == createLinearScanRegisterAllocator)
|
||||||
return createGreedyRegisterAllocator();
|
return createLinearScanRegisterAllocator();
|
||||||
|
|
||||||
if (Ctor != createDefaultRegisterAllocator)
|
if (Ctor != createDefaultRegisterAllocator)
|
||||||
return Ctor();
|
return Ctor();
|
||||||
|
@ -68,6 +68,6 @@ FunctionPass *llvm::createRegisterAllocator(CodeGenOpt::Level OptLevel) {
|
||||||
case CodeGenOpt::None:
|
case CodeGenOpt::None:
|
||||||
return createFastRegisterAllocator();
|
return createFastRegisterAllocator();
|
||||||
default:
|
default:
|
||||||
return createLinearScanRegisterAllocator();
|
return createGreedyRegisterAllocator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue