[PATCH] D67673: [PGO] Change hardcoded thresholds for cold/inlinehint to use summary

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 12:03:04 PDT 2019


tejohnson created this revision.
tejohnson added a reviewer: davidxl.
Herald added a project: LLVM.

The PGO counter reading will add cold and inlinehint (hot) attributes
to functions that are very cold or hot. This was using hardcoded
thresholds, instead of the profile summary cutoffs which are used in
other hot/cold detection and are more dynamic and adaptable. Switch
to using the summary-based cold/hot detection.

The hardcoded limits were causing some code that had a medium level of
hotness (per the summary) to be incorrectly marked with a cold
attribute, blocking inlining.


Repository:
  rL LLVM

https://reviews.llvm.org/D67673

Files:
  lib/ProfileData/InstrProfReader.cpp
  lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  test/Transforms/PGOProfile/Inputs/func_entry.proftext
  test/Transforms/PGOProfile/func_entry.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67673.220547.patch
Type: text/x-patch
Size: 7408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190917/c6afae6e/attachment.bin>


More information about the llvm-commits mailing list