[llvm-dev] Can LTO optimize across functions? (original) (raw)
Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Sat Feb 16 14:40:39 PST 2019
- Previous message: [llvm-dev] Can LTO optimize across functions?
- Next message: [llvm-dev] Any objections to me removing //llvm/lib/Support/README.txt.system?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ThinLTO (as well as regular aka "full" LTO) essentially expand the scope of the optimizer through link time optimization techniques. So interprocedural optimizations (IPO) such as inlining functions into callsites which without LTO would be restricted to the Module (or Translation Unit) scope, now can be performed across code that was from different Translation Units (originally different Modules). LTO also enables some more aggressive whole program optimizations that aren't available without whole program scope (e.g. whole program dead stripping, internalization, etc).
Hope that helps. Teresa
On Sat, Feb 16, 2019 at 10:43 AM Peng Yu via llvm-dev <llvm-dev at lists.llvm.org> wrote:
Hi, It is not clear to me in the clang LTO documentation. Can the optimization across multiple functions? For example, if a function turns better to be inlined, will it be inlined? Or if some basicblocks are the same between functions, will multiple functions use the same basic block. Thanks. https://clang.llvm.org/docs/ThinLTO.html -- Regards, Peng
LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-- Teresa Johnson | Software Engineer | tejohnson at google.com |
- Previous message: [llvm-dev] Can LTO optimize across functions?
- Next message: [llvm-dev] Any objections to me removing //llvm/lib/Support/README.txt.system?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]