summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-10-02 16:57:49 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-10-02 16:57:49 +0000
commit5facafaabe555c9946a56d748def361a7868340d (patch)
treeddae8171d785dba7715567682b8f4bcbd51f01f1 /llvm/lib/Target/X86/X86TargetMachine.cpp
parent62495763003b4d1d21ab6c6d34282f1005f332fb (diff)
downloadbcm5719-llvm-5facafaabe555c9946a56d748def361a7868340d.tar.gz
bcm5719-llvm-5facafaabe555c9946a56d748def361a7868340d.zip
Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
llvm-svn: 8819
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp31
1 files changed, 2 insertions, 29 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 8f6829f6de4..d511de67212 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -16,15 +16,6 @@
#include "Support/Statistic.h"
namespace {
- 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"),
- 0),
- cl::init(local));
-
cl::opt<bool> PrintCode("print-machineinstrs",
cl::desc("Print generated machine code"));
cl::opt<bool> NoPatternISel("disable-pattern-isel", cl::init(true),
@@ -73,16 +64,7 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
PM.add(createMachineFunctionPrinterPass());
// Perform register allocation to convert to a concrete x86 representation
- switch (RegAlloc) {
- case simple:
- PM.add(createSimpleRegisterAllocator());
- break;
- case local:
- PM.add(createLocalRegisterAllocator());
- break;
- default:
- assert(0 && "no register allocator selected");
- }
+ PM.add(createRegisterAllocator());
if (PrintCode)
PM.add(createMachineFunctionPrinterPass());
@@ -126,16 +108,7 @@ bool X86TargetMachine::addPassesToJITCompile(FunctionPassManager &PM) {
PM.add(createMachineFunctionPrinterPass());
// Perform register allocation to convert to a concrete x86 representation
- switch (RegAlloc) {
- case simple:
- PM.add(createSimpleRegisterAllocator());
- break;
- case local:
- PM.add(createLocalRegisterAllocator());
- break;
- default:
- assert(0 && "no register allocator selected");
- }
+ PM.add(createRegisterAllocator());
if (PrintCode)
PM.add(createMachineFunctionPrinterPass());
OpenPOWER on IntegriCloud