[LLVMdev] Problems of source to source transformation of LLVM
lism03 at gmail.com
Thu Dec 31 00:10:50 PST 2009
Nobody give comments on this?
Is the source to source transformation of LLVM robust enough?
Thanks in advance.
Problems of source to source transformation of LLVM
I did experiments of the source transformation of LLVM on SPEC2000 C
programs. But I found most benchmarks can't be
transformed from source to source successfully.
The steps are as follows.
1. I write a script to transform every .c file into .bc file, and then
use llc to transform .bc file to .c files.
I don't know if there are any method to transform many .c files into one .bc
file and then transform the .bc file into one .c file.
If there are any good method, pls tell me:-). The scripts are as follows.
for file in *.c
llvm-gcc -O3 -emit-llvm $file -c -o $file.bc
llc -march=c $file.bc -o $file
2. Then I use GCC -O3 to compile the new source .c files.
The problems occur when doing the source to source transformation. I listed
some error messages as follows.
LLVM ERROR: The C backend does not currently support integer types of widths
other than 1, 8, 16, 32, 64.
This is being tracked as PR 4158.
In file included from perl.h:1276,
cop.h:217: error: expected specifier-qualifier-list before 'bool'
oa1.c: In function 'OaCompare':
oa1.c:1714: error: duplicate case value
oa1.c:1705: error: previously used here
Can anyone give help? Thanks very much in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev