aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 31c5e578ea..0d9a0d6e40 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -33,6 +33,8 @@ namespace {
cl::opt<bool> DisableOutput("disable-x86-llc-output", cl::Hidden,
cl::desc("Disable the X86 asm printer, for use "
"when profiling the code generator."));
+ cl::opt<bool> NoSimpleISel("disable-simple-isel", cl::init(true),
+ cl::desc("Use the hand coded 'simple' X86 instruction selector"));
}
// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine
@@ -67,8 +69,10 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
// FIXME: Implement the switch instruction in the instruction selector!
PM.add(createLowerSwitchPass());
- if (NoPatternISel)
+ if (NoPatternISel && NoSimpleISel)
PM.add(createX86SimpleInstructionSelector(*this));
+ else if (NoPatternISel)
+ PM.add(createX86ReallySimpleInstructionSelector(*this));
else
PM.add(createX86PatternInstructionSelector(*this));