forked from OSchip/llvm-project
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'. llvm-svn: 129764
This commit is contained in:
parent
bcd09b3a7f
commit
af12138d10
|
@ -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…
Reference in New Issue