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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210366 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 98a5149d50f8a173d22d20463083e9d90988169b..78a2db183fb1301e841622504806fc312c9beca2 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 1120be8ed2abe6d5aeafb06a33ecad8c7311b111..0e89bad5f26f5528804f283726c7eced5370a832 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 5c65b750ee5569eb82a3abbc9cc53479b3f864f0..0740b3d7e6f758924eaa04736351cc4a7982e9d9 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 008ad640a4763559758710f8115cd798bba26c29..1a9b4f30f48581e5dab5333f278a36534b08cb58 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 9e1e0fdf3d4807611de458535bb07985bde8555f..f66ffd284a930f7919aa0a940cd1bf2062b78679 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 c700383b5cccfe6d88e2634d40fcb6be858b63b5..6ebddaffd30a98a257010cdb19cd0a9606ac51d0 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 0d4398e2fe9528ed29256711c17ba572b1b1d548..c8e995a991da99519e8198a45cad60142b52d588 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 26a4f840520e8edc84e54d0760edeaafb588a953..30583b0ff8c1885728f2aec73e96a93d4f1ca77b 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 f742f726186bfff4fd95edd1dab9add4d2466f73..9b7dd3cc43a37fd7c03dd4ca780264c80f06c683 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 eb36d2940b762db51f2c3ada8a1c69456313c4ca..c2b897c6081a5220bbe3203d2a1841f736bd95c0 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 97abee303b0956c7aa8796029f3d935c0d01e549..528227bd3c0ab5161b4b2d4323c4c99fa4880f11 100644 (file)
@@ -20,7 +20,7 @@ using namespace llvm;
 
 SystemZSelectionDAGInfo::
 SystemZSelectionDAGInfo(const SystemZTargetMachine &TM)
-  : TargetSelectionDAGInfo(TM) {
+  : TargetSelectionDAGInfo(TM.getDataLayout()) {
 }
 
 SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() {
index 744890d50c83c641b7db8dd09afc0a1cade42864..058da847be1696fd8cb29dec011e9eb68fac81da 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 5a6bbe7b1d3efa09253fa167cf93ee08f35a9ec4..b72c520d84a5e00170b603057e3bdcdf16c09ca2 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() {
 }