Hi folks, I've got an idea for something I may be able to do as a Link-Time- Optimization pass, but I can't seem to find how LTO gets used. My crude approach has been to compile LLVM for debugging, and then run gdb on llvm-ld with -O5 and two .bc files, trying to catch LTO in action. I've also scanned the compiled tools, and none of them appear to use the symbol 'createLLVMOptimizer' (or anything with 'lto', etc). The document at http://llvm.org/releases/2.1/docs/LinkTimeOptimization.html doesn't seem to be of much help for getting started with this. How do I provoke LTO? Any suggestions? Thanks, Jeff Jeff Inman -- jti at lanl.gov Advanced Architectures for Computation Los Alamos National Laboratory
You can use the opt tool to run passes explicitly. For IPO passes to have much effect, you need to run -internalize first. --Owen On Jan 24, 2008, at 2:23 PM, Jeff Inman wrote:> Hi folks, > > I've got an idea for something I may be able to do as a Link-Time- > Optimization pass, > but I can't seem to find how LTO gets used. My crude approach has > been to compile > LLVM for debugging, and then run gdb on llvm-ld with -O5 and two .bc > files, trying to > catch LTO in action. I've also scanned the compiled tools, and none > of them appear > to use the symbol 'createLLVMOptimizer' (or anything with 'lto', > etc). The document at > http://llvm.org/releases/2.1/docs/LinkTimeOptimization.html doesn't > seem to be of much > help for getting started with this. How do I provoke LTO? Any > suggestions? > > Thanks, > > Jeff > > > Jeff Inman -- jti at lanl.gov > Advanced Architectures for Computation > Los Alamos National Laboratory > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2555 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080124/936aaa98/attachment.bin>
On Jan 24, 2008, at 12:23 PM, Jeff Inman wrote:> Hi folks, > > I've got an idea for something I may be able to do as a Link-Time- > Optimization pass, > but I can't seem to find how LTO gets used. My crude approach has > been to compile > LLVM for debugging, and then run gdb on llvm-ld with -O5 and two .bc > files, trying to > catch LTO in action.Then, you want to set up a break-point at tools/llvm-ld/Optimizer.cpp: 109 Optimizer(Module *M)> I've also scanned the compiled tools, and none > of them appear > to use the symbol 'createLLVMOptimizer' (or anything with 'lto', > etc). The document at > http://llvm.org/releases/2.1/docs/LinkTimeOptimization.html doesn't > seem to be of much > help for getting started with this.This document is intended for someone who wants to integrate LLVM optimizer in the system linker. If a system linker can optimizer LLVM bitcodes then that is one way to take advantage of LTO. Another approach is to use llvm-ld to join multiple .bc files together and optimize them using various interprocedural optimizations.> How do I provoke LTO? Any > suggestions? > > Thanks, > > Jeff- Devang
Seemingly Similar Threads
- [LLVMdev] ARM backend playing with alternative jump table implementations
- MachineInstr sizes for ARM jumptables
- [LLVMdev] Is -m32 supported by llvm-gcc when using LTO/gold?
- [LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation
- [LLVMdev] patch for llc/ARM: added mechanism to move switch tables from .text -> .data; also cleanup and documentation