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
This commit is contained in:
Eric Christopher 2014-06-06 19:04:48 +00:00
parent 5beec3aa92
commit 5448320a20
13 changed files with 16 additions and 22 deletions

View 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

View 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() {

View 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() {}

View 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() {
}

View 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() {
}

View 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() {
}

View 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() {
}

View 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();

View 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() {

View 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() {

View File

@ -20,7 +20,7 @@ using namespace llvm;
SystemZSelectionDAGInfo::
SystemZSelectionDAGInfo(const SystemZTargetMachine &TM)
: TargetSelectionDAGInfo(TM) {
: TargetSelectionDAGInfo(TM.getDataLayout()) {
}
SystemZSelectionDAGInfo::~SystemZSelectionDAGInfo() {

View 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()) {
}

View 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() {
}