[PATCH] D41395: [PGO] Function section hotness prefix should look at all blocks

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 07:24:52 PST 2017


tejohnson created this revision.
tejohnson added a reviewer: davidxl.
Herald added a subscriber: eraman.

The function section prefix for PGO based layout (e.g. hot/unlikely)
should look at the hotness of all blocks not just the entry BB.
A function with a cold entry but a very hot loop should be placed in the
hot section, for example, so that it is located close to other hot
functions it may call. For SamplePGO it was already looking at the
branch weights on calls, and I made that code conditional on whether
this is SamplePGO since it was essentially a noop for instrumentation
PGO anyway.


https://reviews.llvm.org/D41395

Files:
  include/llvm/Analysis/ProfileSummaryInfo.h
  lib/Analysis/ProfileSummaryInfo.cpp
  lib/CodeGen/CodeGenPrepare.cpp
  test/Transforms/CodeGenPrepare/section.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41395.127527.patch
Type: text/x-patch
Size: 8664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171219/3ab89e9c/attachment.bin>


More information about the llvm-commits mailing list