2022 LLVM Developers' Meeting
[ Ссылка ]
------
Inlining for Size
Speaker: Kyungwoo Lee
------
Slides: [ Ссылка ]
-----
Inlining for size is critical in mobile apps as app size continues to grow.
While a link-time optimization (LTO) largely minimizes the app size at minimum size optimization (-Oz), a scalable link-time optimization (ThinLTO) misses many inline opportunities because each module inliner works independently without modeling the size cost globally.
We first show how to use the ModuleInliner with LTO.
Then, we describe how to improve inlining with ThinLTO by extending the bitcode summary, followed by a global inline analysis.
We also explain how to overcome import restrictions, often appearing in Objective-C or Swift, by pre-merging bitcode modules.
We reduced the code size by 2.8% for SocialApp, 4.0% for ChatApp, and 3.0% for Clang, compared to -Oz with ThinLTO.
-----
Videos Edited by Bash Films: [ Ссылка ]
Ещё видео!