Skip to content

Commit

Permalink
[X86][Haswell] Updating HSW instruction scheduling information
Browse files Browse the repository at this point in the history
This patch completely replaces the instruction scheduling information for the Haswell architecture target by modifying the file X86SchedHaswell.td located under the X86 Target.
We used the scheduling information retrieved from the Haswell architects in order to replace and modify the existing scheduling.
The patch continues the scheduling replacement effort started with the SNB target in r307529 and r310792.
Information includes latency, number of micro-Ops and used ports by each HSW instruction.

Please expect some performance fluctuations due to code alignment effects.

Reviewers: RKSimon, zvi, aymanmus, craig.topper, m_zuckerman, igorb, dim, chandlerc, aaboud

Differential Revision: https://reviews.llvm.org/D36663

llvm-svn: 311879
  • Loading branch information
gadihaber committed Aug 28, 2017
1 parent 60608a8 commit d76f7b8
Show file tree
Hide file tree
Showing 40 changed files with 13,749 additions and 12,721 deletions.
4,749 changes: 3,510 additions & 1,239 deletions llvm/lib/Target/X86/X86SchedHaswell.td

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions llvm/test/CodeGen/X86/aes-schedule.ll
Expand Up @@ -32,7 +32,7 @@ define <2 x i64> @test_aesdec(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
; HASWELL: # BB#0:
; HASWELL-NEXT: vaesdec %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: vaesdec (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aesdec:
; BTVER2: # BB#0:
Expand Down Expand Up @@ -75,7 +75,7 @@ define <2 x i64> @test_aesdeclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2)
; HASWELL: # BB#0:
; HASWELL-NEXT: vaesdeclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: vaesdeclast (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aesdeclast:
; BTVER2: # BB#0:
Expand Down Expand Up @@ -118,7 +118,7 @@ define <2 x i64> @test_aesenc(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2) {
; HASWELL: # BB#0:
; HASWELL-NEXT: vaesenc %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: vaesenc (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aesenc:
; BTVER2: # BB#0:
Expand Down Expand Up @@ -161,7 +161,7 @@ define <2 x i64> @test_aesenclast(<2 x i64> %a0, <2 x i64> %a1, <2 x i64> *%a2)
; HASWELL: # BB#0:
; HASWELL-NEXT: vaesenclast %xmm1, %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: vaesenclast (%rdi), %xmm0, %xmm0 # sched: [7:1.00]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aesenclast:
; BTVER2: # BB#0:
Expand Down Expand Up @@ -208,7 +208,7 @@ define <2 x i64> @test_aesimc(<2 x i64> %a0, <2 x i64> *%a1) {
; HASWELL-NEXT: vaesimc %xmm0, %xmm0 # sched: [14:2.00]
; HASWELL-NEXT: vaesimc (%rdi), %xmm1 # sched: [14:2.00]
; HASWELL-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aesimc:
; BTVER2: # BB#0:
Expand Down Expand Up @@ -255,10 +255,10 @@ define <2 x i64> @test_aeskeygenassist(<2 x i64> %a0, <2 x i64> *%a1) {
;
; HASWELL-LABEL: test_aeskeygenassist:
; HASWELL: # BB#0:
; HASWELL-NEXT: vaeskeygenassist $7, %xmm0, %xmm0 # sched: [10:8.00]
; HASWELL-NEXT: vaeskeygenassist $7, (%rdi), %xmm1 # sched: [10:7.00]
; HASWELL-NEXT: vaeskeygenassist $7, %xmm0, %xmm0 # sched: [29:7.00]
; HASWELL-NEXT: vaeskeygenassist $7, (%rdi), %xmm1 # sched: [28:7.00]
; HASWELL-NEXT: vpor %xmm1, %xmm0, %xmm0 # sched: [1:0.33]
; HASWELL-NEXT: retq # sched: [1:1.00]
; HASWELL-NEXT: retq # sched: [2:1.00]
;
; BTVER2-LABEL: test_aeskeygenassist:
; BTVER2: # BB#0:
Expand Down

0 comments on commit d76f7b8

Please sign in to comment.