mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Move DataLayout onto the AArch64 subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a7d793fd1
commit
fc0f6e8cc5
@ -36,7 +36,15 @@ 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), FrameLowering() {
|
||||
TargetTriple(TT), IsLittleEndian(LittleEndian),
|
||||
// This nested ternary is horrible, but DL needs to be properly
|
||||
// initialized
|
||||
// before TLInfo is constructed.
|
||||
DL(isTargetMachO()
|
||||
? "e-m:o-i64:64-i128:128-n32:64-S128"
|
||||
: (IsLittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128"
|
||||
: "E-m:e-i64:64-i128:128-n32:64-S128")),
|
||||
FrameLowering() {
|
||||
// Determine default and user-specified characteristics
|
||||
|
||||
if (CPUString.empty())
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "AArch64FrameLowering.h"
|
||||
#include "AArch64RegisterInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
#include <string>
|
||||
|
||||
@ -53,6 +54,7 @@ protected:
|
||||
/// IsLittleEndian - Is the target little endian?
|
||||
bool IsLittleEndian;
|
||||
|
||||
const DataLayout DL;
|
||||
AArch64FrameLowering FrameLowering;
|
||||
|
||||
public:
|
||||
@ -64,7 +66,7 @@ public:
|
||||
const AArch64FrameLowering *getFrameLowering() const {
|
||||
return &FrameLowering;
|
||||
}
|
||||
|
||||
const DataLayout *getDataLayout() const { return &DL; }
|
||||
bool enableMachineScheduler() const override { return true; }
|
||||
|
||||
bool hasZeroCycleRegMove() const { return HasZeroCycleRegMove; }
|
||||
|
@ -78,13 +78,6 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, StringRef TT,
|
||||
bool LittleEndian)
|
||||
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
|
||||
Subtarget(TT, CPU, FS, LittleEndian),
|
||||
// This nested ternary is horrible, but DL needs to be properly
|
||||
// initialized
|
||||
// before TLInfo is constructed.
|
||||
DL(Subtarget.isTargetMachO()
|
||||
? "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), TSInfo(*this) {
|
||||
initAsmInfo();
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ protected:
|
||||
AArch64Subtarget Subtarget;
|
||||
|
||||
private:
|
||||
const DataLayout DL;
|
||||
AArch64InstrInfo InstrInfo;
|
||||
AArch64TargetLowering TLInfo;
|
||||
AArch64SelectionDAGInfo TSInfo;
|
||||
@ -47,7 +46,9 @@ public:
|
||||
const AArch64TargetLowering *getTargetLowering() const override {
|
||||
return &TLInfo;
|
||||
}
|
||||
const DataLayout *getDataLayout() const override { return &DL; }
|
||||
const DataLayout *getDataLayout() const override {
|
||||
return getSubtargetImpl()->getDataLayout();
|
||||
}
|
||||
const AArch64FrameLowering *getFrameLowering() const override {
|
||||
return getSubtargetImpl()->getFrameLowering();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user