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

Chris Lattner lattner at cs.uiuc.edu
Tue Aug 24 01:18:55 PDT 2004



Changes in directory llvm/lib/Target/X86:

X86.h updated: 1.28 -> 1.29
X86TargetMachine.cpp updated: 1.65 -> 1.66
---
Log message:

Add -sse[,2,3] arguments to LLC


---
Diffs of the changes:  (+20 -0)

Index: llvm/lib/Target/X86/X86.h
diff -u llvm/lib/Target/X86/X86.h:1.28 llvm/lib/Target/X86/X86.h:1.29
--- llvm/lib/Target/X86/X86.h:1.28	Sun Aug 15 18:02:17 2004
+++ llvm/lib/Target/X86/X86.h	Tue Aug 24 03:18:44 2004
@@ -23,6 +23,12 @@
 class FunctionPass;
 class IntrinsicLowering;
 
+enum X86VectorEnum {
+  NoSSE, SSE, SSE2, SSE3
+};
+
+extern X86VectorEnum X86Vector;
+
 /// createX86SimpleInstructionSelector - This pass converts an LLVM function
 /// into a machine code representation in a very simple peep-hole fashion.  The
 /// generated code sucks but the implementation is nice and simple.


Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.65 llvm/lib/Target/X86/X86TargetMachine.cpp:1.66
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.65	Sun Aug 15 18:02:17 2004
+++ llvm/lib/Target/X86/X86TargetMachine.cpp	Tue Aug 24 03:18:44 2004
@@ -25,6 +25,8 @@
 #include "Support/Statistic.h"
 using namespace llvm;
 
+X86VectorEnum llvm::X86Vector = NoSSE;
+
 namespace {
   cl::opt<bool> NoSSAPeephole("disable-ssa-peephole", cl::init(true),
                         cl::desc("Disable the ssa-based peephole optimizer "
@@ -33,6 +35,18 @@
                               cl::desc("Disable the X86 asm printer, for use "
                                        "when profiling the code generator."));
 
+  // FIXME: This should eventually be handled with target triples and
+  // subtarget support!
+  cl::opt<X86VectorEnum, true>
+  SSEArg(
+    cl::desc("Enable SSE support in the X86 target:"),
+    cl::values(
+       clEnumValN(SSE,  "sse", "  Enable SSE support"),
+       clEnumValN(SSE2, "sse2", "  Enable SSE and SSE2 support"),
+       clEnumValN(SSE3, "sse3", "  Enable SSE, SSE2, and SSE3 support"),
+       clEnumValEnd),
+    cl::location(X86Vector), cl::init(NoSSE));
+
   // Register the target.
   RegisterTarget<X86TargetMachine> X("x86", "  IA-32 (Pentium and above)");
 }






More information about the llvm-commits mailing list