summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/block-placement.ll
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-27 13:34:33 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-27 13:34:33 +0000
commitfac1305da162259d17baa6700ecb5d148b86ef08 (patch)
tree66adffef120b8f40b9882142d681679815fd1df8 /test/CodeGen/X86/block-placement.ll
parent790552c20fbd8daa77d343419f0f6ec4e7fa1457 (diff)
downloadllvm-fac1305da162259d17baa6700ecb5d148b86ef08.tar.gz
llvm-fac1305da162259d17baa6700ecb5d148b86ef08.tar.bz2
llvm-fac1305da162259d17baa6700ecb5d148b86ef08.tar.xz
Take two on rotating the block ordering of loops. My previous attempt
was centered around the premise of laying out a loop in a chain, and then rotating that chain. This is good for preserving contiguous layout, but bad for actually making sane rotations. In order to keep it safe, I had to essentially make it impossible to rotate deeply nested loops. The information needed to correctly reason about a deeply nested loop is actually available -- *before* we layout the loop. We know the inner loops are already fused into chains, etc. We lose information the moment we actually lay out the loop. The solution was the other alternative for this algorithm I discussed with Benjamin and some others: rather than rotating the loop after-the-fact, try to pick a profitable starting block for the loop's layout, and then use our existing layout logic. I was worried about the complexity of this "pick" step, but it turns out such complexity is needed to handle all the important cases I keep teasing out of benchmarks. This is, I'm afraid, a bit of a work-in-progress. It is still misbehaving on some likely important cases I'm investigating in Olden. It also isn't really tested. I'm going to try to craft some interesting nested-loop test cases, but it's likely to be extremely time consuming and I don't want to go there until I'm sure I'm testing the correct behavior. Sadly I can't come up with a way of getting simple, fine grained test cases for this logic. We need complex loop structures to even trigger much of it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/block-placement.ll')
-rw-r--r--test/CodeGen/X86/block-placement.ll6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/CodeGen/X86/block-placement.ll b/test/CodeGen/X86/block-placement.ll
index 52f7c3081c..167d522d47 100644
--- a/test/CodeGen/X86/block-placement.ll
+++ b/test/CodeGen/X86/block-placement.ll
@@ -122,14 +122,14 @@ define i32 @test_loop_early_exits(i32 %i, i32* %a) {
; Check that we sink early exit blocks out of loop bodies.
; CHECK: test_loop_early_exits:
; CHECK: %entry
-; CHECK: %body1
; CHECK: %body2
; CHECK: %body3
; CHECK: %body4
-; CHECK: %exit
+; CHECK: %body1
; CHECK: %bail1
; CHECK: %bail2
; CHECK: %bail3
+; CHECK: %exit
entry:
br label %body1
@@ -346,9 +346,9 @@ define void @unnatural_cfg2() {
; single-source GCC.
; CHECK: unnatural_cfg2
; CHECK: %entry
-; CHECK: %loop.header
; CHECK: %loop.body1
; CHECK: %loop.body2
+; CHECK: %loop.header
; CHECK: %loop.body3
; CHECK: %loop.inner1.begin
; The end block is folded with %loop.body3...