summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp43
1 files changed, 1 insertions, 42 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
index ece8928accd0..3d0c04b57493 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
@@ -54,47 +54,6 @@ LLVMInitializeSystemZTarget() {
initializeSystemZCopyPhysRegsPass(PR);
}
-static std::string computeDataLayout(const Triple &TT) {
- std::string Ret;
-
- // Big endian.
- Ret += "E";
-
- // Data mangling.
- Ret += DataLayout::getManglingComponent(TT);
-
- // Special features for z/OS.
- if (TT.isOSzOS()) {
- if (TT.isArch64Bit()) {
- // Custom address space for ptr32.
- Ret += "-p1:32:32";
- }
- }
-
- // Make sure that global data has at least 16 bits of alignment by
- // default, so that we can refer to it using LARL. We don't have any
- // special requirements for stack variables though.
- Ret += "-i1:8:16-i8:8:16";
-
- // 64-bit integers are naturally aligned.
- Ret += "-i64:64";
-
- // 128-bit floats are aligned only to 64 bits.
- Ret += "-f128:64";
-
- // The DataLayout string always holds a vector alignment of 64 bits, see
- // comment in clang/lib/Basic/Targets/SystemZ.h.
- Ret += "-v128:64";
-
- // We prefer 16 bits of aligned for all globals; see above.
- Ret += "-a:8:16";
-
- // Integer registers are 32 or 64 bits.
- Ret += "-n32:64";
-
- return Ret;
-}
-
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
if (TT.isOSzOS())
return std::make_unique<TargetLoweringObjectFileGOFF>();
@@ -163,7 +122,7 @@ SystemZTargetMachine::SystemZTargetMachine(const Target &T, const Triple &TT,
std::optional<CodeModel::Model> CM,
CodeGenOptLevel OL, bool JIT)
: CodeGenTargetMachineImpl(
- T, computeDataLayout(TT), TT, CPU, FS, Options,
+ T, TT.computeDataLayout(), TT, CPU, FS, Options,
getEffectiveRelocModel(RM),
getEffectiveSystemZCodeModel(CM, getEffectiveRelocModel(RM), JIT),
OL),