HomePhabricator

Improve PGO support for the new inliner

Description

Improve PGO support for the new inliner

This adds the following to the new PM based inliner in PGO mode:

  • Use block frequency analysis to derive callsite's profile count and use

that to adjust thresholds of hot and cold callsites.

  • Incrementally update the BFI of the caller after a callee gets inlined

into it. This incremental update is only within an invocation of the run
method - BFI is not preserved across calls to run.
Update the function entry count of the callee after inlining it into a
caller.

  • I've tuned the thresholds for the hot and cold callsites using a hacked

up version of the old inliner that explicitly computes BFI on a set of
internal benchmarks and spec. Once the new PM based pipeline stabilizes
(IIRC Chandler mentioned there are known issues) I'll benchmark this
again and adjust the thresholds if required.
Inliner PGO support.

Differential revision: https://reviews.llvm.org/D28331

Details

Committed
eramanJan 20 2017, 2:44 PM
Differential Revision
D28331: Improve PGO support for the new inliner
Parents
rL292665: [pdb] Write the Named Stream mapping to Yaml and binary.
Branches
Unknown
Tags
Unknown