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:
Alkis Evlogimenos
2003-11-20 03:32:25 +00:00
parent 18c4d850c4
commit ff0cbe175d
7 changed files with 1724 additions and 4 deletions

View File

@ -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