diff options
author | Kazu Hirata <kazu@google.com> | 2022-09-29 09:00:38 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-09-29 09:00:38 -0700 |
commit | 4e9dd21015f2ed4d57d6bea08ca08a30ef6e5ce8 (patch) | |
tree | 131dcdccc00ade488c6710570a21ebde4fac873c /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 1079f1c6eaa686b3010fd7c43cf71fc355ec6e69 (diff) | |
download | llvm-4e9dd21015f2ed4d57d6bea08ca08a30ef6e5ce8.zip llvm-4e9dd21015f2ed4d57d6bea08ca08a30ef6e5ce8.tar.gz llvm-4e9dd21015f2ed4d57d6bea08ca08a30ef6e5ce8.tar.bz2 |
[ModuleInliner] Add a cost-benefit-based priority
This patch teaches the module inliner a traversal order designed for
the instrumentation FDO (+ThinLTO) scenario.
The new traversal order prioritizes call sites in the following order:
1. Those call sites that are expected to reduce the caller size
2. Those call sites that have gone through the cost-benefit analaysis
3. The remaining call sites
With this fairly simple traversal order, a large internel benchmark
yields performance comparable to the bottom-up inliner -- both in
terms of the execution performance and .text* sizes.
Big thanks goes to Liqiang Tao for the module inliner infrastructure.
I still have hacks outside this patch to prevent excessively long
compilation or .text* size explosion. I'm trying to come up with
acceptable solutions in near future.
Differential Revision: https://reviews.llvm.org/D134376
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions