summaryrefslogtreecommitdiff
path: root/test-chill/test-cases/examples/chill/unroll.script
blob: e64acb642b0d6832231c440d58b7ea895192aed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Test unroll-and-jam. The last loop adapted from the simple
# convolution example from p463 of "Optimizing Compilers for
# Modern Architectures", by Randy Allen and Ken Kennedy.
#

source: unroll.c
procedure: foo
format: rose
# fully unroll a loop with known iteration count
loop: 0
original()
unroll(0,1,3)
print
print space


# a strided loop
loop: 1
original()
unroll(0,1,2)
print
print space

# lower and upper bounds are not constant
loop: 2
original()
unroll(0,1,20)
print

# parallelogram iteration space
loop: 3
original()
unroll(0,1,2)
print