mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
8c3d7a1d09
This change added a new inline advisor that takes optimization remarks from previous inlining as input, and provides the decision as advice so current inlining can replay inline decisions of a different compilation. Dwarf inline stack with line and discriminator is used as anchor for call sites including call context. The change can be useful for Inliner tuning as it provides a channel to allow external input for tweaking inline decisions. Existing alternatives like alwaysinline attribute is per-function, not per-callsite. Per-callsite inline intrinsic can be another solution (not yet existing), but it's intrusive to implement and also does not differentiate call context. A switch -sample-profile-inline-replay=<inline_remarks_file> is added to hook up the new inline advisor with SampleProfileLoader's inline decision for replay. Since SampleProfileLoader does top-down inlining, inline decision can be specialized for each call context, hence we should be able to replay inlining accurately. However with a bottom-up inliner like CGSCC inlining, the replay can be limited due to lack of specialization for different call context. Apart from that limitation, the new inline advisor can still be used by regular CGSCC inliner later if needed for tuning purpose. This is a resubmit of https://reviews.llvm.org/D83743 |
||
---|---|---|
.. | ||
Inputs | ||
branch.ll | ||
calls.ll | ||
cold-indirect-call.ll | ||
compressed-profile-symbol-list.ll | ||
cov-zero-samples.ll | ||
coverage-warning.ll | ||
discriminator.ll | ||
early-inline.ll | ||
entry_counts_cold.ll | ||
entry_counts_missing_dbginfo.ll | ||
entry_counts.ll | ||
flattened.ll | ||
fnptr.ll | ||
function_metadata.ll | ||
gcc-simple.ll | ||
indirect-call-gcc.ll | ||
indirect-call.ll | ||
inline-act.ll | ||
inline-callee-update.ll | ||
inline-cold-callsite-samplepgo.ll | ||
inline-cold.ll | ||
inline-combine.ll | ||
inline-coverage.ll | ||
inline-mergeprof-dup.ll | ||
inline-mergeprof.ll | ||
inline-replay.ll | ||
inline-stats.ll | ||
inline-topdown.ll | ||
inline.ll | ||
nodebug-error.ll | ||
nodebug.ll | ||
nolocinfo.ll | ||
offset.ll | ||
profile-format-compress.ll | ||
profile-format.ll | ||
profile-sample-accurate.ll | ||
propagate.ll | ||
remap.ll | ||
remarks.ll | ||
section-accurate-samplepgo.ll | ||
summary.ll | ||
syntax.ll | ||
uncompressed-profile-symbol-list.ll | ||
use-sample-profile-attr.ll | ||
warm-inline-instance.ll |