mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
Use a greedy algorithm for allocating registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130568 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d5b679c8ce
commit
5aa3211e2d
@ -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…
x
Reference in New Issue
Block a user