diff options
author | Eric Christopher <echristo@gmail.com> | 2014-06-12 23:02:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-06-12 23:02:32 +0000 |
commit | cccc317ee06643fd6cb8dff4bdb93a687c0e4fb3 (patch) | |
tree | 58fdb5acd02be3fdceec88d4fffa750c15c1ce80 /lib/Target/PowerPC | |
parent | 8c5dc520ef1b13db2226d4b2743fef95c1c44965 (diff) | |
download | llvm-cccc317ee06643fd6cb8dff4bdb93a687c0e4fb3.tar.gz llvm-cccc317ee06643fd6cb8dff4bdb93a687c0e4fb3.tar.bz2 llvm-cccc317ee06643fd6cb8dff4bdb93a687c0e4fb3.tar.xz |
Move the PPCSelectionDAGInfo off the TargetMachine and onto the
subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCSubtarget.cpp | 2 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCSubtarget.h | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 3 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.h | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index cee54bd991..0759200ce3 100644 --- a/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/lib/Target/PowerPC/PPCSubtarget.cpp @@ -81,7 +81,7 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU, OptLevel(OptLevel), FrameLowering(initializeSubtargetDependencies(CPU, FS)), DL(getDataLayoutString(*this)), InstrInfo(*this), JITInfo(*this), - TLInfo(TM) {} + TLInfo(TM), TSInfo(&DL) {} /// SetJITMode - This is called to inform the subtarget info that we are /// producing code for the JIT. diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h index 91d1746a8d..3436095a22 100644 --- a/lib/Target/PowerPC/PPCSubtarget.h +++ b/lib/Target/PowerPC/PPCSubtarget.h @@ -18,6 +18,7 @@ #include "PPCInstrInfo.h" #include "PPCISelLowering.h" #include "PPCJITInfo.h" +#include "PPCSelectionDAGInfo.h" #include "llvm/ADT/Triple.h" #include "llvm/IR/DataLayout.h" #include "llvm/MC/MCInstrItineraries.h" @@ -112,6 +113,7 @@ protected: PPCInstrInfo InstrInfo; PPCJITInfo JITInfo; PPCTargetLowering TLInfo; + PPCSelectionDAGInfo TSInfo; public: /// This constructor initializes the data members to match that @@ -147,6 +149,7 @@ public: const PPCInstrInfo *getInstrInfo() const { return &InstrInfo; } PPCJITInfo *getJITInfo() { return &JITInfo; } const PPCTargetLowering *getTargetLowering() const { return &TLInfo; } + const PPCSelectionDAGInfo *getSelectionDAGInfo() const { return &TSInfo; } /// initializeSubtargetDependencies - Initializes using a CPU and feature string /// so that we can use initializer lists for subtarget initialization. diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index dc23e95894..9563b9045c 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -42,8 +42,7 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT, StringRef CPU, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool is64Bit) : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), - Subtarget(TT, CPU, FS, *this, is64Bit, OL), - TSInfo(Subtarget.getDataLayout()) { + Subtarget(TT, CPU, FS, *this, is64Bit, OL) { initAsmInfo(); } diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index 705874c473..3cf8063b70 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -29,7 +29,6 @@ namespace llvm { /// class PPCTargetMachine : public LLVMTargetMachine { PPCSubtarget Subtarget; - PPCSelectionDAGInfo TSInfo; public: PPCTargetMachine(const Target &T, StringRef TT, @@ -48,7 +47,7 @@ public: return getSubtargetImpl()->getTargetLowering(); } const PPCSelectionDAGInfo* getSelectionDAGInfo() const override { - return &TSInfo; + return getSubtargetImpl()->getSelectionDAGInfo(); } const PPCRegisterInfo *getRegisterInfo() const override { return &getInstrInfo()->getRegisterInfo(); |