On Thu, Nov 1, 2012 at 10:04 PM, Zhoujinguo <zhoujinguo1988 at yahoo.cn> wrote:> Hi, > > I am interested in building some large projects to get single .bc files. > Is there an easy way to do this? Or do I have to go through and understand > the whole makefile script? >This is what LLVM's "LTO" (Link Time Optimization) does, basically. This is triggered by building with -O4 and you'd need to use an LTO-aware linker (like gold) to handle the link step. I'm not sure how you'd actually dump out bitcode from the linker, rather than a final binary - but that's more-or-less where you'd get involved. I realize this is a bit vague (as I'm by no means an expert on the matter) but thought it might be at least a pointer to some ideas/approach. - David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121101/4582dd34/attachment.html>
Konstantin Tokarev
2012-Nov-02 08:46 UTC
[LLVMdev] How can I build Mysql and Apache using LLVM
02.11.2012, 10:55, "David Blaikie" <dblaikie at gmail.com>:> On Thu, Nov 1, 2012 at 10:04 PM, Zhoujinguo <zhoujinguo1988 at yahoo.cn> wrote: >> Hi, >> I am interested in building some large projects to get single .bc files. Is there an easy way to do this? Or do I have to go through and understand the whole makefile script? > This is what LLVM's "LTO" (Link Time Optimization) does, basically. This is triggered by building with -O4 and you'd need to use an LTO-aware linker (like gold) to handle the link step. I'm not sure how you'd actually dump out bitcode from the linker, rather than a final binary - but that's more-or-less where you'd get involved.Instead of using linker, you can call all .o files and process them - when building with -O4 they contain bitcode. -- Regards, Konstantin
nkavv at physics.auth.gr
2012-Nov-02 09:37 UTC
[LLVMdev] Avoiding the emission of metadata
Hi all is it possible to avoid the emission of metadata information by opt and/or clang? For instance, I would like to go without "tbaa" metadata in LLVM assembly code as printed by "-emit-llvm". I'm using the 3.1 binary release for MinGW (and for Linux on a different machine). Best regards Nikolaos Kavvadias
You can turn off TBAA metadata by passing -fno-strict-aliasing to clang. You can turn off emitting debug metadata by not passing -g. There is no flag for turning off metadata in general (for example, range metadata will still be produced for certain casts, and if you compile Objective-C for the GNU runtimes then you will still have some metadata attached to message sends. If you want to remove all metadata, then you will need to strip it off explicitly, but that leads to the question of what problem you are actually trying to solve. David On 2 Nov 2012, at 09:37, nkavv at physics.auth.gr wrote:> Hi all > > is it possible to avoid the emission of metadata information by opt and/or clang? > > For instance, I would like to go without "tbaa" metadata in LLVM assembly code as printed by "-emit-llvm". > > I'm using the 3.1 binary release for MinGW (and for Linux on a different machine). > > Best regards > Nikolaos Kavvadias > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Avoiding the emission of metadata
- [LLVMdev] How can I build Mysql and Apache using LLVM
- [LLVMdev] Inconsistent label syntax in LLVM assembly
- [LLVMdev] Inconsistent label syntax in LLVM assembly
- [LLVMdev] Problem with PTX assembly printing (NVPTX backend)