AmirJamez |
07-15-2012 11:09 PM |
I see.
I tried to run gsm.c without the sed options, and I had the errors :
Code:
"opt/llvm_transformed.c", line 239: warning: undefined escape sequence in literal
"opt/llvm_transformed.c", line 239: warning: undefined escape sequence in literal
"opt/llvm_transformed.c", line 239: warning: undefined escape sequence in literal
"opt/llvm_transformed.c", line 239: warning: undefined escape sequence in literal
"opt/llvm_transformed.c", line 243: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed.c", line 243: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed.c", line 244: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 244: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 244: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed.c", line 244: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed.c", line 245: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 245: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 245: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed.c", line 246: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 246: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 246: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed.c", line 247: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 247: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 247: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed.c", line 248: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 248: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 248: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed.c", line 249: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 249: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 249: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed.c", line 250: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 250: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 250: warning: illegal combination of pointer and integer, op >=
"opt/llvm_transformed.c", line 251: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 251: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 251: warning: illegal combination of pointer and integer, op ==
"opt/llvm_transformed.c", line 252: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 252: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 252: warning: illegal combination of pointer and integer, op !=
"opt/llvm_transformed.c", line 253: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 253: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 253: warning: illegal combination of pointer and integer, op <
"opt/llvm_transformed.c", line 254: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 254: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 254: warning: illegal combination of pointer and integer, op >
"opt/llvm_transformed.c", line 255: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 255: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 255: warning: illegal combination of pointer and integer, op <=
"opt/llvm_transformed.c", line 256: error: redeclaration of formal parameter, X
"opt/llvm_transformed.c", line 256: error: redeclaration of formal parameter, Y
"opt/llvm_transformed.c", line 256: warning: illegal combination of pointer and integer, op >=
"opt/llvm_transformed.c", line 360: error: illegal indirection
"opt/llvm_transformed.c", line 362: error: pointer required
"opt/llvm_transformed.c", line 362: error: illegal indirection
"opt/llvm_transformed.c", line 363: error: pointer required
"opt/llvm_transformed.c", line 363: compiler error: too many errors
--(MGW)--> WARNING Execution Failed
So it seems that I really need to change the long long to unsigned long.
By the way, I checked the C-opt-C.sh :
Code:
#!/bin/bash
#set -x
function print_usage() {
echo "Usage: $0 [OPTIONS]"
echo " -h Print this help."
echo " -c Configuration file"
echo " -s Source files path"
echo " -w Work files path"
echo " -o Output files path"
exit 0
}
configfile="#"
srcpath="#"
workpath="#"
outpath="#"
while getopts "hc:s:w:o:" flag; do
case $flag in
h) print_usage;;
c) configfile=$OPTARG;;
s) srcpath=$OPTARG;;
w) workpath=$OPTARG;;
o) outpath=$OPTARG;;
?) echo "unknown";;
esac
done
if [ ! -f $configfile ]; then
echo "Configuration file missing. Use -help to see help"
#!/bin/bash
#set -x
function print_usage() {
echo "Usage: $0 [OPTIONS]"
echo " -h Print this help."
echo " -c Configuration file"
echo " -s Source files path"
echo " -w Work files path"
echo " -o Output files path"
exit 0
}
configfile="#"
srcpath="#"
workpath="#"
outpath="#"
while getopts "hc:s:w:o:" flag; do
case $flag in
h) print_usage;;
c) configfile=$OPTARG;;
s) srcpath=$OPTARG;;
w) workpath=$OPTARG;;
o) outpath=$OPTARG;;
?) echo "unknown";;
esac
done
if [ ! -f $configfile ]; then
echo "Configuration file missing. Use -help to see help"
exit 1
fi;
if [ ! -d $srcpath ]; then
echo "Source path missing. Use -help to see help"
exit 1
fi;
if [ $workpath = "#" ]; then
echo "Work path missing. Use -help to see help"
exit 1
fi;
if [ $outpath = "#" ]; then
echo "Output path missing. Use -help to see help"
exit 1
fi;
sources=""
for f in $(ls $srcpath/*.c); do
sources="$sources $(basename $f)"
done
mkdir -p $workpath
mkdir -p $outpath
echo "Optimization options: $(cat $configfile)"
for f in $sources; do
echo " Processing $f"
infile=$srcpath/$f
noopt=$workpath/${f%%.c}.llnoopt
opt=$workpath/${f%%.c}.llopt
cout=$outpath/$f
/home/user/LLVM_2_8/llvm-gcc-4.2-2.8-i686-linux/bin/llvm-gcc -S -emit-llvm $infile -o $noopt
/home/user/LLVM_2_8/build/bin/opt $(cat $configfile) -S -o $opt $noopt
/home/user/LLVM_2_8/build/bin/llc -march=c $opt -o $cout
done
echo "Done"
There is no explicit declaration of any 64 bits output.
Best,
Amir
|