[llvm] r332022 - [X86] Convert/Merge more instregex patterns to reduce InstrRW compile time.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu May 10 12:08:06 PDT 2018
Author: rksimon
Date: Thu May 10 12:08:06 2018
New Revision: 332022
URL: http://llvm.org/viewvc/llvm-project?rev=332022&view=rev
Log:
[X86] Convert/Merge more instregex patterns to reduce InstrRW compile time.
Use instrs lists or merge multiple instregex patterns.
Modified:
llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
llvm/trunk/lib/Target/X86/X86SchedHaswell.td
llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td
Modified: llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedBroadwell.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedBroadwell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedBroadwell.td Thu May 10 12:08:06 2018
@@ -475,10 +475,8 @@ def BWWriteResGroup2 : SchedWriteRes<[BW
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[BWWriteResGroup2], (instregex "COMP_FST0r",
- "COM_FST0r",
- "UCOM_FPr",
- "UCOM_Fr")>;
+def: InstRW<[BWWriteResGroup2], (instregex "COM(P?)_FST0r",
+ "UCOM_F(P?)r")>;
def BWWriteResGroup3 : SchedWriteRes<[BWPort5]> {
let Latency = 1;
@@ -633,7 +631,7 @@ def BWWriteResGroup18 : SchedWriteRes<[B
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[BWWriteResGroup18], (instregex "SFENCE")>;
+def: InstRW<[BWWriteResGroup18], (instrs SFENCE)>;
def BWWriteResGroup19 : SchedWriteRes<[BWPort06,BWPort15]> {
let Latency = 2;
@@ -668,7 +666,7 @@ def BWWriteResGroup22 : SchedWriteRes<[B
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[BWWriteResGroup22], (instregex "FNSTCW16m")>;
+def: InstRW<[BWWriteResGroup22], (instrs FNSTCW16m)>;
def BWWriteResGroup24 : SchedWriteRes<[BWPort4,BWPort237,BWPort15]> {
let Latency = 2;
@@ -772,8 +770,8 @@ def BWWriteResGroup38 : SchedWriteRes<[B
let NumMicroOps = 4;
let ResourceCycles = [1,1,1,1];
}
-def: InstRW<[BWWriteResGroup38], (instregex "CALL64pcrel32",
- "SET(A|BE)m")>;
+def: InstRW<[BWWriteResGroup38], (instrs CALL64pcrel32)>;
+def: InstRW<[BWWriteResGroup38], (instregex "SET(A|BE)m")>;
def BWWriteResGroup39 : SchedWriteRes<[BWPort0,BWPort1]> {
let Latency = 4;
@@ -797,7 +795,7 @@ def BWWriteResGroup41 : SchedWriteRes<[B
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[BWWriteResGroup41], (instregex "FNSTSW16r")>;
+def: InstRW<[BWWriteResGroup41], (instrs FNSTSW16r)>;
def BWWriteResGroup42 : SchedWriteRes<[BWPort1,BWPort5]> {
let Latency = 4;
@@ -829,7 +827,7 @@ def BWWriteResGroup43 : SchedWriteRes<[B
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[BWWriteResGroup43], (instregex "FNSTSWm")>;
+def: InstRW<[BWWriteResGroup43], (instrs FNSTSWm)>;
def BWWriteResGroup44 : SchedWriteRes<[BWPort1,BWPort4,BWPort237]> {
let Latency = 4;
@@ -859,9 +857,7 @@ def BWWriteResGroup47 : SchedWriteRes<[B
let ResourceCycles = [1];
}
def: InstRW<[BWWriteResGroup47], (instregex "(V?)PCMPGTQ(Y?)rr",
- "MUL_FPrST0",
- "MUL_FST0r",
- "MUL_FrST0")>;
+ "MUL_(FPrST0|FST0r|FrST0)")>;
def BWWriteResGroup49 : SchedWriteRes<[BWPort23]> {
let Latency = 5;
@@ -913,7 +909,7 @@ def BWWriteResGroup55 : SchedWriteRes<[B
let NumMicroOps = 5;
let ResourceCycles = [1,4];
}
-def: InstRW<[BWWriteResGroup55], (instregex "XSETBV")>;
+def: InstRW<[BWWriteResGroup55], (instrs XSETBV)>;
def BWWriteResGroup56 : SchedWriteRes<[BWPort06,BWPort0156]> {
let Latency = 5;
@@ -927,7 +923,7 @@ def BWWriteResGroup57 : SchedWriteRes<[B
let NumMicroOps = 6;
let ResourceCycles = [1,1,4];
}
-def: InstRW<[BWWriteResGroup57], (instregex "PUSHF16", "PUSHF64")>;
+def: InstRW<[BWWriteResGroup57], (instregex "PUSHF(16|64)")>;
def BWWriteResGroup58 : SchedWriteRes<[BWPort23]> {
let Latency = 6;
@@ -1064,7 +1060,7 @@ def BWWriteResGroup71 : SchedWriteRes<[B
let NumMicroOps = 6;
let ResourceCycles = [1,5];
}
-def: InstRW<[BWWriteResGroup71], (instregex "STD")>;
+def: InstRW<[BWWriteResGroup71], (instrs STD)>;
def BWWriteResGroup73 : SchedWriteRes<[BWPort0,BWPort23]> {
let Latency = 7;
@@ -1079,10 +1075,7 @@ def BWWriteResGroup74 : SchedWriteRes<[B
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[BWWriteResGroup74], (instregex "FCOM32m",
- "FCOM64m",
- "FCOMP32m",
- "FCOMP64m")>;
+def: InstRW<[BWWriteResGroup74], (instregex "FCOM(P?)(32|64)m")>;
def BWWriteResGroup77 : SchedWriteRes<[BWPort23,BWPort015]> {
let Latency = 7;
@@ -1113,15 +1106,14 @@ def BWWriteResGroup82 : SchedWriteRes<[B
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[BWWriteResGroup82], (instregex "FLDCW16m")>;
+def: InstRW<[BWWriteResGroup82], (instrs FLDCW16m)>;
def BWWriteResGroup84 : SchedWriteRes<[BWPort6,BWPort23,BWPort0156]> {
let Latency = 7;
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[BWWriteResGroup84], (instregex "LRETQ",
- "RETQ")>;
+def: InstRW<[BWWriteResGroup84], (instrs LRETQ, RETQ)>;
def BWWriteResGroup86 : SchedWriteRes<[BWPort23,BWPort06,BWPort0156]> {
let Latency = 7;
@@ -1322,8 +1314,7 @@ def BWWriteResGroup117 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[BWWriteResGroup117], (instregex "FICOM(P?)16m",
- "FICOM(P?)32m")>;
+def: InstRW<[BWWriteResGroup117], (instregex "FICOM(P?)(16|32)m")>;
def BWWriteResGroup120 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort23]> {
let Latency = 10;
@@ -1439,9 +1430,7 @@ def BWWriteResGroup147 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[BWWriteResGroup147], (instregex "DIVR_FPrST0",
- "DIVR_FST0r",
- "DIVR_FrST0")>;
+def: InstRW<[BWWriteResGroup147], (instregex "DIVR_(FPrST0|FST0r|FrST0)")>;
def BWWriteResGroup149 : SchedWriteRes<[BWPort1,BWPort23,BWPort237,BWPort06,BWPort15,BWPort0156]> {
let Latency = 15;
@@ -1462,7 +1451,7 @@ def BWWriteResGroup153 : SchedWriteRes<[
let NumMicroOps = 14;
let ResourceCycles = [1,1,1,4,2,5];
}
-def: InstRW<[BWWriteResGroup153], (instregex "CMPXCHG8B")>;
+def: InstRW<[BWWriteResGroup153], (instrs CMPXCHG8B)>;
def BWWriteResGroup154 : SchedWriteRes<[BWPort5]> {
let Latency = 16;
@@ -1498,9 +1487,7 @@ def BWWriteResGroup165 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[BWWriteResGroup165], (instregex "DIV_FPrST0",
- "DIV_FST0r",
- "DIV_FrST0")>;
+def: InstRW<[BWWriteResGroup165], (instregex "DIV_(FPrST0|FST0r|FrST0)")>;
def BWWriteResGroup167 : SchedWriteRes<[BWPort4,BWPort5,BWPort6,BWPort23,BWPort237,BWPort06,BWPort0156]> {
let Latency = 20;
@@ -1521,7 +1508,7 @@ def BWWriteResGroup171 : SchedWriteRes<[
let NumMicroOps = 19;
let ResourceCycles = [2,1,4,1,1,4,6];
}
-def: InstRW<[BWWriteResGroup171], (instregex "CMPXCHG16B")>;
+def: InstRW<[BWWriteResGroup171], (instrs CMPXCHG16B)>;
def BWWriteResGroup172 : SchedWriteRes<[BWPort6,BWPort23,BWPort0156]> {
let Latency = 22;
@@ -1613,14 +1600,15 @@ def BWWriteResGroup185 : SchedWriteRes<[
let NumMicroOps = 27;
let ResourceCycles = [1,5,1,1,19];
}
-def: InstRW<[BWWriteResGroup185], (instregex "XSAVE64")>;
+def: InstRW<[BWWriteResGroup185], (instrs XSAVE64)>;
def BWWriteResGroup186 : SchedWriteRes<[BWPort4,BWPort6,BWPort23,BWPort237,BWPort0156]> {
let Latency = 30;
let NumMicroOps = 28;
let ResourceCycles = [1,6,1,1,19];
}
-def: InstRW<[BWWriteResGroup186], (instregex "^XSAVE$", "XSAVEC", "XSAVES", "XSAVEOPT")>;
+def: InstRW<[BWWriteResGroup186], (instrs XSAVE)>;
+def: InstRW<[BWWriteResGroup186], (instregex "XSAVEC", "XSAVES", "XSAVEOPT")>;
def BWWriteResGroup190 : SchedWriteRes<[BWPort0,BWPort1,BWPort5,BWPort23,BWPort0156]> {
let Latency = 34;
@@ -1664,7 +1652,7 @@ def BWWriteResGroup197 : SchedWriteRes<[
let NumMicroOps = 64;
let ResourceCycles = [2,2,8,1,10,2,39];
}
-def: InstRW<[BWWriteResGroup197], (instregex "FLDENVm")>;
+def: InstRW<[BWWriteResGroup197], (instrs FLDENVm)>;
def BWWriteResGroup198 : SchedWriteRes<[BWPort0,BWPort6,BWPort23,BWPort05,BWPort06,BWPort15,BWPort0156]> {
let Latency = 63;
@@ -1699,7 +1687,7 @@ def BWWriteResGroup202 : SchedWriteRes<[
let NumMicroOps = 100;
let ResourceCycles = [9,9,11,8,1,11,21,30];
}
-def: InstRW<[BWWriteResGroup202], (instregex "FSTENVm")>;
+def: InstRW<[BWWriteResGroup202], (instrs FSTENVm)>;
} // SchedModel
Modified: llvm/trunk/lib/Target/X86/X86SchedHaswell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedHaswell.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedHaswell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedHaswell.td Thu May 10 12:08:06 2018
@@ -581,7 +581,7 @@ def : InstRW<[HWWriteCMPS], (instregex "
def HWWriteRDPMC : SchedWriteRes<[]> {
let NumMicroOps = 34;
}
-def : InstRW<[HWWriteRDPMC], (instregex "RDPMC")>;
+def : InstRW<[HWWriteRDPMC], (instrs RDPMC)>;
// RDRAND.
def HWWriteRDRAND : SchedWriteRes<[HWPort23, HWPort015]> {
@@ -634,7 +634,7 @@ def : InstRW<[HWWriteFRSTOR], (instregex
// FCOMPP FUCOMPP.
// r.
-def : InstRW<[HWWrite2P01], (instregex "FCOMPP", "UCOM_FPPr")>;
+def : InstRW<[HWWrite2P01], (instrs FCOMPP, UCOM_FPPr)>;
// FCOMI(P) FUCOMI(P).
// m.
@@ -713,8 +713,7 @@ def: InstRW<[HWWriteResGroup0], (instreg
"(V?)MOVSLDUPrm",
"(V?)MOVUPDrm",
"(V?)MOVUPSrm",
- "VPBROADCASTDrm",
- "VPBROADCASTQrm")>;
+ "VPBROADCAST(D|Q)rm")>;
def HWWriteResGroup0_1 : SchedWriteRes<[HWPort23]> {
let Latency = 7;
@@ -737,8 +736,7 @@ def: InstRW<[HWWriteResGroup0_1], (instr
"VMOVSLDUPYrm",
"VMOVUPDYrm",
"VMOVUPSYrm",
- "VPBROADCASTDYrm",
- "VPBROADCASTQYrm")>;
+ "VPBROADCAST(D|Q)Yrm")>;
def HWWriteResGroup0_2 : SchedWriteRes<[HWPort23]> {
let Latency = 5;
@@ -789,10 +787,8 @@ def HWWriteResGroup3 : SchedWriteRes<[HW
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup3], (instregex "COMP_FST0r",
- "COM_FST0r",
- "UCOM_FPr",
- "UCOM_Fr")>;
+def: InstRW<[HWWriteResGroup3], (instregex "COM(P?)_FST0r",
+ "UCOM_F(P?)r")>;
def HWWriteResGroup4 : SchedWriteRes<[HWPort5]> {
let Latency = 1;
@@ -857,15 +853,13 @@ def HWWriteResGroup10 : SchedWriteRes<[H
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup10], (instrs CBW, CWDE, CDQE)>;
+def: InstRW<[HWWriteResGroup10], (instrs CBW, CWDE, CDQE,
+ CLC, CMC, STC)>;
def: InstRW<[HWWriteResGroup10], (instrs LAHF, SAHF)>; // TODO: This doesn't match Agner's data
-def: InstRW<[HWWriteResGroup10], (instregex "CLC",
- "CMC",
- "NOOP",
+def: InstRW<[HWWriteResGroup10], (instregex "NOOP",
"SGDT64m",
"SIDT64m",
"SMSW16m",
- "STC",
"STRm",
"SYSCALL")>;
@@ -994,14 +988,14 @@ def HWWriteResGroup19 : SchedWriteRes<[H
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[HWWriteResGroup19], (instregex "SFENCE")>;
+def: InstRW<[HWWriteResGroup19], (instrs SFENCE)>;
def HWWriteResGroup21 : SchedWriteRes<[HWPort4,HWPort6,HWPort237]> {
let Latency = 2;
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup21], (instregex "FNSTCW16m")>;
+def: InstRW<[HWWriteResGroup21], (instrs FNSTCW16m)>;
def HWWriteResGroup23 : SchedWriteRes<[HWPort4,HWPort237,HWPort15]> {
let Latency = 2;
@@ -1015,7 +1009,7 @@ def HWWriteResGroup23_16 : SchedWriteRes
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup23_16], (instregex "MOVBE16mr")>;
+def: InstRW<[HWWriteResGroup23_16], (instrs MOVBE16mr)>;
def HWWriteResGroup24 : SchedWriteRes<[HWPort4,HWPort237,HWPort0156]> {
let Latency = 2;
@@ -1151,16 +1145,14 @@ def HWWriteResGroup39 : SchedWriteRes<[H
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup39], (instregex "FLDCW16m")>;
+def: InstRW<[HWWriteResGroup39], (instrs FLDCW16m)>;
def HWWriteResGroup41 : SchedWriteRes<[HWPort6,HWPort23,HWPort0156]> {
let Latency = 7;
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup41], (instregex "LRETQ",
- "RETL",
- "RETQ")>;
+def: InstRW<[HWWriteResGroup41], (instrs LRETQ, RETL, RETQ)>;
def HWWriteResGroup43 : SchedWriteRes<[HWPort23,HWPort06,HWPort0156]> {
let Latency = 7;
@@ -1182,8 +1174,8 @@ def HWWriteResGroup45 : SchedWriteRes<[H
let NumMicroOps = 4;
let ResourceCycles = [1,1,1,1];
}
-def: InstRW<[HWWriteResGroup45], (instregex "CALL64pcrel32",
- "SET(A|BE)m")>;
+def: InstRW<[HWWriteResGroup45], (instrs CALL64pcrel32)>;
+def: InstRW<[HWWriteResGroup45], (instregex "SET(A|BE)m")>;
def HWWriteResGroup46 : SchedWriteRes<[HWPort4,HWPort23,HWPort237,HWPort06]> {
let Latency = 8;
@@ -1234,8 +1226,7 @@ def HWWriteResGroup51 : SchedWriteRes<[H
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup51], (instregex "VPBROADCASTBrr",
- "VPBROADCASTWrr")>;
+def: InstRW<[HWWriteResGroup51], (instregex "VPBROADCAST(B|W)rr")>;
def HWWriteResGroup52 : SchedWriteRes<[HWPort1,HWPort23]> {
let Latency = 9;
@@ -1318,7 +1309,7 @@ def HWWriteResGroup61 : SchedWriteRes<[H
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup61], (instregex "FNSTSWm")>;
+def: InstRW<[HWWriteResGroup61], (instrs FNSTSWm)>;
def HWWriteResGroup62 : SchedWriteRes<[HWPort1,HWPort4,HWPort237]> {
let Latency = 4;
@@ -1394,7 +1385,7 @@ def HWWriteResGroup72 : SchedWriteRes<[H
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[HWWriteResGroup72], (instregex "FNSTSW16r")>;
+def: InstRW<[HWWriteResGroup72], (instrs FNSTSW16r)>;
def HWWriteResGroup73 : SchedWriteRes<[HWPort1,HWPort5]> {
let Latency = 4;
@@ -1431,10 +1422,7 @@ def HWWriteResGroup75 : SchedWriteRes<[H
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[HWWriteResGroup75], (instregex "FICOM16m",
- "FICOM32m",
- "FICOMP16m",
- "FICOMP32m")>;
+def: InstRW<[HWWriteResGroup75], (instregex "FICOM(P?)(16|32)m")>;
def HWWriteResGroup76 : SchedWriteRes<[HWPort0,HWPort1,HWPort23]> {
let Latency = 9;
@@ -1484,10 +1472,7 @@ def HWWriteResGroup80 : SchedWriteRes<[H
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[HWWriteResGroup80], (instregex "VPBROADCASTBYrm",
- "VPBROADCASTBrm",
- "VPBROADCASTWYrm",
- "VPBROADCASTWrm")>;
+def: InstRW<[HWWriteResGroup80], (instregex "VPBROADCAST(B|W)(Y?)rm")>;
def HWWriteResGroup81 : SchedWriteRes<[HWPort0156]> {
let Latency = 4;
@@ -1531,8 +1516,7 @@ def HWWriteResGroup88 : SchedWriteRes<[H
let NumMicroOps = 6;
let ResourceCycles = [1,1,4];
}
-def: InstRW<[HWWriteResGroup88], (instregex "PUSHF16",
- "PUSHF64")>;
+def: InstRW<[HWWriteResGroup88], (instregex "PUSHF(16|64)")>;
def HWWriteResGroup89 : SchedWriteRes<[HWPort0]> {
let Latency = 5;
@@ -1540,9 +1524,7 @@ def HWWriteResGroup89 : SchedWriteRes<[H
let ResourceCycles = [1];
}
def: InstRW<[HWWriteResGroup89], (instregex "(V?)PCMPGTQ(Y?)rr",
- "MUL_FPrST0",
- "MUL_FST0r",
- "MUL_FrST0")>;
+ "MUL_(FPrST0|FST0r|FrST0)")>;
def HWWriteResGroup91_2 : SchedWriteRes<[HWPort0,HWPort23]> {
let Latency = 11;
@@ -1606,7 +1588,7 @@ def HWWriteResGroup100 : SchedWriteRes<[
let NumMicroOps = 5;
let ResourceCycles = [1,4];
}
-def: InstRW<[HWWriteResGroup100], (instregex "XSETBV")>;
+def: InstRW<[HWWriteResGroup100], (instrs XSETBV)>;
def HWWriteResGroup101 : SchedWriteRes<[HWPort06,HWPort0156]> {
let Latency = 5;
@@ -1666,7 +1648,7 @@ def HWWriteResGroup108 : SchedWriteRes<[
let NumMicroOps = 6;
let ResourceCycles = [1,5];
}
-def: InstRW<[HWWriteResGroup108], (instregex "STD")>;
+def: InstRW<[HWWriteResGroup108], (instrs STD)>;
def HWWriteResGroup109 : SchedWriteRes<[HWPort1,HWPort23,HWPort237,HWPort06,HWPort0156]> {
let Latency = 12;
@@ -1724,7 +1706,7 @@ def HWWriteResGroup132 : SchedWriteRes<[
let NumMicroOps = 14;
let ResourceCycles = [1,1,1,4,2,5];
}
-def: InstRW<[HWWriteResGroup132], (instregex "CMPXCHG8B")>;
+def: InstRW<[HWWriteResGroup132], (instrs CMPXCHG8B)>;
def HWWriteResGroup135 : SchedWriteRes<[HWPort1,HWPort23,HWPort237,HWPort06,HWPort15,HWPort0156]> {
let Latency = 19;
@@ -1766,7 +1748,7 @@ def HWWriteResGroup146 : SchedWriteRes<[
let NumMicroOps = 19;
let ResourceCycles = [2,1,4,1,1,4,6];
}
-def: InstRW<[HWWriteResGroup146], (instregex "CMPXCHG16B")>;
+def: InstRW<[HWWriteResGroup146], (instrs CMPXCHG16B)>;
def HWWriteResGroup147 : SchedWriteRes<[HWPort0,HWPort1,HWPort5,HWPort6,HWPort01,HWPort0156]> {
let Latency = 17;
@@ -1780,8 +1762,7 @@ def HWWriteResGroup149 : SchedWriteRes<[
let NumMicroOps = 8;
let ResourceCycles = [1,1,1,5];
}
-def: InstRW<[HWWriteResGroup149], (instregex "CPUID")>;
-def: InstRW<[HWWriteResGroup149], (instrs RDTSC)>;
+def: InstRW<[HWWriteResGroup149], (instrs CPUID, RDTSC)>;
def HWWriteResGroup151 : SchedWriteRes<[HWPort6,HWPort23,HWPort0156]> {
let Latency = 23;
@@ -1795,9 +1776,7 @@ def HWWriteResGroup154 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup154], (instregex "DIV_FPrST0",
- "DIV_FST0r",
- "DIV_FrST0")>;
+def: InstRW<[HWWriteResGroup154], (instregex "DIV_(FPrST0|FST0r|FrST0)")>;
def HWWriteResGroup155 : SchedWriteRes<[HWPort0,HWPort23]> {
let Latency = 27;
@@ -1811,7 +1790,7 @@ def HWWriteResGroup156 : SchedWriteRes<[
let NumMicroOps = 10;
let ResourceCycles = [1,2,7];
}
-def: InstRW<[HWWriteResGroup156], (instregex "MWAITrr")>;
+def: InstRW<[HWWriteResGroup156], (instrs MWAITrr)>;
def HWWriteResGroup161 : SchedWriteRes<[HWPort0,HWPort1,HWPort23]> {
let Latency = 30;
@@ -1825,9 +1804,7 @@ def HWWriteResGroup162 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[HWWriteResGroup162], (instregex "DIVR_FPrST0",
- "DIVR_FST0r",
- "DIVR_FrST0")>;
+def: InstRW<[HWWriteResGroup162], (instregex "DIVR_(FPrST0|FST0r|FrST0)")>;
def HWWriteResGroup163 : SchedWriteRes<[HWPort0,HWPort23]> {
let Latency = 31;
@@ -1841,14 +1818,15 @@ def HWWriteResGroup164 : SchedWriteRes<[
let NumMicroOps = 27;
let ResourceCycles = [1,5,1,1,19];
}
-def: InstRW<[HWWriteResGroup164], (instregex "XSAVE64")>;
+def: InstRW<[HWWriteResGroup164], (instrs XSAVE64)>;
def HWWriteResGroup165 : SchedWriteRes<[HWPort4,HWPort6,HWPort23,HWPort237,HWPort0156]> {
let Latency = 31;
let NumMicroOps = 28;
let ResourceCycles = [1,6,1,1,19];
}
-def: InstRW<[HWWriteResGroup165], (instregex "^XSAVE$", "XSAVEC", "XSAVES", "XSAVEOPT")>;
+def: InstRW<[HWWriteResGroup165], (instrs XSAVE)>;
+def: InstRW<[HWWriteResGroup165], (instregex "XSAVEC", "XSAVES", "XSAVEOPT")>;
def HWWriteResGroup166 : SchedWriteRes<[HWPort0,HWPort1,HWPort23]> {
let Latency = 34;
@@ -1878,7 +1856,7 @@ def HWWriteResGroup175 : SchedWriteRes<[
let NumMicroOps = 18;
let ResourceCycles = [1,1,2,3,1,1,1,8];
}
-def: InstRW<[HWWriteResGroup175], (instregex "VMCLEARm")>;
+def: InstRW<[HWWriteResGroup175], (instrs VMCLEARm)>;
def HWWriteResGroup176 : SchedWriteRes<[HWPort5,HWPort0156]> {
let Latency = 42;
@@ -1892,7 +1870,7 @@ def HWWriteResGroup177 : SchedWriteRes<[
let NumMicroOps = 64;
let ResourceCycles = [2,2,8,1,10,2,39];
}
-def: InstRW<[HWWriteResGroup177], (instregex "FLDENVm")>;
+def: InstRW<[HWWriteResGroup177], (instrs FLDENVm)>;
def HWWriteResGroup178 : SchedWriteRes<[HWPort0,HWPort6,HWPort23,HWPort05,HWPort06,HWPort15,HWPort0156]> {
let Latency = 64;
@@ -1934,7 +1912,7 @@ def HWWriteResGroup183 : SchedWriteRes<[
let NumMicroOps = 100;
let ResourceCycles = [9,9,11,8,1,11,21,30];
}
-def: InstRW<[HWWriteResGroup183], (instregex "FSTENVm")>;
+def: InstRW<[HWWriteResGroup183], (instrs FSTENVm)>;
def HWWriteResGroup184 : SchedWriteRes<[HWPort0, HWPort5, HWPort15, HWPort015, HWPort06, HWPort23]> {
let Latency = 26;
Modified: llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td Thu May 10 12:08:06 2018
@@ -434,24 +434,21 @@ def SBWriteResGroup1 : SchedWriteRes<[SB
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SBWriteResGroup1], (instregex "COMP_FST0r",
- "COM_FST0r",
- "UCOM_FPr",
- "UCOM_Fr")>;
+def: InstRW<[SBWriteResGroup1], (instrs COMP_FST0r,
+ COM_FST0r,
+ UCOM_FPr,
+ UCOM_Fr)>;
def SBWriteResGroup2 : SchedWriteRes<[SBPort5]> {
let Latency = 1;
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SBWriteResGroup2], (instrs FDECSTP, FINCSTP, FNOP)>;
+def: InstRW<[SBWriteResGroup2], (instrs FDECSTP, FINCSTP, FFREE, FFREEP, FNOP,
+ LD_Frr, ST_Frr, ST_FPrr)>;
def: InstRW<[SBWriteResGroup2], (instrs LOOP, LOOPE, LOOPNE)>; // FIXME: This seems wrong compared to other Intel CPUs.
-def: InstRW<[SBWriteResGroup2], (instregex "FFREE",
- "LD_Frr",
- "RETQ",
- "ST_FPrr",
- "ST_Frr",
- "(V?)MOV64toPQIrr",
+def: InstRW<[SBWriteResGroup2], (instrs RETQ)>;
+def: InstRW<[SBWriteResGroup2], (instregex "(V?)MOV64toPQIrr",
"(V?)MOVDI2PDIrr")>;
def SBWriteResGroup4 : SchedWriteRes<[SBPort05]> {
@@ -542,8 +539,8 @@ def SBWriteResGroup15 : SchedWriteRes<[S
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SBWriteResGroup15], (instrs CWD)>;
-def: InstRW<[SBWriteResGroup15], (instregex "FNSTSW16r")>;
+def: InstRW<[SBWriteResGroup15], (instrs CWD,
+ FNSTSW16r)>;
def SBWriteResGroup16 : SchedWriteRes<[SBPort1,SBPort05]> {
let Latency = 2;
@@ -720,11 +717,8 @@ def SBWriteResGroup31 : SchedWriteRes<[S
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SBWriteResGroup31], (instregex "MOVSX(16|32|64)rm16",
- "MOVSX(16|32|64)rm32",
- "MOVSX(16|32|64)rm8",
- "MOVZX(16|32|64)rm16",
- "MOVZX(16|32|64)rm8")>;
+def: InstRW<[SBWriteResGroup31], (instregex "MOVSX(16|32|64)rm(8|16|32)",
+ "MOVZX(16|32|64)rm(8|16)")>;
def SBWriteResGroup32 : SchedWriteRes<[SBPort0,SBPort1]> {
let Latency = 5;
@@ -747,7 +741,7 @@ def SBWriteResGroup35 : SchedWriteRes<[S
let NumMicroOps = 3;
let ResourceCycles = [1,2];
}
-def: InstRW<[SBWriteResGroup35], (instregex "CLI")>;
+def: InstRW<[SBWriteResGroup35], (instrs CLI)>;
def: InstRW<[SBWriteResGroup35], (instregex "(V?)CVTSI(64)?2SSrr")>;
def SBWriteResGroup35_2 : SchedWriteRes<[SBPort1,SBPort4,SBPort23]> {
@@ -763,8 +757,8 @@ def SBWriteResGroup36 : SchedWriteRes<[S
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SBWriteResGroup36], (instregex "CALL64pcrel32",
- "CALL(16|32|64)r",
+def: InstRW<[SBWriteResGroup36], (instrs CALL64pcrel32)>;
+def: InstRW<[SBWriteResGroup36], (instregex "CALL(16|32|64)r",
"(V?)EXTRACTPSmr")>;
def SBWriteResGroup40 : SchedWriteRes<[SBPort4,SBPort23,SBPort015]> {
@@ -862,8 +856,7 @@ def SBWriteResGroup52 : SchedWriteRes<[S
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SBWriteResGroup52], (instregex "LODSL",
- "LODSQ")>;
+def: InstRW<[SBWriteResGroup52], (instrs LODSL, LODSQ)>;
def SBWriteResGroup53 : SchedWriteRes<[SBPort4,SBPort23]> {
let Latency = 6;
@@ -903,7 +896,7 @@ def SBWriteResGroup58 : SchedWriteRes<[S
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SBWriteResGroup58], (instregex "VINSERTF128rm")>;
+def: InstRW<[SBWriteResGroup58], (instrs VINSERTF128rm)>;
def SBWriteResGroup59 : SchedWriteRes<[SBPort23,SBPort15]> {
let Latency = 7;
@@ -917,8 +910,7 @@ def SBWriteResGroup62 : SchedWriteRes<[S
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[SBWriteResGroup62], (instregex "VERRm",
- "VERWm")>;
+def: InstRW<[SBWriteResGroup62], (instregex "VER(R|W)m")>;
def SBWriteResGroup63 : SchedWriteRes<[SBPort23,SBPort015]> {
let Latency = 7;
@@ -932,7 +924,7 @@ def SBWriteResGroup64 : SchedWriteRes<[S
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SBWriteResGroup64], (instregex "FARJMP64")>;
+def: InstRW<[SBWriteResGroup64], (instrs FARJMP64)>;
def SBWriteResGroup65 : SchedWriteRes<[SBPort23,SBPort05,SBPort015]> {
let Latency = 7;
@@ -947,7 +939,7 @@ def SBWriteResGroup66 : SchedWriteRes<[S
let NumMicroOps = 4;
let ResourceCycles = [1,1,2];
}
-def: InstRW<[SBWriteResGroup66], (instregex "FNSTSWm")>;
+def: InstRW<[SBWriteResGroup66], (instrs FNSTSWm)>;
def SBWriteResGroup67 : SchedWriteRes<[SBPort1,SBPort5,SBPort015]> {
let Latency = 7;
@@ -962,8 +954,8 @@ def SBWriteResGroup68 : SchedWriteRes<[S
let NumMicroOps = 4;
let ResourceCycles = [1,1,2];
}
-def: InstRW<[SBWriteResGroup68], (instregex "CALL(16|32|64)m",
- "FNSTCW16m")>;
+def: InstRW<[SBWriteResGroup68], (instrs FNSTCW16m)>;
+def: InstRW<[SBWriteResGroup68], (instregex "CALL(16|32|64)m")>;
def SBWriteResGroup69 : SchedWriteRes<[SBPort4,SBPort23,SBPort05]> {
let Latency = 7;
@@ -1016,7 +1008,7 @@ def SBWriteResGroup84 : SchedWriteRes<[S
let NumMicroOps = 5;
let ResourceCycles = [1,2,2];
}
-def: InstRW<[SBWriteResGroup84], (instregex "FLDCW16m")>;
+def: InstRW<[SBWriteResGroup84], (instrs FLDCW16m)>;
def SBWriteResGroup85 : SchedWriteRes<[SBPort4,SBPort23,SBPort05]> {
let Latency = 8;
@@ -1033,18 +1025,15 @@ def SBWriteResGroup86 : SchedWriteRes<[S
let NumMicroOps = 5;
let ResourceCycles = [1,2,2];
}
-def: InstRW<[SBWriteResGroup86], (instrs MOVSL)>;
-def: InstRW<[SBWriteResGroup86], (instregex "MOVSB",
- "MOVSQ",
- "MOVSW",
- "XADD(8|16|32|64)rm")>;
+def: InstRW<[SBWriteResGroup86], (instrs MOVSB, MOVSL, MOVSQ, MOVSW)>;
+def: InstRW<[SBWriteResGroup86], (instregex "XADD(8|16|32|64)rm")>;
def SBWriteResGroup87 : SchedWriteRes<[SBPort4,SBPort5,SBPort01,SBPort23]> {
let Latency = 8;
let NumMicroOps = 5;
let ResourceCycles = [1,1,1,2];
}
-def: InstRW<[SBWriteResGroup87], (instregex "FARCALL64")>;
+def: InstRW<[SBWriteResGroup87], (instrs FARCALL64)>;
def SBWriteResGroup88 : SchedWriteRes<[SBPort4,SBPort23,SBPort05,SBPort015]> {
let Latency = 8;
@@ -1201,8 +1190,7 @@ def SBWriteResGroup106 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[SBWriteResGroup106], (instregex "FICOM(P?)16m",
- "FICOM(P?)32m")>;
+def: InstRW<[SBWriteResGroup106], (instregex "FICOM(P?)(16|32)m")>;
def SBWriteResGroup107 : SchedWriteRes<[SBPort1,SBPort5,SBPort23]> {
let Latency = 11;
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeClient.td Thu May 10 12:08:06 2018
@@ -481,12 +481,10 @@ def SKLWriteResGroup3 : SchedWriteRes<[S
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup3], (instregex "COMP_FST0r",
- "COM_FST0r",
+def: InstRW<[SKLWriteResGroup3], (instregex "COM(P?)_FST0r",
"MMX_MOVD64rr",
"MMX_MOVD64to64rr",
- "UCOM_FPr",
- "UCOM_Fr",
+ "UCOM_F(P?)r",
"(V?)MOV64toPQIrr",
"(V?)MOVDI2PDIrr")>;
@@ -552,15 +550,13 @@ def SKLWriteResGroup10 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup10], (instrs CBW, CWDE, CDQE)>;
+def: InstRW<[SKLWriteResGroup10], (instrs CBW, CWDE, CDQE,
+ CLC, CMC, STC)>;
def: InstRW<[SKLWriteResGroup10], (instrs LAHF, SAHF)>; // TODO: This doesn't match Agner's data
-def: InstRW<[SKLWriteResGroup10], (instregex "CLC",
- "CMC",
- "NOOP",
+def: InstRW<[SKLWriteResGroup10], (instregex "NOOP",
"SGDT64m",
"SIDT64m",
"SMSW16m",
- "STC",
"STRm",
"SYSCALL")>;
@@ -642,7 +638,7 @@ def SKLWriteResGroup21 : SchedWriteRes<[
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKLWriteResGroup21], (instregex "SFENCE")>;
+def: InstRW<[SKLWriteResGroup21], (instrs SFENCE)>;
def SKLWriteResGroup22 : SchedWriteRes<[SKLPort06,SKLPort15]> {
let Latency = 2;
@@ -675,7 +671,7 @@ def SKLWriteResGroup25 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKLWriteResGroup25], (instregex "FNSTCW16m")>;
+def: InstRW<[SKLWriteResGroup25], (instrs FNSTCW16m)>;
def SKLWriteResGroup27 : SchedWriteRes<[SKLPort4,SKLPort237,SKLPort15]> {
let Latency = 2;
@@ -717,9 +713,7 @@ def SKLWriteResGroup30 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup30], (instregex "(ADD|SUB|SUBR)_FPrST0",
- "(ADD|SUB|SUBR)_FST0r",
- "(ADD|SUB|SUBR)_FrST0",
+def: InstRW<[SKLWriteResGroup30], (instregex "(ADD|SUB|SUBR)_(FPrST0|FST0r|FrST0)",
"VPBROADCASTBrr",
"VPBROADCASTWrr",
"(V?)PCMPGTQ(Y?)rr")>;
@@ -729,7 +723,7 @@ def SKLWriteResGroup32 : SchedWriteRes<[
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKLWriteResGroup32], (instregex "FNSTSW16r")>;
+def: InstRW<[SKLWriteResGroup32], (instrs FNSTSW16r)>;
def SKLWriteResGroup33 : SchedWriteRes<[SKLPort06]> {
let Latency = 3;
@@ -804,7 +798,7 @@ def SKLWriteResGroup43 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKLWriteResGroup43], (instregex "FNSTSWm")>;
+def: InstRW<[SKLWriteResGroup43], (instrs FNSTSWm)>;
def SKLWriteResGroup44 : SchedWriteRes<[SKLPort4,SKLPort237,SKLPort06]> {
let Latency = 3;
@@ -825,16 +819,14 @@ def SKLWriteResGroup46 : SchedWriteRes<[
let NumMicroOps = 4;
let ResourceCycles = [1,1,1,1];
}
-def: InstRW<[SKLWriteResGroup46], (instregex "CALL64pcrel32")>;
+def: InstRW<[SKLWriteResGroup46], (instrs CALL64pcrel32)>;
def SKLWriteResGroup47 : SchedWriteRes<[SKLPort0]> {
let Latency = 4;
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup47], (instregex "MUL_FPrST0",
- "MUL_FST0r",
- "MUL_FrST0")>;
+def: InstRW<[SKLWriteResGroup47], (instregex "MUL_(FPrST0|FST0r|FrST0)")>;
def SKLWriteResGroup48 : SchedWriteRes<[SKLPort01]> {
let Latency = 4;
@@ -951,7 +943,7 @@ def SKLWriteResGroup63 : SchedWriteRes<[
let NumMicroOps = 5;
let ResourceCycles = [1,4];
}
-def: InstRW<[SKLWriteResGroup63], (instregex "XSETBV")>;
+def: InstRW<[SKLWriteResGroup63], (instrs XSETBV)>;
def SKLWriteResGroup64 : SchedWriteRes<[SKLPort06,SKLPort0156]> {
let Latency = 5;
@@ -965,8 +957,7 @@ def SKLWriteResGroup65 : SchedWriteRes<[
let NumMicroOps = 6;
let ResourceCycles = [1,1,4];
}
-def: InstRW<[SKLWriteResGroup65], (instregex "PUSHF16",
- "PUSHF64")>;
+def: InstRW<[SKLWriteResGroup65], (instregex "PUSHF(16|64)")>;
def SKLWriteResGroup67 : SchedWriteRes<[SKLPort23]> {
let Latency = 6;
@@ -1108,7 +1099,7 @@ def SKLWriteResGroup84 : SchedWriteRes<[
let NumMicroOps = 6;
let ResourceCycles = [1,5];
}
-def: InstRW<[SKLWriteResGroup84], (instregex "STD")>;
+def: InstRW<[SKLWriteResGroup84], (instrs STD)>;
def SKLWriteResGroup85 : SchedWriteRes<[SKLPort23]> {
let Latency = 7;
@@ -1211,15 +1202,14 @@ def SKLWriteResGroup96 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKLWriteResGroup96], (instregex "FLDCW16m")>;
+def: InstRW<[SKLWriteResGroup96], (instrs FLDCW16m)>;
def SKLWriteResGroup98 : SchedWriteRes<[SKLPort6,SKLPort23,SKLPort0156]> {
let Latency = 7;
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKLWriteResGroup98], (instregex "LRETQ",
- "RETQ")>;
+def: InstRW<[SKLWriteResGroup98], (instrs LRETQ, RETQ)>;
def SKLWriteResGroup100 : SchedWriteRes<[SKLPort4,SKLPort23,SKLPort237,SKLPort06]> {
let Latency = 7;
@@ -1280,10 +1270,7 @@ def SKLWriteResGroup108 : SchedWriteRes<
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKLWriteResGroup108], (instregex "FCOM32m",
- "FCOM64m",
- "FCOMP32m",
- "FCOMP64m",
+def: InstRW<[SKLWriteResGroup108], (instregex "FCOM(P?)(32|64)m",
"VPBROADCASTBYrm",
"VPBROADCASTWYrm",
"VPMOVSXBDYrm",
@@ -1493,8 +1480,7 @@ def SKLWriteResGroup149 : SchedWriteRes<
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[SKLWriteResGroup149], (instregex "FICOM(P?)16m",
- "FICOM(P?)32m")>;
+def: InstRW<[SKLWriteResGroup149], (instregex "FICOM(P?)(16|32)m")>;
def SKLWriteResGroup150 : SchedWriteRes<[SKLPort0,SKLPort5,SKLPort23]> {
let Latency = 11;
@@ -1607,9 +1593,7 @@ def SKLWriteResGroup171 : SchedWriteRes<
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup171], (instregex "DIVR_FPrST0",
- "DIVR_FST0r",
- "DIVR_FrST0")>;
+def: InstRW<[SKLWriteResGroup171], (instregex "DIVR_(FPrST0|FST0r|FrST0)")>;
def SKLWriteResGroup174 : SchedWriteRes<[SKLPort1,SKLPort23,SKLPort237,SKLPort06,SKLPort15,SKLPort0156]> {
let Latency = 15;
@@ -1623,7 +1607,7 @@ def SKLWriteResGroup177 : SchedWriteRes<
let NumMicroOps = 14;
let ResourceCycles = [1,1,1,4,2,5];
}
-def: InstRW<[SKLWriteResGroup177], (instregex "CMPXCHG8B")>;
+def: InstRW<[SKLWriteResGroup177], (instrs CMPXCHG8B)>;
def SKLWriteResGroup178 : SchedWriteRes<[SKLPort0156]> {
let Latency = 16;
@@ -1672,9 +1656,7 @@ def SKLWriteResGroup189 : SchedWriteRes<
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKLWriteResGroup189], (instregex "DIV_FPrST0",
- "DIV_FST0r",
- "DIV_FrST0")>;
+def: InstRW<[SKLWriteResGroup189], (instregex "DIV_(FPrST0|FST0r|FrST0)")>;
def SKLWriteResGroup190 : SchedWriteRes<[SKLPort0,SKLPort23,SKLFPDivider]> {
let Latency = 20;
@@ -1695,7 +1677,7 @@ def SKLWriteResGroup193 : SchedWriteRes<
let NumMicroOps = 10;
let ResourceCycles = [1,2,7];
}
-def: InstRW<[SKLWriteResGroup193], (instregex "MWAITrr")>;
+def: InstRW<[SKLWriteResGroup193], (instrs MWAITrr)>;
def SKLWriteResGroup195 : SchedWriteRes<[SKLPort0,SKLPort23,SKLFPDivider]> {
let Latency = 21;
@@ -1744,7 +1726,7 @@ def SKLWriteResGroup198 : SchedWriteRes<
let NumMicroOps = 19;
let ResourceCycles = [2,1,4,1,1,4,6];
}
-def: InstRW<[SKLWriteResGroup198], (instregex "CMPXCHG16B")>;
+def: InstRW<[SKLWriteResGroup198], (instrs CMPXCHG16B)>;
def SKLWriteResGroup202 : SchedWriteRes<[SKLPort0,SKLPort5,SKLPort23]> {
let Latency = 25;
@@ -1802,14 +1784,14 @@ def SKLWriteResGroup212 : SchedWriteRes<
let NumMicroOps = 18;
let ResourceCycles = [1,1,2,3,1,1,1,8];
}
-def: InstRW<[SKLWriteResGroup212], (instregex "VMCLEARm")>;
+def: InstRW<[SKLWriteResGroup212], (instrs VMCLEARm)>;
def SKLWriteResGroup213 : SchedWriteRes<[SKLPort4,SKLPort6,SKLPort23,SKLPort237,SKLPort0156]> {
let Latency = 41;
let NumMicroOps = 39;
let ResourceCycles = [1,10,1,1,26];
}
-def: InstRW<[SKLWriteResGroup213], (instregex "XSAVE64")>;
+def: InstRW<[SKLWriteResGroup213], (instrs XSAVE64)>;
def SKLWriteResGroup214 : SchedWriteRes<[SKLPort5,SKLPort0156]> {
let Latency = 42;
@@ -1823,7 +1805,8 @@ def SKLWriteResGroup215 : SchedWriteRes<
let NumMicroOps = 40;
let ResourceCycles = [1,11,1,1,26];
}
-def: InstRW<[SKLWriteResGroup215], (instregex "^XSAVE$", "XSAVEC", "XSAVES")>;
+def: InstRW<[SKLWriteResGroup215], (instrs XSAVE)>;
+def: InstRW<[SKLWriteResGroup215], (instregex "XSAVEC", "XSAVES")>;
def SKLWriteResGroup216 : SchedWriteRes<[SKLPort4,SKLPort6,SKLPort23,SKLPort237,SKLPort0156]> {
let Latency = 46;
@@ -1837,7 +1820,7 @@ def SKLWriteResGroup217 : SchedWriteRes<
let NumMicroOps = 64;
let ResourceCycles = [2,8,5,10,39];
}
-def: InstRW<[SKLWriteResGroup217], (instregex "FLDENVm")>;
+def: InstRW<[SKLWriteResGroup217], (instrs FLDENVm)>;
def SKLWriteResGroup218 : SchedWriteRes<[SKLPort0,SKLPort6,SKLPort23,SKLPort05,SKLPort06,SKLPort15,SKLPort0156]> {
let Latency = 63;
@@ -1879,6 +1862,6 @@ def SKLWriteResGroup223 : SchedWriteRes<
let NumMicroOps = 100;
let ResourceCycles = [9,1,11,16,1,11,21,30];
}
-def: InstRW<[SKLWriteResGroup223], (instregex "FSTENVm")>;
+def: InstRW<[SKLWriteResGroup223], (instrs FSTENVm)>;
} // SchedModel
Modified: llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSkylakeServer.td Thu May 10 12:08:06 2018
@@ -492,15 +492,13 @@ def SKXWriteResGroup3 : SchedWriteRes<[S
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup3], (instregex "COMP_FST0r",
- "COM_FST0r",
+def: InstRW<[SKXWriteResGroup3], (instregex "COM(P?)_FST0r",
"KMOV(B|D|Q|W)kr",
"MMX_MOVD64rr",
"MMX_MOVD64to64rr",
"MOV64toPQIrr",
"MOVDI2PDIrr",
- "UCOM_FPr",
- "UCOM_Fr",
+ "UCOM_F(P?)r",
"VMOV64toPQI(Z?)rr",
"VMOVDI2PDI(Z?)rr")>;
@@ -576,15 +574,13 @@ def SKXWriteResGroup10 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup10], (instrs CBW, CWDE, CDQE)>;
+def: InstRW<[SKXWriteResGroup10], (instrs CBW, CWDE, CDQE,
+ CLC, CMC, STC)>;
def: InstRW<[SKXWriteResGroup10], (instrs LAHF, SAHF)>; // TODO: This doesn't match Agner's data
-def: InstRW<[SKXWriteResGroup10], (instregex "CLC",
- "CMC",
- "NOOP",
+def: InstRW<[SKXWriteResGroup10], (instregex "NOOP",
"SGDT64m",
"SIDT64m",
"SMSW16m",
- "STC",
"STRm",
"SYSCALL")>;
@@ -601,9 +597,7 @@ def: InstRW<[SKXWriteResGroup11], (instr
"MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
- "ST_FP32m",
- "ST_FP64m",
- "ST_FP80m",
+ "ST_FP(32|64|80)m",
"VMOV(H|L)(PD|PS)Z128mr(b?)",
"(V?)MOV(H|L)(PD|PS)mr",
"VMOVPDI2DIZmr(b?)",
@@ -677,7 +671,7 @@ def SKXWriteResGroup21 : SchedWriteRes<[
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKXWriteResGroup21], (instregex "SFENCE")>;
+def: InstRW<[SKXWriteResGroup21], (instrs SFENCE)>;
def SKXWriteResGroup22 : SchedWriteRes<[SKXPort06,SKXPort15]> {
let Latency = 2;
@@ -710,7 +704,7 @@ def SKXWriteResGroup25 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKXWriteResGroup25], (instregex "FNSTCW16m")>;
+def: InstRW<[SKXWriteResGroup25], (instrs FNSTCW16m)>;
def SKXWriteResGroup27 : SchedWriteRes<[SKXPort4,SKXPort237,SKXPort15]> {
let Latency = 2;
@@ -770,9 +764,7 @@ def SKXWriteResGroup32 : SchedWriteRes<[
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup32], (instregex "(ADD|SUB|SUBR)_FPrST0",
- "(ADD|SUB|SUBR)_FST0r",
- "(ADD|SUB|SUBR)_FrST0",
+def: InstRW<[SKXWriteResGroup32], (instregex "(ADD|SUB|SUBR)_(FPrST0|FST0r|FrST0)",
"KSHIFTL(B|D|Q|W)ri",
"KSHIFTR(B|D|Q|W)ri",
"KUNPCKBWrr",
@@ -808,7 +800,7 @@ def SKXWriteResGroup34 : SchedWriteRes<[
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKXWriteResGroup34], (instregex "FNSTSW16r")>;
+def: InstRW<[SKXWriteResGroup34], (instrs FNSTSW16r)>;
def SKXWriteResGroup35 : SchedWriteRes<[SKXPort06]> {
let Latency = 3;
@@ -882,7 +874,7 @@ def SKXWriteResGroup45 : SchedWriteRes<[
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKXWriteResGroup45], (instregex "FNSTSWm")>;
+def: InstRW<[SKXWriteResGroup45], (instrs FNSTSWm)>;
def SKXWriteResGroup46 : SchedWriteRes<[SKXPort4,SKXPort237,SKXPort06]> {
let Latency = 3;
@@ -903,16 +895,14 @@ def SKXWriteResGroup48 : SchedWriteRes<[
let NumMicroOps = 4;
let ResourceCycles = [1,1,1,1];
}
-def: InstRW<[SKXWriteResGroup48], (instregex "CALL64pcrel32")>;
+def: InstRW<[SKXWriteResGroup48], (instrs CALL64pcrel32)>;
def SKXWriteResGroup49 : SchedWriteRes<[SKXPort0]> {
let Latency = 4;
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup49], (instregex "MUL_FPrST0",
- "MUL_FST0r",
- "MUL_FrST0")>;
+def: InstRW<[SKXWriteResGroup49], (instregex "MUL_(FPrST0|FST0r|FrST0)")>;
def SKXWriteResGroup50 : SchedWriteRes<[SKXPort015]> {
let Latency = 4;
@@ -1128,7 +1118,7 @@ def SKXWriteResGroup67 : SchedWriteRes<[
let NumMicroOps = 5;
let ResourceCycles = [1,4];
}
-def: InstRW<[SKXWriteResGroup67], (instregex "XSETBV")>;
+def: InstRW<[SKXWriteResGroup67], (instrs XSETBV)>;
def SKXWriteResGroup68 : SchedWriteRes<[SKXPort06,SKXPort0156]> {
let Latency = 5;
@@ -1142,8 +1132,7 @@ def SKXWriteResGroup69 : SchedWriteRes<[
let NumMicroOps = 6;
let ResourceCycles = [1,1,4];
}
-def: InstRW<[SKXWriteResGroup69], (instregex "PUSHF16",
- "PUSHF64")>;
+def: InstRW<[SKXWriteResGroup69], (instregex "PUSHF(16|64)")>;
def SKXWriteResGroup71 : SchedWriteRes<[SKXPort23]> {
let Latency = 6;
@@ -1330,7 +1319,7 @@ def SKXWriteResGroup88 : SchedWriteRes<[
let NumMicroOps = 6;
let ResourceCycles = [1,5];
}
-def: InstRW<[SKXWriteResGroup88], (instregex "STD")>;
+def: InstRW<[SKXWriteResGroup88], (instrs STD)>;
def SKXWriteResGroup89 : SchedWriteRes<[SKXPort23]> {
let Latency = 7;
@@ -1494,7 +1483,7 @@ def SKXWriteResGroup101 : SchedWriteRes<
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKXWriteResGroup101], (instregex "FLDCW16m")>;
+def: InstRW<[SKXWriteResGroup101], (instrs FLDCW16m)>;
def SKXWriteResGroup103 : SchedWriteRes<[SKXPort5,SKXPort23,SKXPort0156]> {
let Latency = 7;
@@ -1508,8 +1497,7 @@ def SKXWriteResGroup104 : SchedWriteRes<
let NumMicroOps = 3;
let ResourceCycles = [1,1,1];
}
-def: InstRW<[SKXWriteResGroup104], (instregex "LRETQ",
- "RETQ")>;
+def: InstRW<[SKXWriteResGroup104], (instrs LRETQ, RETQ)>;
def SKXWriteResGroup106 : SchedWriteRes<[SKXPort4,SKXPort5,SKXPort237]> {
let Latency = 7;
@@ -1617,8 +1605,7 @@ def SKXWriteResGroup119 : SchedWriteRes<
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SKXWriteResGroup119], (instregex "FCOM(P?)32m",
- "FCOM(P?)64m",
+def: InstRW<[SKXWriteResGroup119], (instregex "FCOM(P?)(32|64)m",
"VFPCLASSSDrm(b?)",
"VPBROADCASTBYrm",
"VPBROADCASTB(Z|Z256)m(b?)",
@@ -2044,8 +2031,7 @@ def SKXWriteResGroup162 : SchedWriteRes<
let NumMicroOps = 3;
let ResourceCycles = [2,1];
}
-def: InstRW<[SKXWriteResGroup162], (instregex "FICOM(P?)16m",
- "FICOM(P?)32m",
+def: InstRW<[SKXWriteResGroup162], (instregex "FICOM(P?)(16|32)m",
"VEXPANDPD(Z|Z256)rm(b?)",
"VEXPANDPS(Z|Z256)rm(b?)",
"VPEXPANDD(Z|Z256)rm(b?)",
@@ -2262,9 +2248,7 @@ def SKXWriteResGroup191 : SchedWriteRes<
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup191], (instregex "DIVR_FPrST0",
- "DIVR_FST0r",
- "DIVR_FrST0")>;
+def: InstRW<[SKXWriteResGroup191], (instregex "DIVR_(FPrST0|FST0r|FrST0)")>;
def SKXWriteResGroup194 : SchedWriteRes<[SKXPort1,SKXPort5,SKXPort01,SKXPort23,SKXPort015]> {
let Latency = 15;
@@ -2295,7 +2279,7 @@ def SKXWriteResGroup199 : SchedWriteRes<
let NumMicroOps = 14;
let ResourceCycles = [1,1,1,4,2,5];
}
-def: InstRW<[SKXWriteResGroup199], (instregex "CMPXCHG8B")>;
+def: InstRW<[SKXWriteResGroup199], (instrs CMPXCHG8B)>;
def SKXWriteResGroup200 : SchedWriteRes<[SKXPort0156]> {
let Latency = 16;
@@ -2367,9 +2351,7 @@ def SKXWriteResGroup215 : SchedWriteRes<
let NumMicroOps = 1;
let ResourceCycles = [1];
}
-def: InstRW<[SKXWriteResGroup215], (instregex "DIV_FPrST0",
- "DIV_FST0r",
- "DIV_FrST0")>;
+def: InstRW<[SKXWriteResGroup215], (instregex "DIV_(FPrST0|FST0r|FrST0)")>;
def SKXWriteResGroup216 : SchedWriteRes<[SKXPort0,SKXPort23,SKXFPDivider]> {
let Latency = 20;
@@ -2400,7 +2382,7 @@ def SKXWriteResGroup220 : SchedWriteRes<
let NumMicroOps = 10;
let ResourceCycles = [1,2,7];
}
-def: InstRW<[SKXWriteResGroup220], (instregex "MWAITrr")>;
+def: InstRW<[SKXWriteResGroup220], (instrs MWAITrr)>;
def SKXWriteResGroup222 : SchedWriteRes<[SKXPort0,SKXPort23,SKXFPDivider]> {
let Latency = 21;
@@ -2481,7 +2463,7 @@ def SKXWriteResGroup228 : SchedWriteRes<
let NumMicroOps = 19;
let ResourceCycles = [2,1,4,1,1,4,6];
}
-def: InstRW<[SKXWriteResGroup228], (instregex "CMPXCHG16B")>;
+def: InstRW<[SKXWriteResGroup228], (instrs CMPXCHG16B)>;
def SKXWriteResGroup233 : SchedWriteRes<[SKXPort0,SKXPort5,SKXPort23]> {
let Latency = 25;
@@ -2591,14 +2573,14 @@ def SKXWriteResGroup252 : SchedWriteRes<
let NumMicroOps = 18;
let ResourceCycles = [1,1,2,3,1,1,1,8];
}
-def: InstRW<[SKXWriteResGroup252], (instregex "VMCLEARm")>;
+def: InstRW<[SKXWriteResGroup252], (instrs VMCLEARm)>;
def SKXWriteResGroup253 : SchedWriteRes<[SKXPort4,SKXPort6,SKXPort23,SKXPort237,SKXPort0156]> {
let Latency = 41;
let NumMicroOps = 39;
let ResourceCycles = [1,10,1,1,26];
}
-def: InstRW<[SKXWriteResGroup253], (instregex "XSAVE64")>;
+def: InstRW<[SKXWriteResGroup253], (instrs XSAVE64)>;
def SKXWriteResGroup254 : SchedWriteRes<[SKXPort5,SKXPort0156]> {
let Latency = 42;
@@ -2612,7 +2594,8 @@ def SKXWriteResGroup255 : SchedWriteRes<
let NumMicroOps = 40;
let ResourceCycles = [1,11,1,1,26];
}
-def: InstRW<[SKXWriteResGroup255], (instregex "^XSAVE$", "XSAVEC", "XSAVES", "XSAVEOPT")>;
+def: InstRW<[SKXWriteResGroup255], (instrs XSAVE)>;
+def: InstRW<[SKXWriteResGroup255], (instregex "XSAVEC", "XSAVES", "XSAVEOPT")>;
def SKXWriteResGroup256 : SchedWriteRes<[SKXPort5,SKXPort01,SKXPort23,SKXPort015]> {
let Latency = 44;
@@ -2627,7 +2610,7 @@ def SKXWriteResGroup258 : SchedWriteRes<
let NumMicroOps = 64;
let ResourceCycles = [2,8,5,10,39];
}
-def: InstRW<[SKXWriteResGroup258], (instregex "FLDENVm")>;
+def: InstRW<[SKXWriteResGroup258], (instrs FLDENVm)>;
def SKXWriteResGroup259 : SchedWriteRes<[SKXPort0,SKXPort6,SKXPort23,SKXPort05,SKXPort06,SKXPort15,SKXPort0156]> {
let Latency = 63;
@@ -2683,7 +2666,7 @@ def SKXWriteResGroup266 : SchedWriteRes<
let NumMicroOps = 100;
let ResourceCycles = [9,1,11,16,1,11,21,30];
}
-def: InstRW<[SKXWriteResGroup266], (instregex "FSTENVm")>;
+def: InstRW<[SKXWriteResGroup266], (instrs FSTENVm)>;
def SKXWriteResGroup267 : SchedWriteRes<[SKXPort6,SKXPort0156]> {
let Latency = 140;
Modified: llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td?rev=332022&r1=332021&r2=332022&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleZnver1.td Thu May 10 12:08:06 2018
@@ -632,7 +632,7 @@ def : InstRW<[ZnWriteALULat2], (instrege
def : InstRW<[ZnWriteALULat2Ld], (instregex "BLS(I|MSK|R)(32|64)rm")>;
// CLD STD.
-def : InstRW<[WriteALU], (instregex "STD", "CLD")>;
+def : InstRW<[WriteALU], (instrs STD, CLD)>;
// PDEP PEXT.
// r,r,r.
@@ -670,9 +670,9 @@ def : InstRW<[ZnWriteCMPXCHG], (instrege
def ZnWriteCMPXCHG8B : SchedWriteRes<[ZnAGU, ZnALU]> {
let NumMicroOps = 18;
}
-def : InstRW<[ZnWriteCMPXCHG8B], (instregex "CMPXCHG8B")>;
+def : InstRW<[ZnWriteCMPXCHG8B], (instrs CMPXCHG8B)>;
-def : InstRW<[WriteMicrocoded], (instregex "CMPXCHG16B")>;
+def : InstRW<[WriteMicrocoded], (instrs CMPXCHG16B)>;
// LEAVE
def ZnWriteLEAVE : SchedWriteRes<[ZnALU, ZnAGU]> {
@@ -688,7 +688,7 @@ def : InstRW<[WriteMicrocoded], (instrs
def : InstRW<[WriteMicrocoded], (instregex "RDTSC")>;
// RDPMC.
-def : InstRW<[WriteMicrocoded], (instregex "RDPMC")>;
+def : InstRW<[WriteMicrocoded], (instrs RDPMC)>;
// RDRAND.
def : InstRW<[WriteMicrocoded], (instregex "RDRAND(16|32|64)r")>;
@@ -794,16 +794,16 @@ def : InstRW<[WriteMicrocoded], (instreg
// FNSTSW.
// AX.
-def : InstRW<[WriteMicrocoded], (instregex "FNSTSW16r")>;
+def : InstRW<[WriteMicrocoded], (instrs FNSTSW16r)>;
// m16.
-def : InstRW<[WriteMicrocoded], (instregex "FNSTSWm")>;
+def : InstRW<[WriteMicrocoded], (instrs FNSTSWm)>;
// FLDCW.
-def : InstRW<[WriteMicrocoded], (instregex "FLDCW16m")>;
+def : InstRW<[WriteMicrocoded], (instrs FLDCW16m)>;
// FNSTCW.
-def : InstRW<[WriteMicrocoded], (instregex "FNSTCW16m")>;
+def : InstRW<[WriteMicrocoded], (instrs FNSTCW16m)>;
// FINCSTP FDECSTP.
def : InstRW<[ZnWriteFPU3], (instrs FINCSTP, FDECSTP)>;
@@ -832,14 +832,13 @@ def : InstRW<[ZnWriteFPU3Lat1], (instreg
// FCOM(P) FUCOM(P).
// r.
-def : InstRW<[ZnWriteFPU0Lat1], (instregex "COM_FST0r", "COMP_FST0r", "UCOM_Fr",
- "UCOM_FPr")>;
+def : InstRW<[ZnWriteFPU0Lat1], (instregex "COM(P?)_FST0r", "UCOM_F(P?)r")>;
// m.
-def : InstRW<[ZnWriteFPU0Lat1Ld], (instregex "FCOM(32|64)m", "FCOMP(32|64)m")>;
+def : InstRW<[ZnWriteFPU0Lat1Ld], (instregex "FCOM(P?)(32|64)m")>;
// FCOMPP FUCOMPP.
// r.
-def : InstRW<[ZnWriteFPU0Lat1], (instregex "FCOMPP", "UCOM_FPPr")>;
+def : InstRW<[ZnWriteFPU0Lat1], (instrs FCOMPP, UCOM_FPPr)>;
def ZnWriteFPU02 : SchedWriteRes<[ZnAGU, ZnFPU02]>
{
@@ -858,7 +857,7 @@ def ZnWriteFPU03 : SchedWriteRes<[ZnAGU,
}
// FICOM(P).
-def : InstRW<[ZnWriteFPU03], (instregex "FICOM(16|32)m", "FICOMP(16|32)m")>;
+def : InstRW<[ZnWriteFPU03], (instregex "FICOM(P?)(16|32)m")>;
// FTST.
def : InstRW<[ZnWriteFPU0Lat1], (instregex "TST_F")>;
More information about the llvm-commits
mailing list