There is a bug when compiling the benchmark cdecl. To compile the program with LLVM's linear scan, follow these steps:
llvm-gcc cdecl.c -o cdecl
llc -f -regalloc=linearscan cdecl.bc -o ln.s
gcc ln.s -o exec
./exec cdlex.l.in
To compile the program with the SSA-based allocator, do as follow:
llvm-gcc cdecl.c -o cdecl
llc -f -regalloc=chordal cdecl.bc -o ch.s
gcc ch.s -o exec
./exec cdlex.l.in
The output produced by the different allocators is not the same.
Another problem that I am having is in the compilation of sim.c (llvm/projects/llvm-test/MultiSource/Benchmarks/sim). The compilation/execution of this file is a little tricky because of the input tag in the llvm line:
llvm-gcc -DUNIX sim.c -o sim
llc -f -regalloc=linearscan sim.bc -o ln.s
gcc ln.s -o exec
./exec
The bug happens during compilation. When I invoke
llc -f -regalloc=chordal sim.bc -o ch.s
I get a compilation error.