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-jitFrom 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 -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~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
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.