Move AArch64SelectionDAGInfo down to the subtarget.

llvm-svn: 210557
This commit is contained in:
Eric Christopher 2014-06-10 18:21:53 +00:00
parent 89fe23e888
commit fcb06ca908
4 changed files with 6 additions and 4 deletions

View File

@ -44,7 +44,7 @@ AArch64Subtarget::AArch64Subtarget(const std::string &TT,
? "e-m:o-i64:64-i128:128-n32:64-S128" ? "e-m:o-i64:64-i128:128-n32:64-S128"
: (LittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128" : (LittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128"
: "E-m:e-i64:64-i128:128-n32:64-S128")), : "E-m:e-i64:64-i128:128-n32:64-S128")),
FrameLowering() { FrameLowering(), TSInfo(&DL) {
// Determine default and user-specified characteristics // Determine default and user-specified characteristics
if (CPUString.empty()) if (CPUString.empty())

View File

@ -16,6 +16,7 @@
#include "AArch64FrameLowering.h" #include "AArch64FrameLowering.h"
#include "AArch64RegisterInfo.h" #include "AArch64RegisterInfo.h"
#include "AArch64SelectionDAGInfo.h"
#include "llvm/IR/DataLayout.h" #include "llvm/IR/DataLayout.h"
#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Target/TargetSubtargetInfo.h"
#include <string> #include <string>
@ -53,6 +54,7 @@ protected:
const DataLayout DL; const DataLayout DL;
AArch64FrameLowering FrameLowering; AArch64FrameLowering FrameLowering;
AArch64SelectionDAGInfo TSInfo;
public: public:
/// This constructor initializes the data members to match that /// This constructor initializes the data members to match that
@ -60,6 +62,7 @@ public:
AArch64Subtarget(const std::string &TT, const std::string &CPU, AArch64Subtarget(const std::string &TT, const std::string &CPU,
const std::string &FS, bool LittleEndian); const std::string &FS, bool LittleEndian);
const AArch64SelectionDAGInfo *getSelectionDAGInfo() const { return &TSInfo; }
const AArch64FrameLowering *getFrameLowering() const { const AArch64FrameLowering *getFrameLowering() const {
return &FrameLowering; return &FrameLowering;
} }

View File

@ -78,7 +78,7 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, StringRef TT,
bool LittleEndian) bool LittleEndian)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
Subtarget(TT, CPU, FS, LittleEndian), Subtarget(TT, CPU, FS, LittleEndian),
InstrInfo(Subtarget), TLInfo(*this), TSInfo(getDataLayout()) { InstrInfo(Subtarget), TLInfo(*this) {
initAsmInfo(); initAsmInfo();
} }

View File

@ -32,7 +32,6 @@ protected:
private: private:
AArch64InstrInfo InstrInfo; AArch64InstrInfo InstrInfo;
AArch64TargetLowering TLInfo; AArch64TargetLowering TLInfo;
AArch64SelectionDAGInfo TSInfo;
public: public:
AArch64TargetMachine(const Target &T, StringRef TT, StringRef CPU, AArch64TargetMachine(const Target &T, StringRef TT, StringRef CPU,
@ -57,7 +56,7 @@ public:
return &InstrInfo.getRegisterInfo(); return &InstrInfo.getRegisterInfo();
} }
const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override { const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override {
return &TSInfo; return getSubtargetImpl()->getSelectionDAGInfo();
} }
// Pass Pipeline Configuration // Pass Pipeline Configuration