aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-16 01:54:32 +0000
committerChris Lattner <sabre@nondot.org>2005-11-16 01:54:32 +0000
commitc961eea6cb8d0a2d75fa074832f5c797f90330ef (patch)
tree1abe992915ac309d02e3a970258717aece952eec /lib/Target/X86/X86TargetMachine.cpp
parent422b0cee7a32636303398d8788f98a59bf15381c (diff)
initial step at adding a dag-to-dag isel for X86 backend. Patch contributed
by Evan Cheng! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 4862a230cb..1d87152d10 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/lib/Target/X86/X86TargetMachine.cpp
@@ -47,6 +47,9 @@ namespace {
cl::location(X86ScalarSSE),
cl::init(false));
+ cl::opt<bool> EnableX86DAGDAG("enable-x86-dag-isel", cl::Hidden,
+ cl::desc("Enable DAG-to-DAG isel for X86"));
+
// FIXME: This should eventually be handled with target triples and
// subtarget support!
cl::opt<X86VectorEnum, true>
@@ -124,7 +127,10 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out,
PM.add(createUnreachableBlockEliminationPass());
// Install an instruction selector.
- PM.add(createX86ISelPattern(*this));
+ if (EnableX86DAGDAG)
+ PM.add(createX86ISelDag(*this));
+ else
+ PM.add(createX86ISelPattern(*this));
// Run optional SSA-based machine code optimizations next...
if (!NoSSAPeephole)
@@ -192,7 +198,10 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
PM.add(createUnreachableBlockEliminationPass());
// Install an instruction selector.
- PM.add(createX86ISelPattern(TM));
+ if (EnableX86DAGDAG)
+ PM.add(createX86ISelDag(TM));
+ else
+ PM.add(createX86ISelPattern(TM));
// Run optional SSA-based machine code optimizations next...
if (!NoSSAPeephole)