From: Chris Lattner Date: Fri, 7 Jan 2005 07:50:50 +0000 (+0000) Subject: Allow the selection-dag based selector to be diabled with -disable-pattern-isel. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18ad19488d41e074090169f7ab0b629f3d995210;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19335 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 0e3eea43924..daa97b2464a 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -41,6 +41,9 @@ namespace { cl::opt DisableOutput("disable-x86-llc-output", cl::Hidden, cl::desc("Disable the X86 asm printer, for use " "when profiling the code generator.")); + cl::opt 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)