summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-24 08:18:44 +0000
committerChris Lattner <sabre@nondot.org>2004-08-24 08:18:44 +0000
commitdfa9dbceaaffae755963e47ceb90a8d681dd8bc9 (patch)
tree83244f9505934b257f57860b291d9d7eabe62dbb /llvm/lib
parent61e6dbc7616dbc4a376e775eed446ac7359460cc (diff)
downloadbcm5719-llvm-dfa9dbceaaffae755963e47ceb90a8d681dd8bc9.tar.gz
bcm5719-llvm-dfa9dbceaaffae755963e47ceb90a8d681dd8bc9.zip
Add -sse[,2,3] arguments to LLC
llvm-svn: 16018
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86.h6
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp14
2 files changed, 20 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86.h b/llvm/lib/Target/X86/X86.h
index 3b5360ef87c..c6d6a55c06e 100644
--- a/llvm/lib/Target/X86/X86.h
+++ b/llvm/lib/Target/X86/X86.h
@@ -23,6 +23,12 @@ class TargetMachine;
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.
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 51ba378135d..1a9e978dc4a 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -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 @@ namespace {
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)");
}
OpenPOWER on IntegriCloud