[llvm-commits] [parallel] CVS: llvm/lib/Target/TargetMachine.cpp
Misha Brukman
brukman at cs.uiuc.edu
Wed Mar 10 19:04:01 PST 2004
Changes in directory llvm/lib/Target:
TargetMachine.cpp updated: 1.21.2.1 -> 1.21.2.2
---
Log message:
Merge from trunk.
---
Diffs of the changes: (+20 -0)
Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.21.2.1 llvm/lib/Target/TargetMachine.cpp:1.21.2.2
--- llvm/lib/Target/TargetMachine.cpp:1.21.2.1 Mon Mar 1 17:58:13 2004
+++ llvm/lib/Target/TargetMachine.cpp Wed Mar 10 19:03:49 2004
@@ -14,9 +14,23 @@
#include "llvm/Target/TargetMachine.h"
#include "llvm/Type.h"
#include "llvm/IntrinsicLowering.h"
+#include "Support/CommandLine.h"
using namespace llvm;
//---------------------------------------------------------------------------
+// Command-line options that tend to be useful on more than one back-end.
+//
+
+namespace llvm {
+ bool PrintMachineCode;
+};
+namespace {
+ cl::opt<bool, true> PrintCode("print-machineinstrs",
+ cl::desc("Print generated machine code"),
+ cl::location(PrintMachineCode), cl::init(false));
+};
+
+//---------------------------------------------------------------------------
// TargetMachine Class
//
TargetMachine::TargetMachine(const std::string &name, IntrinsicLowering *il,
@@ -28,6 +42,12 @@
: Name(name), DataLayout(name, LittleEndian,
PtrSize, PtrAl, DoubleAl, FloatAl, LongAl,
IntAl, ShortAl, ByteAl) {
+ IL = il ? il : new DefaultIntrinsicLowering();
+}
+
+TargetMachine::TargetMachine(const std::string &name, IntrinsicLowering *il,
+ const Module &M)
+ : Name(name), DataLayout(name, &M) {
IL = il ? il : new DefaultIntrinsicLowering();
}
More information about the llvm-commits
mailing list