Page MenuHomePhabricator

[Inlining] Introduce -enable-npm-pgo-inline-deferral
ClosedPublic

Authored by kazu on May 28 2020, 8:42 PM.

Details

Summary

Experiments show that inline deferral past pre-inlining slightly
pessimizes the performance.

This patch introduces an option to control inline deferral during PGO.
The option defaults to true for now (that is, NFC).

Diff Detail

Event Timeline

kazu created this revision.May 28 2020, 8:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2020, 8:42 PM
davidxl added inline comments.May 29 2020, 10:12 AM
llvm/include/llvm/Analysis/InlineAdvisor.h
206

give it a default value (true)?

kazu updated this revision to Diff 267659.Jun 1 2020, 10:18 AM

Made the last parameter of shouldInline optional.

kazu marked an inline comment as done.Jun 1 2020, 10:19 AM

PTAL Thanks!

davidxl accepted this revision.Jun 3 2020, 9:13 AM

lgtm

This revision is now accepted and ready to land.Jun 3 2020, 9:13 AM
This revision was automatically updated to reflect the committed changes.
wenlei added a subscriber: wenlei.Thu, Jun 4, 8:10 AM

Experiments show that inline deferral past pre-inlining slightly pessimizes the performance.

What are the performance numbers in terms of % you saw when deferral is disabled, if it's ok to share? Was it from Instr. PGO or Sample FDO? Asking because the new switch seems to cover both.

kazu added a comment.Thu, Jun 4, 11:12 PM

Experiments show that inline deferral past pre-inlining slightly pessimizes the performance.

What are the performance numbers in terms of % you saw when deferral is disabled, if it's ok to share? Was it from Instr. PGO or Sample FDO? Asking because the new switch seems to cover both.

I am seeing 0.2% to 0.3% improvement in one of our internal benchmarks. Please see https://reviews.llvm.org/D81216 for more numbers. My experiment is from Instrumentation-based PGO.