forked from bondhugula/pluto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecloog
More file actions
executable file
·29 lines (24 loc) · 747 Bytes
/
recloog
File metadata and controls
executable file
·29 lines (24 loc) · 747 Bytes
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
#!/bin/bash
#
# A handy script to try a customized .cloog file. The pluto system does not use
# this script. Only meant for power users!
#
# Uday Bondhugula
#
# This script is in the public domain
#
# Usage
# recloog <-f option to cloog> <-l option to CLooG> <existing C file> <new .cloog file>
#
#
if [ $# -ne 4 ]; then
echo -n -e "Usage:"
echo -e "\trecloog {-f option to cloog} {-l option to CLooG} {existing C file} {new .cloog file}"
exit
fi
cloog -cpp 1 -esp 1 -csp 1 -f $1 -l $2 $4 > .out.c
NUMLINES=`wc -l $3 | awk '{print $1}'`
grep -B $NUMLINES "/* Generated from" $3 | grep -v "/* Generated" > .header
grep -A $NUMLINES "/* End of CLooG code" $3 > .footer
cat .header .out.c .footer > $3
rm -f .header .out.c .footer