forked from OSchip/llvm-project
Move AArch64FrameLowering into the subtarget.
llvm-svn: 210549
This commit is contained in:
parent
bc76b97797
commit
29aab7b355
|
@ -36,7 +36,7 @@ AArch64Subtarget::AArch64Subtarget(const std::string &TT,
|
|||
: AArch64GenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others),
|
||||
HasFPARMv8(false), HasNEON(false), HasCrypto(false), HasCRC(false),
|
||||
HasZeroCycleRegMove(false), HasZeroCycleZeroing(false), CPUString(CPU),
|
||||
TargetTriple(TT), IsLittleEndian(LittleEndian) {
|
||||
TargetTriple(TT), IsLittleEndian(LittleEndian), FrameLowering() {
|
||||
// Determine default and user-specified characteristics
|
||||
|
||||
if (CPUString.empty())
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
#ifndef AArch64SUBTARGET_H
|
||||
#define AArch64SUBTARGET_H
|
||||
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include "AArch64FrameLowering.h"
|
||||
#include "AArch64RegisterInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
#define GET_SUBTARGETINFO_HEADER
|
||||
|
@ -52,12 +53,18 @@ protected:
|
|||
/// IsLittleEndian - Is the target little endian?
|
||||
bool IsLittleEndian;
|
||||
|
||||
AArch64FrameLowering FrameLowering;
|
||||
|
||||
public:
|
||||
/// This constructor initializes the data members to match that
|
||||
/// of the specified triple.
|
||||
AArch64Subtarget(const std::string &TT, const std::string &CPU,
|
||||
const std::string &FS, bool LittleEndian);
|
||||
|
||||
const AArch64FrameLowering *getFrameLowering() const {
|
||||
return &FrameLowering;
|
||||
}
|
||||
|
||||
bool enableMachineScheduler() const override { return true; }
|
||||
|
||||
bool hasZeroCycleRegMove() const { return HasZeroCycleRegMove; }
|
||||
|
|
|
@ -85,7 +85,7 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, StringRef 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")),
|
||||
InstrInfo(Subtarget), TLInfo(*this), FrameLowering(), TSInfo(*this) {
|
||||
InstrInfo(Subtarget), TLInfo(*this), TSInfo(*this) {
|
||||
initAsmInfo();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ private:
|
|||
const DataLayout DL;
|
||||
AArch64InstrInfo InstrInfo;
|
||||
AArch64TargetLowering TLInfo;
|
||||
AArch64FrameLowering FrameLowering;
|
||||
AArch64SelectionDAGInfo TSInfo;
|
||||
|
||||
public:
|
||||
|
@ -50,7 +49,7 @@ public:
|
|||
}
|
||||
const DataLayout *getDataLayout() const override { return &DL; }
|
||||
const AArch64FrameLowering *getFrameLowering() const override {
|
||||
return &FrameLowering;
|
||||
return getSubtargetImpl()->getFrameLowering();
|
||||
}
|
||||
const AArch64InstrInfo *getInstrInfo() const override { return &InstrInfo; }
|
||||
const AArch64RegisterInfo *getRegisterInfo() const override {
|
||||
|
|
Loading…
Reference in New Issue