[llvm] r331439 - [TableGen][NFC] Make ResourceCycles definitions more explicit.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Wed May 2 23:08:48 PDT 2018
Author: courbet
Date: Wed May 2 23:08:47 2018
New Revision: 331439
URL: http://llvm.org/viewvc/llvm-project?rev=331439&view=rev
Log:
[TableGen][NFC] Make ResourceCycles definitions more explicit.
https://reviews.llvm.org/D46356
Modified:
llvm/trunk/lib/Target/ARM/ARMScheduleA9.td
llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td
Modified: llvm/trunk/lib/Target/ARM/ARMScheduleA9.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMScheduleA9.td?rev=331439&r1=331438&r2=331439&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMScheduleA9.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMScheduleA9.td Wed May 2 23:08:47 2018
@@ -1996,15 +1996,15 @@ def : WriteRes<WriteVST4, []>;
// Reserve A9UnitFP for 2 consecutive cycles.
def A9Write2V4 : SchedWriteRes<[A9UnitFP, A9UnitAGU]> {
let Latency = 4;
- let ResourceCycles = [2];
+ let ResourceCycles = [2, 1];
}
def A9Write2V7 : SchedWriteRes<[A9UnitFP, A9UnitAGU]> {
let Latency = 7;
- let ResourceCycles = [2];
+ let ResourceCycles = [2, 1];
}
def A9Write2V9 : SchedWriteRes<[A9UnitFP, A9UnitAGU]> {
let Latency = 9;
- let ResourceCycles = [2];
+ let ResourceCycles = [2, 1];
}
// Branches don't have a def operand but still consume resources.
Modified: llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td?rev=331439&r1=331438&r2=331439&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td Wed May 2 23:08:47 2018
@@ -93,7 +93,7 @@ def : ReadAdvance<ReadAfterLd, 3>;
// folded loads.
multiclass JWriteResIntPair<X86FoldableSchedWrite SchedRW,
list<ProcResourceKind> ExePorts,
- int Lat, list<int> Res = [1], int UOps = 1> {
+ int Lat, list<int> Res = [], int UOps = 1> {
// Register variant is using a single cycle on ExePort.
def : WriteRes<SchedRW, ExePorts> {
let Latency = Lat;
@@ -105,14 +105,14 @@ multiclass JWriteResIntPair<X86FoldableS
// latency.
def : WriteRes<SchedRW.Folded, !listconcat([JLAGU], ExePorts)> {
let Latency = !add(Lat, 3);
- let ResourceCycles = !listconcat([1], Res);
+ let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
let NumMicroOps = UOps;
}
}
multiclass JWriteResFpuPair<X86FoldableSchedWrite SchedRW,
list<ProcResourceKind> ExePorts,
- int Lat, list<int> Res = [1], int UOps = 1> {
+ int Lat, list<int> Res = [], int UOps = 1> {
// Register variant is using a single cycle on ExePort.
def : WriteRes<SchedRW, ExePorts> {
let Latency = Lat;
@@ -124,7 +124,7 @@ multiclass JWriteResFpuPair<X86FoldableS
// latency.
def : WriteRes<SchedRW.Folded, !listconcat([JLAGU], ExePorts)> {
let Latency = !add(Lat, 5);
- let ResourceCycles = !listconcat([1], Res);
+ let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
let NumMicroOps = UOps;
}
}
@@ -455,7 +455,7 @@ def : WriteRes<WriteMMXMOVMSK, [JFPU0,
defm : JWriteResFpuPair<WriteAESIMC, [JFPU0, JVIMUL], 2>;
defm : JWriteResFpuPair<WriteAESKeyGen, [JFPU0, JVIMUL], 2>;
-defm : JWriteResFpuPair<WriteAESDecEnc, [JFPU0, JVIMUL], 3, [1], 2>;
+defm : JWriteResFpuPair<WriteAESDecEnc, [JFPU0, JVIMUL], 3, [1, 1], 2>;
////////////////////////////////////////////////////////////////////////////////
// Horizontal add/sub instructions.
Modified: llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td?rev=331439&r1=331438&r2=331439&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td Wed May 2 23:08:47 2018
@@ -100,7 +100,7 @@ def : ReadAdvance<ReadAfterLd, 4>;
// This multiclass is for folded loads for integer units.
multiclass ZnWriteResPair<X86FoldableSchedWrite SchedRW,
list<ProcResourceKind> ExePorts,
- int Lat, list<int> Res = [1], int UOps = 1> {
+ int Lat, list<int> Res = [], int UOps = 1> {
// Register variant takes 1-cycle on Execution Port.
def : WriteRes<SchedRW, ExePorts> {
let Latency = Lat;
@@ -112,7 +112,7 @@ multiclass ZnWriteResPair<X86FoldableSch
// adds 4 cycles to the latency.
def : WriteRes<SchedRW.Folded, !listconcat([ZnAGU], ExePorts)> {
let Latency = !add(Lat, 4);
- let ResourceCycles = !listconcat([1], Res);
+ let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
let NumMicroOps = !add(UOps, 1);
}
}
@@ -120,7 +120,7 @@ multiclass ZnWriteResPair<X86FoldableSch
// This multiclass is for folded loads for floating point units.
multiclass ZnWriteResFpuPair<X86FoldableSchedWrite SchedRW,
list<ProcResourceKind> ExePorts,
- int Lat, list<int> Res = [1], int UOps = 1> {
+ int Lat, list<int> Res = [], int UOps = 1> {
// Register variant takes 1-cycle on Execution Port.
def : WriteRes<SchedRW, ExePorts> {
let Latency = Lat;
@@ -132,7 +132,7 @@ multiclass ZnWriteResFpuPair<X86Foldable
// adds 7 cycles to the latency.
def : WriteRes<SchedRW.Folded, !listconcat([ZnAGU], ExePorts)> {
let Latency = !add(Lat, 7);
- let ResourceCycles = !listconcat([1], Res);
+ let ResourceCycles = !if(!empty(Res), [], !listconcat([1], Res));
let NumMicroOps = UOps;
}
}
More information about the llvm-commits
mailing list