summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-07 07:50:50 +0000
committerChris Lattner <sabre@nondot.org>2005-01-07 07:50:50 +0000
commitca4ca5520b3bb1fffd817a7686287fae4217e63c (patch)
tree272c08d5f6c072824beb94535b06cdfbd94e9810 /llvm/lib/Target/X86/X86TargetMachine.cpp
parent88c8a23891fdde48ae5b5d50e7c035648c6302ec (diff)
downloadbcm5719-llvm-ca4ca5520b3bb1fffd817a7686287fae4217e63c.tar.gz
bcm5719-llvm-ca4ca5520b3bb1fffd817a7686287fae4217e63c.zip
Allow the selection-dag based selector to be diabled with -disable-pattern-isel.
For now, this is the default, as the current selector is missing some big pieces. To enable the new selector, pass -disable-pattern-isel=false to llc or lli. llvm-svn: 19335
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 0e3eea43924..daa97b2464a 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -41,6 +41,9 @@ 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> DisablePatternISel("disable-pattern-isel", cl::Hidden,
+ cl::desc("Disable the pattern isel XXX FIXME"),
+ cl::init(true));
#if 0
// FIXME: This should eventually be handled with target triples and
@@ -110,7 +113,10 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM,
// Make sure that no unreachable blocks are instruction selected.
PM.add(createUnreachableBlockEliminationPass());
- PM.add(createX86SimpleInstructionSelector(*this));
+ if (DisablePatternISel)
+ PM.add(createX86SimpleInstructionSelector(*this));
+ else
+ PM.add(createX86PatternInstructionSelector(*this));
// Run optional SSA-based machine code optimizations next...
if (!NoSSAPeephole)
@@ -165,7 +171,10 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
// Make sure that no unreachable blocks are instruction selected.
PM.add(createUnreachableBlockEliminationPass());
- PM.add(createX86SimpleInstructionSelector(TM));
+ if (DisablePatternISel)
+ PM.add(createX86SimpleInstructionSelector(TM));
+ else
+ PM.add(createX86PatternInstructionSelector(TM));
// Run optional SSA-based machine code optimizations next...
if (!NoSSAPeephole)
OpenPOWER on IntegriCloud