[llvm-dev] Compiling a benchmark to IR (either from test-suite, or other benchmarks)
Matthias Braun via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 26 10:04:02 PST 2018
There is no immediate support for this in the test-suite cmake buildsystem. There is something in the Makefile system indeed, but it lacks documentation and I'm not aware of any examples of how to use it.
I would recommend to use `CMAKE_C_FLAGS=--save-temps=obj cmake ...` in the test-suite. The --save-temps=obj flag will make clang place a bitcode file next to each .o file.
- Matthias
> On Feb 26, 2018, at 9:42 AM, Gus Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello all.
>
> I'm in need of a benchmark that can be compiled to IR or bytecode. I found the test-suite project (https://llvm.org/docs/TestSuiteMakefileGuide.html <https://llvm.org/docs/TestSuiteMakefileGuide.html>) and thought a benchmark in that project might work. However, I'm having trouble figuring out how to actually compile any of the benchmarks to IR or bytecode. Using cmake and make I can compile them to binaries, but at no point do I see any bytecode being produced.
>
> The Makefiles in this project have rules for compiling and linking bytecode. Are there options I need to be passing to cmake or make?
>
> Alternatively, are there other known benchmarks (and associated makefiles) that compile to IR/bytecode? I can go through the work of setting up benchmarks to compile to bc/IR, but I figured someone has likely already done this!
>
> Thanks for the help,
> Gus Smith, Penn State
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180226/0cf4ce50/attachment.html>
More information about the llvm-dev
mailing list