[llvm-commits] CVS: llvm/lib/Target/X86/X86TargetMachine.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 23 11:26:04 PDT 2003


Changes in directory llvm/lib/Target/X86:

X86TargetMachine.cpp updated: 1.14 -> 1.15

---
Log message:

Add support for the Switch instruction by running the lowerSwitch pass first



---
Diffs of the changes:

Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.14 llvm/lib/Target/X86/X86TargetMachine.cpp:1.15
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.14	Wed Feb 26 13:58:15 2003
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Wed Apr 23 11:24:55 2003
@@ -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 @@
 /// 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





More information about the llvm-commits mailing list