[PATCH] D148010: [Pipelines] Don't run module optimization in full LTO pre-link

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 11:19:20 PDT 2023


smeenai added subscribers: lanza, smeenai.
smeenai added a comment.

We build Meta's Android apps with full LTO (paired with `-Oz`) and function merging to minimize size. I evaluated this patch as-is and it was a considerable size regression (526 KiB for Facebook for Android arm64). However, my colleague @lanza discovered that adding additional instances of the function merging pass (here <https://github.com/llvm/llvm-project/blob/74e29d37157d75fba6ce528e611ad90242de56fd/llvm/lib/Passes/PassBuilderPipelines.cpp#L1631>, here <https://github.com/llvm/llvm-project/blob/74e29d37157d75fba6ce528e611ad90242de56fd/llvm/lib/Passes/PassBuilderPipelines.cpp#L1725>, and here <https://github.com/llvm/llvm-project/blob/74e29d37157d75fba6ce528e611ad90242de56fd/llvm/lib/Passes/PassBuilderPipelines.cpp#L1748>), in addition to being a considerable size improvement by itself, also makes this change be a small size improvement (20 KiB) instead. We haven't upstreamed the additional function merger runs yet (we want to make sure we understand the size improvements properly and have a principled reason for the change), but I figured I'd note it here early in case someone else is also evaluating this for size.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148010/new/

https://reviews.llvm.org/D148010



More information about the llvm-commits mailing list