diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2003-11-20 03:32:25 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2003-11-20 03:32:25 +0000 |
commit | ff0cbe175df40e0d2b36e59c6fb72f211f1cba4c (patch) | |
tree | c5ae4788ef3a8c3d3018779ad720423d28c345d1 /lib/CodeGen/Passes.cpp | |
parent | 18c4d850c495cd83ffcede75cb8a2301396c22fb (diff) | |
download | external_llvm-ff0cbe175df40e0d2b36e59c6fb72f211f1cba4c.zip external_llvm-ff0cbe175df40e0d2b36e59c6fb72f211f1cba4c.tar.gz external_llvm-ff0cbe175df40e0d2b36e59c6fb72f211f1cba4c.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/Passes.cpp')
-rw-r--r-- | lib/CodeGen/Passes.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index 239eacd..58a5105 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -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 |