From 56323c761a73c5b227dc89085e1350c43f7bfb2f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 17 Dec 2005 01:22:13 +0000 Subject: [PATCH] Only lower SELECT when using DAG based isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24755 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86.h | 1 + lib/Target/X86/X86TargetMachine.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86.h b/lib/Target/X86/X86.h index 7fcd0cfa987..7163d346149 100644 --- a/lib/Target/X86/X86.h +++ b/lib/Target/X86/X86.h @@ -31,6 +31,7 @@ enum X86VectorEnum { extern X86VectorEnum X86Vector; extern bool X86ScalarSSE; +extern bool X86DAGIsel; /// createX86ISelPattern - This pass converts an LLVM function into a /// machine code representation using pattern matching and a machine diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 7520b2e4e6e..8abdfbf416b 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -27,6 +27,7 @@ using namespace llvm; X86VectorEnum llvm::X86Vector = NoSSE; bool llvm::X86ScalarSSE = false; +bool llvm::X86DAGIsel = false; /// X86TargetMachineModule - Note that this is used on hosts that cannot link /// in a library unless there are references into the library. In particular, @@ -44,8 +45,10 @@ namespace { cl::location(X86ScalarSSE), cl::init(false)); - cl::opt EnableX86DAGDAG("enable-x86-dag-isel", cl::Hidden, - cl::desc("Enable DAG-to-DAG isel for X86")); + cl::opt EnableX86DAGDAG("enable-x86-dag-isel", cl::Hidden, + cl::desc("Enable DAG-to-DAG isel for X86"), + cl::location(X86DAGIsel), + cl::init(false)); // FIXME: This should eventually be handled with target triples and // subtarget support! @@ -124,7 +127,7 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, PM.add(createUnreachableBlockEliminationPass()); // Install an instruction selector. - if (EnableX86DAGDAG) + if (X86DAGIsel) PM.add(createX86ISelDag(*this)); else PM.add(createX86ISelPattern(*this)); @@ -191,7 +194,7 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { PM.add(createUnreachableBlockEliminationPass()); // Install an instruction selector. - if (EnableX86DAGDAG) + if (X86DAGIsel) PM.add(createX86ISelDag(TM)); else PM.add(createX86ISelPattern(TM)); -- 2.34.1