mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
d08de97276
This adds two thresholds to the sample profiler to affect inlining decisions: the concept of global hotness and coldness. Functions that have accumulated more than a certain fraction of samples at runtime, are annotated with the InlineHint attribute. Conversely, functions that accumulate less than a certain fraction of samples, are annotated with the Cold attribute. This is very similar to the hints emitted by Clang when using instrumentation profiles. Notice that this is a very blunt instrument. A function may have globally collected a significant fraction of samples, but that does not necessarily mean that every callsite for that function is hot. Ideally, we would annotate each callsite with the samples collected at that callsite. This way, the inliner can incorporate all these weights into its cost model. Once the inliner offers this functionality, we can change the hints emitted here to a more precise per-callsite annotation. For now, this is providing some measure of speedups with our internal benchmarks. I've observed speedups of up to 23% (though the geo mean is about 3%). I expect these numbers to improve as the inliner gets better annotations. llvm-svn: 254212 |
||
---|---|---|
.. | ||
Inputs | ||
branch.ll | ||
calls.ll | ||
cov-zero-samples.ll | ||
coverage-warning.ll | ||
discriminator.ll | ||
entry_counts.ll | ||
fnptr.ll | ||
gcc-simple.ll | ||
inline-coverage.ll | ||
inline-hint.ll | ||
inline.ll | ||
nolocinfo.ll | ||
offset.ll | ||
propagate.ll | ||
remarks.ll | ||
syntax.ll |