diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-18 21:33:05 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-02-18 21:33:05 +0000 |
| commit | 352d352c023ed411d9e4357ea01f3ec468ff87dc (patch) | |
| tree | 39c68041361c761a8290d6c452c02ea0dc9366ea /test/CodeGen | |
| parent | 49d7f8d341a7b4137c674ce0f08f5b18e8195f4a (diff) | |
| download | llvm-352d352c023ed411d9e4357ea01f3ec468ff87dc.tar.gz llvm-352d352c023ed411d9e4357ea01f3ec468ff87dc.tar.bz2 llvm-352d352c023ed411d9e4357ea01f3ec468ff87dc.tar.xz | |
Always normalize spill weights, also for intervals created by spilling.
Moderate the weight given to very small intervals.
The spill weight given to new intervals created when spilling was not
normalized in the same way as the original spill weights calculated by
CalcSpillWeights. That meant that restored registers would tend to hang around
because they had a much higher spill weight that unspilled registers.
This improves the runtime of a few tests by up to 10%, and there are no
significant regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/X86/2008-02-22-ReMatBug.ll | 2 | ||||
| -rw-r--r-- | test/CodeGen/X86/pr3495-2.ll | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGen/X86/2008-02-22-ReMatBug.ll b/test/CodeGen/X86/2008-02-22-ReMatBug.ll index 8d6bb0df1f..a91ac27f98 100644 --- a/test/CodeGen/X86/2008-02-22-ReMatBug.ll +++ b/test/CodeGen/X86/2008-02-22-ReMatBug.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s -march=x86 -stats |& grep {Number of re-materialization} | grep 3 +; RUN: llc < %s -march=x86 -stats |& grep {Number of re-materialization} | grep 2 ; rdar://5761454 %struct.quad_struct = type { i32, i32, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct*, %struct.quad_struct* } diff --git a/test/CodeGen/X86/pr3495-2.ll b/test/CodeGen/X86/pr3495-2.ll index 71aa5a0488..98c064a07d 100644 --- a/test/CodeGen/X86/pr3495-2.ll +++ b/test/CodeGen/X86/pr3495-2.ll @@ -1,4 +1,8 @@ -; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats |& grep {Number of reloads omited} +; RUN: llc < %s -march=x86 -relocation-model=pic -disable-fp-elim -stats |& grep {Number of loads added} | grep 1 +; PR3495 +; +; This test may not be testing what it was supposed to test. +; It used to have two spills and four reloads, but not it only has one spill and one reload. target datalayout = "e-p:32:32:32" target triple = "i386-apple-darwin9.6" |
