[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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8664 bytes
Desc: not available
More information about the llvm-commits