From bff810cc371a38f493d688c54f71013f5a7d53bf Mon Sep 17 00:00:00 2001 From: dhuth Date: Wed, 27 Aug 2014 09:52:06 -0600 Subject: Initial commit --- examples/chill/unroll.script | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/chill/unroll.script (limited to 'examples/chill/unroll.script') diff --git a/examples/chill/unroll.script b/examples/chill/unroll.script new file mode 100644 index 0000000..e64acb6 --- /dev/null +++ b/examples/chill/unroll.script @@ -0,0 +1,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 -- cgit v1.2.3-70-g09d2