Move AArch64InstrInfo to AArch64Subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-06-10 22:57:25 +00:00
parent 468a0ce16f
commit 159e408563
4 changed files with 9 additions and 6 deletions

View File

@ -44,7 +44,7 @@ AArch64Subtarget::AArch64Subtarget(const std::string &TT,
? "e-m:o-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")),
FrameLowering(), TSInfo(&DL) {
FrameLowering(), InstrInfo(*this), TSInfo(&DL) {
// Determine default and user-specified characteristics
if (CPUString.empty())

View File

@ -14,6 +14,7 @@
#ifndef AArch64SUBTARGET_H
#define AArch64SUBTARGET_H
#include "AArch64InstrInfo.h"
#include "AArch64FrameLowering.h"
#include "AArch64RegisterInfo.h"
#include "AArch64SelectionDAGInfo.h"
@ -54,6 +55,7 @@ protected:
const DataLayout DL;
AArch64FrameLowering FrameLowering;
AArch64InstrInfo InstrInfo;
AArch64SelectionDAGInfo TSInfo;
public:
@ -66,6 +68,7 @@ public:
const AArch64FrameLowering *getFrameLowering() const {
return &FrameLowering;
}
const AArch64InstrInfo *getInstrInfo() const { return &InstrInfo; }
const DataLayout *getDataLayout() const { return &DL; }
bool enableMachineScheduler() const override { return true; }

View File

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

View File

@ -30,7 +30,6 @@ protected:
AArch64Subtarget Subtarget;
private:
AArch64InstrInfo InstrInfo;
AArch64TargetLowering TLInfo;
public:
@ -51,9 +50,11 @@ public:
const AArch64FrameLowering *getFrameLowering() const override {
return getSubtargetImpl()->getFrameLowering();
}
const AArch64InstrInfo *getInstrInfo() const override { return &InstrInfo; }
const AArch64InstrInfo *getInstrInfo() const override {
return getSubtargetImpl()->getInstrInfo();
}
const AArch64RegisterInfo *getRegisterInfo() const override {
return &InstrInfo.getRegisterInfo();
return &getInstrInfo()->getRegisterInfo();
}
const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override {
return getSubtargetImpl()->getSelectionDAGInfo();