Skip to content

Commit 819c165

Browse files
committed
[SystemZ] Support z15 processor name
The recently announced IBM z15 processor implements the architecture already supported as "arch13" in LLVM. This patch adds support for "z15" as an alternate architecture name for arch13. The patch also uses z15 in a number of places where we used arch13 as long as the official name was not yet announced. llvm-svn: 372435
1 parent 4a58936 commit 819c165

32 files changed

+113
-108
lines changed

llvm/lib/Support/Host.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ StringRef sys::detail::getHostCPUNameForS390x(StringRef ProcCpuinfoContent) {
316316
unsigned int Id;
317317
if (!Lines[I].drop_front(Pos).getAsInteger(10, Id)) {
318318
if (Id >= 8561 && HaveVectorSupport)
319-
return "arch13";
319+
return "z15";
320320
if (Id >= 3906 && HaveVectorSupport)
321321
return "z14";
322322
if (Id >= 2964 && HaveVectorSupport)

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
258258
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i32, Promote);
259259
setOperationAction(ISD::CTLZ, MVT::i64, Legal);
260260

261-
// On arch13 we have native support for a 64-bit CTPOP.
261+
// On z15 we have native support for a 64-bit CTPOP.
262262
if (Subtarget.hasMiscellaneousExtensions3()) {
263263
setOperationAction(ISD::CTPOP, MVT::i32, Promote);
264264
setOperationAction(ISD::CTPOP, MVT::i64, Legal);

llvm/lib/Target/SystemZ/SystemZProcessors.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ def : ProcessorModel<"z13", Z13Model, Arch11SupportedFeatures.List>;
3535
def : ProcessorModel<"arch12", Z14Model, Arch12SupportedFeatures.List>;
3636
def : ProcessorModel<"z14", Z14Model, Arch12SupportedFeatures.List>;
3737

38-
def : ProcessorModel<"arch13", Arch13Model, Arch13SupportedFeatures.List>;
38+
def : ProcessorModel<"arch13", Z15Model, Arch13SupportedFeatures.List>;
39+
def : ProcessorModel<"z15", Z15Model, Arch13SupportedFeatures.List>;
3940

llvm/lib/Target/SystemZ/SystemZSchedule.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def VBU : SchedWrite; // Virtual branching unit
5959

6060
def MCD : SchedWrite; // Millicode
6161

62-
include "SystemZScheduleArch13.td"
62+
include "SystemZScheduleZ15.td"
6363
include "SystemZScheduleZ14.td"
6464
include "SystemZScheduleZ13.td"
6565
include "SystemZScheduleZEC12.td"

llvm/lib/Target/SystemZ/SystemZScheduleArch13.td renamed to llvm/lib/Target/SystemZ/SystemZScheduleZ15.td

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
//-- SystemZScheduleArch13.td - SystemZ Scheduling Definitions ----*- tblgen -*-=//
1+
//-- SystemZScheduleZ15.td - SystemZ Scheduling Definitions ----*- tblgen -*-=//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file defines the machine model for Arch13 to support instruction
9+
// This file defines the machine model for Z15 to support instruction
1010
// scheduling and other instruction cost heuristics.
1111
//
1212
// Pseudos expanded right after isel do not need to be modelled here.
1313
//
1414
//===----------------------------------------------------------------------===//
1515

16-
def Arch13Model : SchedMachineModel {
16+
def Z15Model : SchedMachineModel {
1717

1818
let UnsupportedFeatures = Arch13UnsupportedFeatures.List;
1919

@@ -27,7 +27,7 @@ def Arch13Model : SchedMachineModel {
2727
let MispredictPenalty = 20;
2828
}
2929

30-
let SchedModel = Arch13Model in {
30+
let SchedModel = Z15Model in {
3131
// These definitions need the SchedModel value. They could be put in a
3232
// subtarget common include file, but it seems the include system in Tablegen
3333
// currently (2016) rejects multiple includes of same file.
@@ -73,43 +73,43 @@ let NumMicroOps = 0 in {
7373
}
7474

7575
// Execution units.
76-
def Arch13_FXaUnit : ProcResource<2>;
77-
def Arch13_FXbUnit : ProcResource<2>;
78-
def Arch13_LSUnit : ProcResource<2>;
79-
def Arch13_VecUnit : ProcResource<2>;
80-
def Arch13_VecFPdUnit : ProcResource<2> { let BufferSize = 1; /* blocking */ }
81-
def Arch13_VBUnit : ProcResource<2>;
82-
def Arch13_MCD : ProcResource<1>;
76+
def Z15_FXaUnit : ProcResource<2>;
77+
def Z15_FXbUnit : ProcResource<2>;
78+
def Z15_LSUnit : ProcResource<2>;
79+
def Z15_VecUnit : ProcResource<2>;
80+
def Z15_VecFPdUnit : ProcResource<2> { let BufferSize = 1; /* blocking */ }
81+
def Z15_VBUnit : ProcResource<2>;
82+
def Z15_MCD : ProcResource<1>;
8383

8484
// Subtarget specific definitions of scheduling resources.
8585
let NumMicroOps = 0 in {
86-
def : WriteRes<FXa, [Arch13_FXaUnit]>;
87-
def : WriteRes<FXb, [Arch13_FXbUnit]>;
88-
def : WriteRes<LSU, [Arch13_LSUnit]>;
89-
def : WriteRes<VecBF, [Arch13_VecUnit]>;
90-
def : WriteRes<VecDF, [Arch13_VecUnit]>;
91-
def : WriteRes<VecDFX, [Arch13_VecUnit]>;
92-
def : WriteRes<VecMul, [Arch13_VecUnit]>;
93-
def : WriteRes<VecStr, [Arch13_VecUnit]>;
94-
def : WriteRes<VecXsPm, [Arch13_VecUnit]>;
86+
def : WriteRes<FXa, [Z15_FXaUnit]>;
87+
def : WriteRes<FXb, [Z15_FXbUnit]>;
88+
def : WriteRes<LSU, [Z15_LSUnit]>;
89+
def : WriteRes<VecBF, [Z15_VecUnit]>;
90+
def : WriteRes<VecDF, [Z15_VecUnit]>;
91+
def : WriteRes<VecDFX, [Z15_VecUnit]>;
92+
def : WriteRes<VecMul, [Z15_VecUnit]>;
93+
def : WriteRes<VecStr, [Z15_VecUnit]>;
94+
def : WriteRes<VecXsPm, [Z15_VecUnit]>;
9595
foreach Num = 2-5 in { let ResourceCycles = [Num] in {
96-
def : WriteRes<!cast<SchedWrite>("FXa"#Num), [Arch13_FXaUnit]>;
97-
def : WriteRes<!cast<SchedWrite>("FXb"#Num), [Arch13_FXbUnit]>;
98-
def : WriteRes<!cast<SchedWrite>("LSU"#Num), [Arch13_LSUnit]>;
99-
def : WriteRes<!cast<SchedWrite>("VecBF"#Num), [Arch13_VecUnit]>;
100-
def : WriteRes<!cast<SchedWrite>("VecDF"#Num), [Arch13_VecUnit]>;
101-
def : WriteRes<!cast<SchedWrite>("VecDFX"#Num), [Arch13_VecUnit]>;
102-
def : WriteRes<!cast<SchedWrite>("VecMul"#Num), [Arch13_VecUnit]>;
103-
def : WriteRes<!cast<SchedWrite>("VecStr"#Num), [Arch13_VecUnit]>;
104-
def : WriteRes<!cast<SchedWrite>("VecXsPm"#Num), [Arch13_VecUnit]>;
96+
def : WriteRes<!cast<SchedWrite>("FXa"#Num), [Z15_FXaUnit]>;
97+
def : WriteRes<!cast<SchedWrite>("FXb"#Num), [Z15_FXbUnit]>;
98+
def : WriteRes<!cast<SchedWrite>("LSU"#Num), [Z15_LSUnit]>;
99+
def : WriteRes<!cast<SchedWrite>("VecBF"#Num), [Z15_VecUnit]>;
100+
def : WriteRes<!cast<SchedWrite>("VecDF"#Num), [Z15_VecUnit]>;
101+
def : WriteRes<!cast<SchedWrite>("VecDFX"#Num), [Z15_VecUnit]>;
102+
def : WriteRes<!cast<SchedWrite>("VecMul"#Num), [Z15_VecUnit]>;
103+
def : WriteRes<!cast<SchedWrite>("VecStr"#Num), [Z15_VecUnit]>;
104+
def : WriteRes<!cast<SchedWrite>("VecXsPm"#Num), [Z15_VecUnit]>;
105105
}}
106106

107-
def : WriteRes<VecFPd, [Arch13_VecFPdUnit]> { let ResourceCycles = [30]; }
107+
def : WriteRes<VecFPd, [Z15_VecFPdUnit]> { let ResourceCycles = [30]; }
108108

109-
def : WriteRes<VBU, [Arch13_VBUnit]>; // Virtual Branching Unit
109+
def : WriteRes<VBU, [Z15_VBUnit]>; // Virtual Branching Unit
110110
}
111111

112-
def : WriteRes<MCD, [Arch13_MCD]> { let NumMicroOps = 3;
112+
def : WriteRes<MCD, [Z15_MCD]> { let NumMicroOps = 3;
113113
let BeginGroup = 1;
114114
let EndGroup = 1; }
115115

llvm/lib/Target/SystemZ/SystemZTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ int SystemZTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src,
707707
// TODO: Fix base implementation which could simplify things a bit here
708708
// (seems to miss on differentiating on scalar/vector types).
709709

710-
// Only 64 bit vector conversions are natively supported before arch13.
710+
// Only 64 bit vector conversions are natively supported before z15.
711711
if (DstScalarBits == 64 || ST->hasVectorEnhancements2()) {
712712
if (SrcScalarBits == DstScalarBits)
713713
return NumDstVectors;

0 commit comments

Comments
 (0)