Tablgen files for really simple instruction selector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12714 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 31c5e57..0d9a0d6 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -33,6 +33,8 @@
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 @@
// 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));