[llvm-commits] CVS: llvm/lib/Target/TargetLowering.cpp TargetMachine.cpp
Owen Anderson
resistor at mac.com
Tue May 2 18:30:21 PDT 2006
Changes in directory llvm/lib/Target:
TargetLowering.cpp updated: 1.53 -> 1.54
TargetMachine.cpp updated: 1.43 -> 1.44
---
Log message:
Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759: http://llvm.cs.uiuc.edu/PR759 .
---
Diffs of the changes: (+3 -17)
TargetLowering.cpp | 4 ++--
TargetMachine.cpp | 16 +---------------
2 files changed, 3 insertions(+), 17 deletions(-)
Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.53 llvm/lib/Target/TargetLowering.cpp:1.54
--- llvm/lib/Target/TargetLowering.cpp:1.53 Sun Apr 2 00:19:46 2006
+++ llvm/lib/Target/TargetLowering.cpp Tue May 2 20:29:56 2006
@@ -27,8 +27,8 @@
// All operations default to being supported.
memset(OpActions, 0, sizeof(OpActions));
- IsLittleEndian = TD.isLittleEndian();
- ShiftAmountTy = SetCCResultTy = PointerTy = getValueType(TD.getIntPtrType());
+ IsLittleEndian = TD->isLittleEndian();
+ ShiftAmountTy = SetCCResultTy = PointerTy = getValueType(TD->getIntPtrType());
ShiftAmtHandling = Undefined;
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
memset(TargetDAGCombineArray, 0,
Index: llvm/lib/Target/TargetMachine.cpp
diff -u llvm/lib/Target/TargetMachine.cpp:1.43 llvm/lib/Target/TargetMachine.cpp:1.44
--- llvm/lib/Target/TargetMachine.cpp:1.43 Wed Mar 22 23:43:15 2006
+++ llvm/lib/Target/TargetMachine.cpp Tue May 2 20:29:56 2006
@@ -69,23 +69,9 @@
//---------------------------------------------------------------------------
// TargetMachine Class
//
-TargetMachine::TargetMachine(const std::string &name, bool LittleEndian,
- unsigned char PtrSize, unsigned char PtrAl,
- unsigned char DoubleAl, unsigned char FloatAl,
- unsigned char LongAl, unsigned char IntAl,
- unsigned char ShortAl, unsigned char ByteAl,
- unsigned char BoolAl)
- : Name(name), DataLayout(name, LittleEndian,
- PtrSize, PtrAl, DoubleAl, FloatAl, LongAl,
- IntAl, ShortAl, ByteAl, BoolAl) {
-}
-
-TargetMachine::TargetMachine(const std::string &name, const TargetData &TD)
- : Name(name), DataLayout(TD) {
-}
TargetMachine::TargetMachine(const std::string &name, const Module &M)
- : Name(name), DataLayout(name, &M) {
+ : Name(name) {
}
TargetMachine::~TargetMachine() {
More information about the llvm-commits
mailing list