mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10103 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,14 +18,15 @@
|
||||
namespace llvm {
|
||||
|
||||
namespace {
|
||||
enum RegAllocName { simple, local };
|
||||
enum RegAllocName { simple, local, linearscan };
|
||||
|
||||
cl::opt<RegAllocName>
|
||||
RegAlloc("regalloc",
|
||||
cl::desc("Register allocator to use: (default = simple)"),
|
||||
cl::Prefix,
|
||||
cl::values(clEnumVal(simple, " simple register allocator"),
|
||||
clEnumVal(local, " local register allocator"),
|
||||
cl::values(clEnumVal(simple, " simple register allocator"),
|
||||
clEnumVal(local, " local register allocator"),
|
||||
clEnumVal(linearscan, " linear-scan global register allocator"),
|
||||
0),
|
||||
cl::init(local));
|
||||
}
|
||||
@ -37,6 +38,8 @@ FunctionPass *createRegisterAllocator()
|
||||
return createSimpleRegisterAllocator();
|
||||
case local:
|
||||
return createLocalRegisterAllocator();
|
||||
case linearscan:
|
||||
return createLinearScanRegisterAllocator();
|
||||
default:
|
||||
assert(0 && "no register allocator selected");
|
||||
return 0; // not reached
|
||||
|
Reference in New Issue
Block a user