Have TargetSelectionDAGInfo take a DataLayout initializer rather than
authorEric Christopher <echristo@gmail.com>
Fri, 6 Jun 2014 19:04:48 +0000 (19:04 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 6 Jun 2014 19:04:48 +0000 (19:04 +0000)
a TargetMachine since the only thing it wants is DataLayout.

llvm-svn: 210366

13 files changed:
llvm/include/llvm/Target/TargetSelectionDAGInfo.h
llvm/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp
llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp
llvm/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp
llvm/lib/Target/Mips/MipsSelectionDAGInfo.cpp
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
llvm/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp
llvm/lib/Target/Sparc/SparcSelectionDAGInfo.cpp
llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp
llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
llvm/lib/Target/XCore/XCoreSelectionDAGInfo.cpp

index 98a5149..78a2db1 100644 (file)
@@ -37,7 +37,7 @@ protected:
   const DataLayout *getDataLayout() const { return DL; }
 
 public:
-  explicit TargetSelectionDAGInfo(const TargetMachine &TM);
+  explicit TargetSelectionDAGInfo(const DataLayout *DL);
   virtual ~TargetSelectionDAGInfo();
 
   /// EmitTargetCodeForMemcpy - Emit target-specific code that performs a
index 1120be8..0e89bad 100644 (file)
@@ -15,8 +15,8 @@
 #include "llvm/Target/TargetMachine.h"
 using namespace llvm;
 
-TargetSelectionDAGInfo::TargetSelectionDAGInfo(const TargetMachine &TM)
-  : DL(TM.getDataLayout()) {
+TargetSelectionDAGInfo::TargetSelectionDAGInfo(const DataLayout *DL)
+  : DL(DL) {
 }
 
 TargetSelectionDAGInfo::~TargetSelectionDAGInfo() {
index 5c65b75..0740b3d 100644 (file)
@@ -17,7 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "aarch64-selectiondag-info"
 
 AArch64SelectionDAGInfo::AArch64SelectionDAGInfo(const TargetMachine &TM)
-    : TargetSelectionDAGInfo(TM),
+    : TargetSelectionDAGInfo(TM.getDataLayout()),
       Subtarget(&TM.getSubtarget<AArch64Subtarget>()) {}
 
 AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {}
index 008ad64..1a9b4f3 100644 (file)
@@ -19,9 +19,8 @@ using namespace llvm;
 #define DEBUG_TYPE "arm-selectiondag-info"
 
 ARMSelectionDAGInfo::ARMSelectionDAGInfo(const TargetMachine &TM)
-  : TargetSelectionDAGInfo(TM),
-    Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
-}
+    : TargetSelectionDAGInfo(TM.getDataLayout()),
+      Subtarget(&TM.getSubtarget<ARMSubtarget>()) {}
 
 ARMSelectionDAGInfo::~ARMSelectionDAGInfo() {
 }
index 9e1e0fd..f66ffd2 100644 (file)
@@ -18,10 +18,8 @@ using namespace llvm;
 
 bool llvm::flag_aligned_memcpy;
 
-HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const HexagonTargetMachine
-                                                 &TM)
-  : TargetSelectionDAGInfo(TM) {
-}
+HexagonSelectionDAGInfo::HexagonSelectionDAGInfo(const HexagonTargetMachine &TM)
+    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
 
 HexagonSelectionDAGInfo::~HexagonSelectionDAGInfo() {
 }
index c700383..6ebddaf 100644 (file)
@@ -17,8 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "msp430-selectiondag-info"
 
 MSP430SelectionDAGInfo::MSP430SelectionDAGInfo(const MSP430TargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
-}
+    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
 
 MSP430SelectionDAGInfo::~MSP430SelectionDAGInfo() {
 }
index 0d4398e..c8e995a 100644 (file)
@@ -17,8 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "mips-selectiondag-info"
 
 MipsSelectionDAGInfo::MipsSelectionDAGInfo(const MipsTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
-}
+    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
 
 MipsSelectionDAGInfo::~MipsSelectionDAGInfo() {
 }
index 26a4f84..30583b0 100644 (file)
@@ -83,7 +83,7 @@ NVPTXTargetMachine::NVPTXTargetMachine(
     CodeGenOpt::Level OL, bool is64bit)
     : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
       Subtarget(TT, CPU, FS, is64bit), DL(computeDataLayout(Subtarget)),
-      InstrInfo(*this), TLInfo(*this), TSInfo(*this),
+      InstrInfo(*this), TLInfo(*this), TSInfo(&DL),
       FrameLowering(
           *this, is64bit) /*FrameInfo(TargetFrameInfo::StackGrowsUp, 8, 0)*/ {
   initAsmInfo();
index f742f72..9b7dd3c 100644 (file)
@@ -17,7 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "powerpc-selectiondag-info"
 
 PPCSelectionDAGInfo::PPCSelectionDAGInfo(const PPCTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
+  : TargetSelectionDAGInfo(TM.getDataLayout()) {
 }
 
 PPCSelectionDAGInfo::~PPCSelectionDAGInfo() {
index eb36d29..c2b897c 100644 (file)
@@ -17,7 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "sparc-selectiondag-info"
 
 SparcSelectionDAGInfo::SparcSelectionDAGInfo(const SparcTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
+  : TargetSelectionDAGInfo(TM.getDataLayout()) {
 }
 
 SparcSelectionDAGInfo::~SparcSelectionDAGInfo() {
index 97abee3..528227b 100644 (file)
@@ -20,7 +20,7 @@ using namespace llvm;
 
 SystemZSelectionDAGInfo::
 SystemZSelectionDAGInfo(const SystemZTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
+  : TargetSelectionDAGInfo(TM.getDataLayout()) {
 }
 
 SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() {
index 744890d..058da84 100644 (file)
@@ -19,7 +19,7 @@ using namespace llvm;
 #define DEBUG_TYPE "x86-selectiondag-info"
 
 X86SelectionDAGInfo::X86SelectionDAGInfo(const X86TargetMachine &TM) :
-  TargetSelectionDAGInfo(TM),
+  TargetSelectionDAGInfo(TM.getDataLayout()),
   Subtarget(&TM.getSubtarget<X86Subtarget>()),
   TLI(*TM.getTargetLowering()) {
 }
index 5a6bbe7..b72c520 100644 (file)
@@ -17,8 +17,7 @@ using namespace llvm;
 #define DEBUG_TYPE "xcore-selectiondag-info"
 
 XCoreSelectionDAGInfo::XCoreSelectionDAGInfo(const XCoreTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
-}
+    : TargetSelectionDAGInfo(TM.getDataLayout()) {}
 
 XCoreSelectionDAGInfo::~XCoreSelectionDAGInfo() {
 }