From 5448320a2061faeadedc800dff9a9adf14005a72 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 6 Jun 2014 19:04:48 +0000 Subject: [PATCH] Have TargetSelectionDAGInfo take a DataLayout initializer rather than 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 --- include/llvm/Target/TargetSelectionDAGInfo.h | 2 +- lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp | 4 ++-- lib/Target/AArch64/AArch64SelectionDAGInfo.cpp | 2 +- lib/Target/ARM/ARMSelectionDAGInfo.cpp | 5 ++--- lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp | 6 ++---- lib/Target/MSP430/MSP430SelectionDAGInfo.cpp | 3 +-- lib/Target/Mips/MipsSelectionDAGInfo.cpp | 3 +-- lib/Target/NVPTX/NVPTXTargetMachine.cpp | 2 +- lib/Target/PowerPC/PPCSelectionDAGInfo.cpp | 2 +- lib/Target/Sparc/SparcSelectionDAGInfo.cpp | 2 +- lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp | 2 +- lib/Target/X86/X86SelectionDAGInfo.cpp | 2 +- lib/Target/XCore/XCoreSelectionDAGInfo.cpp | 3 +-- 13 files changed, 16 insertions(+), 22 deletions(-) diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h index 98a5149d50f..78a2db183fb 100644 --- a/include/llvm/Target/TargetSelectionDAGInfo.h +++ b/include/llvm/Target/TargetSelectionDAGInfo.h @@ -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 diff --git a/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp b/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp index 1120be8ed2a..0e89bad5f26 100644 --- a/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp +++ b/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp @@ -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() { diff --git a/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp b/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp index 5c65b750ee5..0740b3d7e6f 100644 --- a/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp +++ b/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp @@ -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()) {} AArch64SelectionDAGInfo::~AArch64SelectionDAGInfo() {} diff --git a/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/lib/Target/ARM/ARMSelectionDAGInfo.cpp index 008ad640a47..1a9b4f30f48 100644 --- a/lib/Target/ARM/ARMSelectionDAGInfo.cpp +++ b/lib/Target/ARM/ARMSelectionDAGInfo.cpp @@ -19,9 +19,8 @@ using namespace llvm; #define DEBUG_TYPE "arm-selectiondag-info" ARMSelectionDAGInfo::ARMSelectionDAGInfo(const TargetMachine &TM) - : TargetSelectionDAGInfo(TM), - Subtarget(&TM.getSubtarget()) { -} + : TargetSelectionDAGInfo(TM.getDataLayout()), + Subtarget(&TM.getSubtarget()) {} ARMSelectionDAGInfo::~ARMSelectionDAGInfo() { } diff --git a/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp b/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp index 9e1e0fdf3d4..f66ffd284a9 100644 --- a/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp +++ b/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp @@ -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() { } diff --git a/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp b/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp index c700383b5cc..6ebddaffd30 100644 --- a/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp +++ b/lib/Target/MSP430/MSP430SelectionDAGInfo.cpp @@ -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() { } diff --git a/lib/Target/Mips/MipsSelectionDAGInfo.cpp b/lib/Target/Mips/MipsSelectionDAGInfo.cpp index 0d4398e2fe9..c8e995a991d 100644 --- a/lib/Target/Mips/MipsSelectionDAGInfo.cpp +++ b/lib/Target/Mips/MipsSelectionDAGInfo.cpp @@ -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() { } diff --git a/lib/Target/NVPTX/NVPTXTargetMachine.cpp b/lib/Target/NVPTX/NVPTXTargetMachine.cpp index 26a4f840520..30583b0ff8c 100644 --- a/lib/Target/NVPTX/NVPTXTargetMachine.cpp +++ b/lib/Target/NVPTX/NVPTXTargetMachine.cpp @@ -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(); diff --git a/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp b/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp index f742f726186..9b7dd3cc43a 100644 --- a/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp +++ b/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp @@ -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() { diff --git a/lib/Target/Sparc/SparcSelectionDAGInfo.cpp b/lib/Target/Sparc/SparcSelectionDAGInfo.cpp index eb36d2940b7..c2b897c6081 100644 --- a/lib/Target/Sparc/SparcSelectionDAGInfo.cpp +++ b/lib/Target/Sparc/SparcSelectionDAGInfo.cpp @@ -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() { diff --git a/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp b/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp index 97abee303b0..528227bd3c0 100644 --- a/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp +++ b/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp @@ -20,7 +20,7 @@ using namespace llvm; SystemZSelectionDAGInfo:: SystemZSelectionDAGInfo(const SystemZTargetMachine &TM) - : TargetSelectionDAGInfo(TM) { + : TargetSelectionDAGInfo(TM.getDataLayout()) { } SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() { diff --git a/lib/Target/X86/X86SelectionDAGInfo.cpp b/lib/Target/X86/X86SelectionDAGInfo.cpp index 744890d50c8..058da847be1 100644 --- a/lib/Target/X86/X86SelectionDAGInfo.cpp +++ b/lib/Target/X86/X86SelectionDAGInfo.cpp @@ -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()), TLI(*TM.getTargetLowering()) { } diff --git a/lib/Target/XCore/XCoreSelectionDAGInfo.cpp b/lib/Target/XCore/XCoreSelectionDAGInfo.cpp index 5a6bbe7b1d3..b72c520d84a 100644 --- a/lib/Target/XCore/XCoreSelectionDAGInfo.cpp +++ b/lib/Target/XCore/XCoreSelectionDAGInfo.cpp @@ -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() { }