mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-24 07:35:04 +00:00
Force the greedy register allocator to be linked alongside linear scan.
This means that the new register allocator can be used with 'clang -mllvm -regalloc=greedy'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37d38bfbbf
commit
430721cff8
@ -55,6 +55,11 @@ FunctionPass *llvm::createRegisterAllocator(CodeGenOpt::Level OptLevel) {
|
||||
RegisterRegAlloc::setDefault(RegAlloc);
|
||||
}
|
||||
|
||||
// This forces linking of the greedy register allocator, so -regalloc=greedy
|
||||
// works in clang.
|
||||
if (Ctor == createGreedyRegisterAllocator)
|
||||
return createGreedyRegisterAllocator();
|
||||
|
||||
if (Ctor != createDefaultRegisterAllocator)
|
||||
return Ctor();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user