Zero-sized functions should be cost-free in term of size budget, so they should be considered during inlining even if we run out of size budget.
This appears to give 0.5% win for one of our internal services.
Paths
| Differential D153820
[CSSPGO][Preinliner] Always inline zero-sized functions. ClosedPublic Authored by hoy on Jun 26 2023, 3:42 PM.
Details Summary Zero-sized functions should be cost-free in term of size budget, so they should be considered during inlining even if we run out of size budget. This appears to give 0.5% win for one of our internal services.
Diff Detail
Event TimelineComment Actions Can this be achieved by simply tweaking ProfiledCandidateComparer so zero SizeCost candidate always comes before non-zero ones? Comment Actions
Good idea! Comment Actions lgtm, thanks.
This revision is now accepted and ready to land.Jun 27 2023, 4:54 PM This revision was landed with ongoing or failed builds.Jun 27 2023, 5:12 PM Closed by commit rG4bdc938ce3f0: [CSSPGO][Preinliner] Always inline zero-sized functions. (authored by hoy). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 534769 llvm/tools/llvm-profgen/CSPreInliner.cpp
|