Hello,
I'm trying to generate bitcode files from the SPEC CPU2006 benchmark suites.
First I installed the benchmarks into ~/llvm/projects/test-suite/External/speccpu2006 and then I tried
~/mysandbox/bin/lnt runtest nt --sandbox=sandbox --cc=/Users/asd/llvm/Release/bin/clang --test-suite=/Users/asd/llvm/projects/test-suite --test-externals=/Users/asd/llvm/projects/test-suite/External -j 4 --only-test=External/SPEC --enable-jit
It looks like all but two tests did run fine but the Output directories don't contain bitcode files, they only contain object files. Is there a way to generate bitcode files?
Regards
Andreas
~/mysandbox/bin/lnt runtest nt --sandbox=sandbox --cc=/Users/asd/llvm/Release/bin/clang --test-suite=/Users/asd/llvm/projects/test-suite --test-externals=/Users/asd/llvm/projects/test-suite/External -j 4 --only-test=External/SPEC --enable-jit
From your cmdline, I don't see any option to make clang output bitcode. If you
want bitcode, try something like `clang -emit-llvm hello.c -c -o hello.bc`.
Regards,
chenwj
Hi chenwj,
first let me thank you for your quick answer.
From your cmdline, I don't see any option to make clang output bitcode. If you
want bitcode, try something like `clang -emit-llvm hello.c -c -o hello.bc`.
I added --enable-jit because I had hope this would make LNT run the JIT tests. I thought this process would cause the creation of bitcode files and then execute them using the LLVM interpreter.
I would love to simply run clang but the SPEC CPU2006 benchmarks are quite complicated to build. There already exist makefiles to build them in the LLVM test-suite and I had hope I could use the test-suite to create the bitcode files. It looks like the SPEC makefiles contain rules to build and then run the benchmarks with the interpreter but I could not figure out how to make this happen using the LNT tool. I tried to directly run the makefiles instead of using LNT but it just caused a lot of terrible errors.
Regards
Andreas
You can make SPEC just build those benchmarks, right? My point is if you *just*
want get those bitcode, then build those benchmarks rather than running them. 
Regards,
chenwj
Hi again!
You can make SPEC just build those benchmarks, right? My point is if you *just*
want get those bitcode, then build those benchmarks rather than running them. 
I am not sure if that is what you tried to tell me but I ran LNT with the following parameters:
~/mysandbox/bin/lnt runtest nt --sandbox=sandbox --cc=/Users/asd/llvm/Release/bin/clang --test-suite=/Users/asd/llvm/projects/test-suite --test-externals=/Users/asd/llvm/projects/test-suite/External -j 4 --only-test=External/SPEC --enable-jit --optimize-option=-O0 --cflag=-c --cflag=-emit-llvm
Of course running the tests terribly failed but the .o files in the Output directories are LLVM bitcode now.
Well, that is not the way I expected it to work but it is the result which counts =)
Thank you very much for all your efforts.
Cheers
Andreas
Hi Andreas,
I'm trying to generate bitcode files from the SPEC CPU2006 benchmark suites.
First I installed the benchmarks into ~/llvm/projects/test-suite/External/speccpu2006 and then I tried
~/mysandbox/bin/lnt runtest nt --sandbox=sandbox --cc=/Users/asd/llvm/Release/bin/clang --test-suite=/Users/asd/llvm/projects/test-suite --test-externals=/Users/asd/llvm/projects/test-suite/External -j 4 --only-test=External/SPEC --enable-jit
It looks like all but two tests did run fine but the Output directories don't contain bitcode files, they only contain object files. Is there a way to generate bitcode files?
I don't know how to do this using "lnt", but you can do it more traditionally
by unpacking the LLVM nightly testsuite into llvm/projects, then configuring
LLVM with --with-externals=path/externals, where the externals directory is
expected to contain speccpu2000, speccpu2006 etc directories. After building
LLVM you can (in the objects directory where you built LLVM) change to the
projects/test-suite subdirectory and do: make
This should build everything including SPEC. Once it's done you can rummage
around to find the bitcode.
Ciao, Duncan.