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
On Fri, Mar 23, 2012 at 05:04:34AM +0100, Andreas Donig wrote:> 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.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 -- 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 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