summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-11 14:59:22 +0000
committerChris Lattner <sabre@nondot.org>2003-08-11 14:59:22 +0000
commite61db425e887a360746b0d4b8d8cf140526b0d8f (patch)
tree9b7ced4f00711be2138e9af4f53d525e863b2912 /llvm/lib/Target/X86/X86TargetMachine.cpp
parent2c2062cdbae7cda795aceb1c1af3f7bd24444a39 (diff)
downloadbcm5719-llvm-e61db425e887a360746b0d4b8d8cf140526b0d8f.tar.gz
bcm5719-llvm-e61db425e887a360746b0d4b8d8cf140526b0d8f.zip
Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default llvm-svn: 7719
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 893e62fd4f7..2de30f7245d 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -20,6 +20,8 @@ namespace {
cl::desc("Use Simple RA instead of Local RegAlloc"));
cl::opt<bool> PrintCode("print-machineinstrs",
cl::desc("Print generated machine code"));
+ cl::opt<bool> NoPatternISel("disable-pattern-isel", cl::init(true),
+ cl::desc("Use the 'simple' X86 instruction selector"));
}
// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine
@@ -59,7 +61,10 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
// FIXME: Implement the switch instruction in the instruction selector!
PM.add(createLowerSwitchPass());
- PM.add(createX86SimpleInstructionSelector(*this));
+ if (NoPatternISel)
+ PM.add(createX86SimpleInstructionSelector(*this));
+ else
+ PM.add(createX86PatternInstructionSelector(*this));
// TODO: optional optimizations go here
OpenPOWER on IntegriCloud