fix warnings
[pluto.git] / recloog
blob8b72c82c2ed668d4a0179e6350236faf96f33eee
1 #!/bin/bash
3 # A handy script to try a customized .cloog file. The pluto system does not use
4 # this script. Only meant for power users!
6 # Uday Bondhugula
8 # This script is in the public domain
9 #
10 # Usage
11 # recloog <-f option to cloog> <-l option to CLooG> <existing C file> <new .cloog file>
15 if [ $# -ne 4 ]; then
16 echo -n -e "Usage:"
17 echo -e "\trecloog {-f option to cloog} {-l option to CLooG} {existing C file} {new .cloog file}"
18 exit
21 cloog -cpp 1 -esp 1 -csp 1 -f $1 -l $2 $4 > .out.c
23 NUMLINES=`wc -l $3 | awk '{print $1}'`
25 grep -B $NUMLINES "/* Generated from" $3 | grep -v "/* Generated" > .header
26 grep -A $NUMLINES "/* End of CLooG code" $3 > .footer
28 cat .header .out.c .footer > $3
29 rm -f .header .out.c .footer