Skip to content

Commit 6f8fbf4

Browse files
committedSep 19, 2017
[X86][Skylake] Adding the scheduling information for the SkylakeClient target
This patch adds the instruction scheduling information for the SkylakeClient (SKL) architecture target by adding the file X86SchedSkylakeClient.td located under the X86 Target. We used the scheduling information retrieved from the Skylake architects in order to create the file. The scheduling information includes latency, number of micro-Ops and used ports by each SKL instruction. The patch continues the scheduling replacement and insertion effort started with the SNB target in r307529 and r310792 and for HSW in r311879. Please expect some performance fluctuations due to code alignment effects. Reviewers: craig.topper, zvi, chandlerc, igorb, aymanmus, RKSimon, delena Differential Revision: https://reviews.llvm.org/D37294 llvm-svn: 313613
1 parent c383714 commit 6f8fbf4

17 files changed

+5047
-853
lines changed
 

‎llvm/lib/Target/X86/X86.td

+2-3
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,7 @@ def SKLFeatures : ProcessorFeatures<BDWFeatures.Value, [
602602
FeatureFastVectorFSQRT
603603
]>;
604604

605-
// FIXME: define SKL model
606-
class SkylakeClientProc<string Name> : ProcModel<Name, HaswellModel,
605+
class SkylakeClientProc<string Name> : ProcModel<Name, SkylakeClientModel,
607606
SKLFeatures.Value, [
608607
ProcIntelSKL
609608
]>;
@@ -641,7 +640,7 @@ def SKXFeatures : ProcessorFeatures<SKLFeatures.Value, [
641640
]>;
642641

643642
// FIXME: define SKX model
644-
class SkylakeServerProc<string Name> : ProcModel<Name, HaswellModel,
643+
class SkylakeServerProc<string Name> : ProcModel<Name, SkylakeClientModel,
645644
SKXFeatures.Value, [
646645
ProcIntelSKX
647646
]>;

‎llvm/lib/Target/X86/X86SchedSkylakeClient.td

+4,011
Large diffs are not rendered by default.

‎llvm/lib/Target/X86/X86Schedule.td

+1
Original file line numberDiff line numberDiff line change
@@ -666,4 +666,5 @@ include "X86SchedHaswell.td"
666666
include "X86ScheduleSLM.td"
667667
include "X86ScheduleZnver1.td"
668668
include "X86ScheduleBtVer2.td"
669+
include "X86SchedSkylakeClient.td"
669670

‎llvm/test/CodeGen/X86/aes-schedule.ll

+14-14
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ define <2 x i64> @test_aesdec(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
3636
;
3737
; SKYLAKE-LABEL: test_aesdec:
3838
; SKYLAKE: # BB#0:
39-
; SKYLAKE-NEXT: vaesdec %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
40-
; SKYLAKE-NEXT: vaesdec (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
39+
; SKYLAKE-NEXT: vaesdec %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
40+
; SKYLAKE-NEXT: vaesdec (%rdi), %xmm0, %xmm0 # sched: [4:1.00]
4141
; SKYLAKE-NEXT: retq # sched: [2:1.00]
4242
;
4343
; BTVER2-LABEL: test_aesdec:
@@ -85,8 +85,8 @@ define <2 x i64> @test_aesdeclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2)
8585
;
8686
; SKYLAKE-LABEL: test_aesdeclast:
8787
; SKYLAKE: # BB#0:
88-
; SKYLAKE-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
89-
; SKYLAKE-NEXT: vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
88+
; SKYLAKE-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
89+
; SKYLAKE-NEXT: vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [4:1.00]
9090
; SKYLAKE-NEXT: retq # sched: [2:1.00]
9191
;
9292
; BTVER2-LABEL: test_aesdeclast:
@@ -134,8 +134,8 @@ define <2 x i64> @test_aesenc(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
134134
;
135135
; SKYLAKE-LABEL: test_aesenc:
136136
; SKYLAKE: # BB#0:
137-
; SKYLAKE-NEXT: vaesenc %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
138-
; SKYLAKE-NEXT: vaesenc (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
137+
; SKYLAKE-NEXT: vaesenc %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
138+
; SKYLAKE-NEXT: vaesenc (%rdi), %xmm0, %xmm0 # sched: [4:1.00]
139139
; SKYLAKE-NEXT: retq # sched: [2:1.00]
140140
;
141141
; BTVER2-LABEL: test_aesenc:
@@ -183,8 +183,8 @@ define <2 x i64> @test_aesenclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2)
183183
;
184184
; SKYLAKE-LABEL: test_aesenclast:
185185
; SKYLAKE: # BB#0:
186-
; SKYLAKE-NEXT: vaesenclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
187-
; SKYLAKE-NEXT: vaesenclast (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
186+
; SKYLAKE-NEXT: vaesenclast %xmm1, %xmm0, %xmm0 # sched: [4:1.00]
187+
; SKYLAKE-NEXT: vaesenclast (%rdi), %xmm0, %xmm0 # sched: [4:1.00]
188188
; SKYLAKE-NEXT: retq # sched: [2:1.00]
189189
;
190190
; BTVER2-LABEL: test_aesenclast:
@@ -236,9 +236,9 @@ define <2 x i64> @test_aesimc(<2 x i64> %a0, <2 x i64> *%a1) {
236236
;
237237
; SKYLAKE-LABEL: test_aesimc:
238238
; SKYLAKE: # BB#0:
239-
; SKYLAKE-NEXT: vaesimc %xmm0, %xmm0 # sched: [14:2.00]
240-
; SKYLAKE-NEXT: vaesimc (%rdi), %xmm1 # sched: [14:2.00]
241-
; SKYLAKE-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
239+
; SKYLAKE-NEXT: vaesimc %xmm0, %xmm0 # sched: [8:2.00]
240+
; SKYLAKE-NEXT: vaesimc (%rdi), %xmm1 # sched: [8:2.00]
241+
; SKYLAKE-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.50]
242242
; SKYLAKE-NEXT: retq # sched: [2:1.00]
243243
;
244244
; BTVER2-LABEL: test_aesimc:
@@ -293,9 +293,9 @@ define <2 x i64> @test_aeskeygenassist(<2 x i64> %a0, <2 x i64> *%a1) {
293293
;
294294
; SKYLAKE-LABEL: test_aeskeygenassist:
295295
; SKYLAKE: # BB#0:
296-
; SKYLAKE-NEXT: vaeskeygenassist $7, %xmm0, %xmm0 # sched: [29:7.00]
297-
; SKYLAKE-NEXT: vaeskeygenassist $7, (%rdi), %xmm1 # sched: [28:7.00]
298-
; SKYLAKE-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
296+
; SKYLAKE-NEXT: vaeskeygenassist $7, %xmm0, %xmm0 # sched: [20:6.00]
297+
; SKYLAKE-NEXT: vaeskeygenassist $7, (%rdi), %xmm1 # sched: [19:6.00]
298+
; SKYLAKE-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.50]
299299
; SKYLAKE-NEXT: retq # sched: [2:1.00]
300300
;
301301
; BTVER2-LABEL: test_aeskeygenassist:

0 commit comments

Comments
 (0)
Please sign in to comment.