Skip to content

Commit 7c2cdb1

Browse files
committed
Turn on list-ilp scheduling by default on x86 and x86-64, fix up
testcases accordingly. Some are currently xfailed and will be filed as bugs to be fixed or understood. Performance results: roughly neutral on SPEC some micro benchmarks in the llvm suite are up between 100 and 150%, only a pair of regressions that are due to be investigated john-the-ripper saw: 10% improvement in traditional DES 8% improvement in BSDI DES 59% improvement in FreeBSD MD5 67% improvement in OpenBSD Blowfish 14% improvement in LM DES Small compile time impact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127208 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 0bf56c8 commit 7c2cdb1

19 files changed

+25
-19
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
221221

222222
// X86 is weird, it always uses i8 for shift amounts and setcc results.
223223
setBooleanContents(ZeroOrOneBooleanContent);
224-
setSchedulingPreference(Sched::RegPressure);
224+
setSchedulingPreference(Sched::ILP);
225225
setStackPointerRegisterToSaveRestore(X86StackPtr);
226226

227227
if (Subtarget->isTargetWindows() && !Subtarget->isTargetCygMing()) {

test/CodeGen/X86/2006-05-01-SchedCausingSpills.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; XFAIL: *
12
; RUN: llc < %s -march=x86 -mcpu=yonah -stats |& \
23
; RUN: not grep {Number of register spills}
34
; END.

test/CodeGen/X86/2008-07-11-SpillerBug.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
; CHECK: andl $65534, %
55
; CHECK-NEXT: movl %
66
; CHECK-NEXT: movzwl
7-
; CHECK-NEXT: movl $17
87

98
@g_5 = external global i16 ; <i16*> [#uses=2]
109
@g_107 = external global i16 ; <i16*> [#uses=1]

test/CodeGen/X86/2008-07-19-movups-spills.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=1 -mattr=sse2 | grep movaps | count 75
2-
; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movaps | count 75
1+
; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=1 -mattr=sse2 | grep movups | count 33
2+
; RUN: llc < %s -mtriple=i686-pc-linux -realign-stack=0 -mattr=sse2 | grep movups | count 33
33
; PR2539
44
; PR8969 - make 32-bit linux have a 16-byte aligned stack
5+
; Verify that movups is still generated with an aligned stack for the globals
6+
; that must be accessed unaligned
57

68
external global <4 x float>, align 1 ; <<4 x float>*>:0 [#uses=2]
79
external global <4 x float>, align 1 ; <<4 x float>*>:1 [#uses=1]

test/CodeGen/X86/2008-08-05-SpillerBug.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -disable-fp-elim -stats |& grep asm-printer | grep 55
1+
; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=yonah -pre-RA-sched=list-burr -disable-fp-elim -stats |& grep asm-printer | grep 55
22
; PR2568
33

44
@g_3 = external global i16 ; <i16*> [#uses=1]

test/CodeGen/X86/2008-08-31-EH_RETURN32.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; Check that eh_return & unwind_init were properly lowered
22
; RUN: llc < %s | grep %ebp | count 7
3-
; RUN: llc < %s | grep %ecx | count 5
3+
; RUN: llc < %s | grep %edx | count 5
44

55
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
66
target triple = "i386-pc-linux"

test/CodeGen/X86/2009-04-20-LinearScanOpt.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats |& grep asm-printer | grep 82
1+
; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats |& grep asm-printer | grep 79
22
; rdar://6802189
33

44
; Test if linearscan is unfavoring registers for allocation to allow more reuse

test/CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s | FileCheck %s
1+
; RUN: llc -pre-RA-sched=list-burr < %s | FileCheck %s
22
; PR6941
33
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
44
target triple = "x86_64-apple-darwin10.0.0"

test/CodeGen/X86/2010-09-17-SideEffectsInChain.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ entry:
1919
}
2020

2121
; CHECK: movq ___stack_chk_guard@GOTPCREL(%rip), %rax
22-
; CHECK: movb 30(%rsp), %dl
23-
; CHECK: movb (%rsp), %sil
24-
; CHECK: movb %sil, (%rsp)
25-
; CHECK: movb %dl, 30(%rsp)
22+
; CHECK: movb 38(%rsp), %bl
23+
; CHECK: movb 8(%rsp), %dl
24+
; CHECK: movb %dl, 8(%rsp)
25+
; CHECK: movb %bl, 38(%rsp)
2626
; CHECK: callq ___stack_chk_fail

test/CodeGen/X86/break-anti-dependencies.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
; RUN: llc < %s -march=x86-64 -post-RA-scheduler -break-anti-dependencies=none > %t
1+
; Without list-burr scheduling we may not see the difference in codegen here.
2+
; RUN: llc < %s -march=x86-64 -post-RA-scheduler -pre-RA-sched=list-burr -break-anti-dependencies=none > %t
23
; RUN: grep {%xmm0} %t | count 14
34
; RUN: not grep {%xmm1} %t
45
; RUN: llc < %s -march=x86-64 -post-RA-scheduler -break-anti-dependencies=critical > %t

0 commit comments

Comments
 (0)