Hello, can i compile binary file .bc in my cpp program? now i use following code: if (system("opt a.out.bc -std-compile-opts -disable-inlining -loop-deletion -loop-extract -loop-extract-single -loop-rotate -loop-index-split -loop-unroll -opt-phis -loop-unswitch -loop-reduce -o test.bc") == -1) { Error("Don't install LLVM!"); exit(1); } if (system("llvmc test.bc -o test.out") != -1) {...} if (system("ldd test.out") == -1) {...} and what keys using in clang with flag -O3? With respect Andrei. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120107/8ceca1fc/attachment.html>
Hi Андрей Кабылин, the tools directory contains a bunch of cpp programs that load, optimize and codegen bitcode (eg: opt and llc). They are quite small since all the real work is done in the LLVM libraries. I suggest you copy what they do. Ciao, Duncan.> Hello, can i compile binary file .bc in my cpp program? now i use following code: > > if (system("opt a.out.bc -std-compile-opts -disable-inlining -loop-deletion > -loop-extract -loop-extract-single -loop-rotate -loop-index-split -loop-unroll > -opt-phis -loop-unswitch -loop-reduce -o test.bc") == -1) { > Error("Don't install LLVM!"); > exit(1); > } > > if (system("llvmc test.bc -o test.out") != -1) {...} > if (system("ldd test.out") == -1) {...} > > and what keys using in clang with flag -O3? > With respect Andrei. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- A bug related with undef value when bootstrap MemorySSA.cpp
- A bug related with undef value when bootstrap MemorySSA.cpp
- [LLVMdev] why LoopUnswitch pass does not constant fold conditional branch and merge blocks
- [LLVMdev] loop passes vs call graph
- A bug related with undef value when bootstrap MemorySSA.cpp