Index: lib/Target/X86/X86TargetMachine.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86TargetMachine.cpp,v retrieving revision 1.71 diff -u -r1.71 X86TargetMachine.cpp --- lib/Target/X86/X86TargetMachine.cpp 2 Nov 2004 15:27:57 -0000 1.71 +++ lib/Target/X86/X86TargetMachine.cpp 18 Nov 2004 10:35:56 -0000 @@ -92,6 +92,9 @@ // does to emit statically compiled machine code. bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out) { + // FIXME: Implement SSE selection and don't do this if the target is SSE capable + PM.add(createLowerPackedPass()); + // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); @@ -147,6 +150,9 @@ /// not supported for this target. /// void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { + // FIXME: Implement SSE selection and don't do this if the target is SSE capable + PM.add(createLowerPackedPass()); + // FIXME: Implement efficient support for garbage collection intrinsics. PM.add(createLowerGCPass()); Index: lib/Transforms/Scalar/LowerPacked.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/LowerPacked.cpp,v retrieving revision 1.2 diff -u -r1.2 LowerPacked.cpp --- lib/Transforms/Scalar/LowerPacked.cpp 1 Sep 2004 22:55:36 -0000 1.2 +++ lib/Transforms/Scalar/LowerPacked.cpp 18 Nov 2004 09:04:21 -0000 @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Transforms/Scalar.h" #include "llvm/Argument.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" @@ -27,11 +28,6 @@ using namespace llvm; namespace { - -/// This pass converts packed operators to an -/// equivalent operations on smaller packed data, to possibly -/// scalar operations. Currently it supports lowering -/// to scalar operations. /// /// @brief Transforms packed instructions to simpler instructions. /// @@ -98,6 +94,15 @@ } // end namespace +/// This pass converts packed operators to an +/// equivalent operations on smaller packed data, to possibly +/// scalar operations. Currently it supports lowering +/// to scalar operations. + +FunctionPass *llvm::createLowerPackedPass() { + return new LowerPacked(); +} + // This function sets lowered values for a corresponding // packed value. Note, in the case of a forward reference // getValues(Value*) will have already been called for