[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 29 20:57:55 PST 2006
Changes in directory llvm/lib/Target/SparcV8:
SparcV8Subtarget.cpp updated: 1.3 -> 1.4
---
Log message:
Two changes:
1. Default to having V9 instructions, instead of just V8.
2. unless -enable-sparc-v9-insts is passed, disable V9 (for use with llcbeta)
---
Diffs of the changes: (+11 -0)
SparcV8Subtarget.cpp | 11 +++++++++++
1 files changed, 11 insertions(+)
Index: llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp:1.3 llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp:1.4
--- llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp:1.3 Fri Jan 27 16:38:36 2006
+++ llvm/lib/Target/SparcV8/SparcV8Subtarget.cpp Sun Jan 29 22:57:43 2006
@@ -15,6 +15,13 @@
#include "SparcV8GenSubtarget.inc"
using namespace llvm;
+// FIXME: temporary.
+#include "llvm/Support/CommandLine.h"
+namespace {
+ cl::opt<bool> EnableV9("enable-sparc-v9-insts", cl::Hidden,
+ cl::desc("Enable V9 instructions in the V8 target"));
+}
+
SparcV8Subtarget::SparcV8Subtarget(const Module &M, const std::string &FS) {
// Set the default features.
IsV9 = false;
@@ -25,8 +32,12 @@
std::string CPU = "generic";
// FIXME: autodetect host here!
+ CPU = "v9"; // What is a good way to detect V9?
// Parse features string.
ParseSubtargetFeatures(FS, CPU);
+ // Unless explicitly enabled, disable the V9 instructions.
+ if (!EnableV9)
+ IsV9 = false;
};
More information about the llvm-commits
mailing list