: 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())
#include "AArch64FrameLowering.h"
#include "AArch64RegisterInfo.h"
+#include "llvm/IR/DataLayout.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <string>
/// IsLittleEndian - Is the target little endian?
bool IsLittleEndian;
+ const DataLayout DL;
AArch64FrameLowering FrameLowering;
public:
const AArch64FrameLowering *getFrameLowering() const {
return &FrameLowering;
}
-
+ const DataLayout *getDataLayout() const { return &DL; }
bool enableMachineScheduler() const override { return true; }
bool hasZeroCycleRegMove() const { return HasZeroCycleRegMove; }
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();
}
AArch64Subtarget Subtarget;
private:
- const DataLayout DL;
AArch64InstrInfo InstrInfo;
AArch64TargetLowering TLInfo;
AArch64SelectionDAGInfo TSInfo;
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();
}