diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:24:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-23 16:24:55 +0000 |
commit | 155e68feea21534d69be3cdbcc16991398b7664a (patch) | |
tree | 5fc4ad225bc152662146c592783500479727545b /lib/Target/X86/X86TargetMachine.cpp | |
parent | 3b1ca40d5d6c8e796db1e218e88dd7e2b77b417e (diff) |
Add support for the Switch instruction by running the lowerSwitch pass first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | lib/Target/X86/X86TargetMachine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 5015a9605b..4113d0e6dc 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -6,10 +6,11 @@ #include "X86TargetMachine.h" #include "X86.h" +#include "llvm/PassManager.h" #include "llvm/Target/TargetMachineImpls.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" -#include "llvm/PassManager.h" +#include "llvm/Transforms/Scalar.h" #include "Support/CommandLine.h" #include "Support/Statistic.h" #include <iostream> @@ -45,6 +46,9 @@ X86TargetMachine::X86TargetMachine(unsigned Config) /// not supported for this target. /// bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) { + // FIXME: Implement the switch instruction in the instruction selector! + PM.add(createLowerSwitchPass()); + PM.add(createSimpleX86InstructionSelector(*this)); // TODO: optional optimizations go here |