1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/Inline
Philipp Krones d7917544a3 [Inliner] Make the CallPenalty configurable
Tests with multiple benchmarks, like Embench [1], showed that the
CallPenalty magic number has the most influence on inlining decisions
when optimizing for size.

On the other hand, there was no good default value for this parameter.
Some benchmarks profited strongly from a reduced call penalty. On
example is the picojpeg benchmark compiled for RISC-V, which got 6%
smaller with a CallPenalty of 10 instead of 12. Other benchmarks
increased in size, like matmult.

This commit makes the compromise of turning the magic number constant of
CallPenalty into a configurable value. This introduces the flag
`--inline-call-penalty`. With that flag users can fine tune the inliner
to their needs.

The CallPenalty constant was also used for loops. This commit replaces
the CallPenalty constant with a new LoopPenalty constant that is now
used instead.

This is a slimmed down version of https://reviews.llvm.org/D30899

[1]: https://github.com/embench/embench-iot

Differential Revision: https://reviews.llvm.org/D105976
2021-07-26 12:07:49 +01:00
..
AArch64
AMDGPU [AMDGPU] Fix -amdgpu-inline-arg-alloca-cost 2021-03-12 10:19:50 -08:00
ARM
Inputs
ML [MLGO] Use binary protobufs for improved training performance. 2021-07-19 13:59:28 -07:00
PowerPC
WebAssembly
X86 [InlineCost] CallAnalyzer: use TTI info for extractvalue - they are free (PR50099) 2021-04-30 13:55:11 +03:00
2003-09-14-InlineValue.ll
2003-09-22-PHINodeInlineFail.ll
2003-09-22-PHINodesInExceptionDest.ll
2003-09-22-PHINodesInNormalInvokeDest.ll
2003-10-13-AllocaDominanceProblem.ll
2004-04-15-InlineDeletesCall.ll
2004-04-20-InlineLinkOnce.ll
2004-10-17-InlineFunctionWithoutReturn.ll
2006-01-14-CallGraphUpdate.ll
2006-07-12-InlinePruneCGUpdate.ll
2006-11-09-InlineCGUpdate-2.ll
2006-11-09-InlineCGUpdate.ll
2007-04-15-InlineEH.ll
2007-06-25-WeakInline.ll
2007-12-19-InlineNoUnwind.ll
2008-09-02-NoInline.ll
2009-01-08-NoInlineDynamicAlloca.ll
2009-01-13-RecursiveInlineCrash.ll
2009-05-07-CallUsingSelfCrash.ll
2010-05-12-ValueMap.ll
align.ll
alloca_test.ll
alloca-bonus.ll
alloca-dbgdeclare-merge.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
alloca-dbgdeclare.ll
alloca-in-scc.ll
alloca-merge-align.ll
always-inline-attr.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
always-inline.ll
arg-attr-propagation.ll
array_merge.ll
array-alloca.ll
attributes.ll
basictest.ll
bfi-update.ll
blockaddress.ll
byref-align.ll
byval_lifetime.ll
byval-align.ll
byval-tail-call.ll
byval.ll
callbr.ll
callgraph-update.ll
casts.ll
cfg_preserve_test.ll
cgscc-cycle-debug.ll
cgscc-cycle.ll
cgscc-incremental-invalidate.ll Revert "[NewPM] Only invalidate modified functions' analyses in CGSCC passes" 2021-05-21 16:38:03 -07:00
cgscc-inline-replay.ll
cgscc-invalidate.ll
cgscc-update.ll [funcattrs] Add the maximal set of implied attributes to definitions 2021-04-16 14:22:19 -07:00
clear-analyses.ll [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
comdat-ipo.ll
crash2.ll
crash-lifetime-marker.ll
crash.ll
dead-calls-willreturn.ll
debug-info-duplicate-calls.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
debug-invoke.ll
debuginline-cost-delta.ll
delete-call.ll
deleted-scc.ll [NewPM][Inliner] Check if deleted function is in current SCC 2021-07-21 08:47:45 -07:00
deopt-bundles.ll
deoptimize-intrinsic-attrs.ll [Inliner] Copy attributes when deoptimize intrinsic is inlined 2021-05-18 10:08:37 +07:00
deoptimize-intrinsic-cconv.ll
deoptimize-intrinsic.ll
devirtualize-2.ll
devirtualize-3.ll
devirtualize-4.ll
devirtualize-5.ll
devirtualize-6.ll
devirtualize.ll
dynamic_alloca_test.ll
dynamic-alloca-simplified-large.ll
ephemeral.ll Require asserts for test that uses debug flag 2021-04-23 15:23:47 -07:00
externally_available.ll
frameescape.ll
function-count-update-2.ll
function-count-update-3.ll
function-count-update.ll
gep_from_constant.ll
guard-intrinsic.ll
gvn-inline-iteration.ll
ignore-debug-info.ll
inalloca-not-static.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
infinite-loop-two-predecessors.ll
inline_call.ll [llvm][Inliner] Add an optional PriorityInlineOrder 2021-06-19 10:17:32 +08:00
inline_cleanup.ll
inline_constprop.ll
inline_dbg_declare.ll
inline_dce.ll
inline_inv_group.ll
inline_invoke.ll [llvm][Inliner] Add an optional PriorityInlineOrder 2021-06-19 10:17:32 +08:00
inline_minisize.ll
inline_negative_result.ll
inline_noprofile.ll [Inline] prevent inlining on noprofile mismatch 2021-06-29 10:32:03 -07:00
inline_nossp.ll [Test] delete LPM RUNs in inline_nossp.ll 2021-06-29 17:09:42 -07:00
inline_prune.ll
inline_returns_twice.ll
inline_ssp.ll
inline_stats.ll
inline_unreachable-2.ll
inline_unreachable.ll
inline-assume.ll
inline-brunch-funnel.ll
inline-byval-bonus.ll
inline-call-penalty-option.ll [Inliner] Make the CallPenalty configurable 2021-07-26 12:07:49 +01:00
inline-cold-callee.ll
inline-cold-callsite-pgo.ll
inline-cold-callsite.ll
inline-cold.ll
inline-constexpr-addrspacecast-argument.ll
inline-cost-annotation-pass.ll
inline-fast-math-flags.ll
inline-funclets.ll
inline-hot-callee.ll
inline-hot-callsite-2.ll
inline-hot-callsite.ll
inline-incompat-attrs.ll
inline-indirect-chain.ll
inline-indirect.ll
inline-invoke-tail.ll
inline-invoke-with-asm-call.ll
inline-min-legal-vector-width.ll
inline-no-builtin-compatible.ll
inline-optnone.ll
inline-optsize.ll
inline-probe-stack.ll
inline-ptrtoint-different-sizes.ll
inline-remark.ll
inline-retainRV-call.ll [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
inline-scalable.ll
inline-semantic-interposition.ll
inline-skip-use-empty-alloca.ll
inline-stack-probe-size.ll
inline-tail.ll
inline-threshold.ll
inline-varargs.ll
inline-vla.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
inlined-loop-metadata-inseltpoison.ll
inlined-loop-metadata.ll
inlined-mustprogress-loop-metadata.ll
inlinedefault-threshold.ll
inlining-advisor-default.ll
internal-scc-members.ll
invariant-group-sroa.ll [Inliner] Propagate SROA analysis through invariant group intrinsics 2021-04-12 10:54:22 -07:00
invoke_test-1.ll
invoke_test-2.ll
invoke_test-3.ll
invoke-cleanup.ll
invoke-combine-clauses.ll
invoke-cost.ll
label-annotation.ll
last-call-bonus.ll
last-call-no-bonus.ll
last-callsite.ll [llvm][Inliner] Add an optional PriorityInlineOrder 2021-06-19 10:17:32 +08:00
launder.invariant.group.ll
lifetime-no-datalayout.ll
lifetime.ll
local-as-metadata-undominated-use.ll
module-inlining.ll
monster_scc.ll [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
nested-inline.ll
no-inline-line-tables.ll
no-unwind-inline-asm.ll Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
noalias2.ll [Inline] Don't add noalias metadata to inaccessiblememonly calls 2021-04-17 14:56:13 +02:00
noalias3.ll
noalias-calls2.ll [Inline] Don't add noalias metadata to inaccessiblememonly calls 2021-04-17 14:56:13 +02:00
noalias-calls-always.ll
noalias-calls.ll
noalias-cs.ll
noalias.ll
noinline-recursive-fn.ll
noinline.ll
nonnull.ll
null-function.ll [PM] Show the pass argument in pre/post-pass IR dumps 2021-02-25 14:02:00 -08:00
optimization-remarks-hotness-threshold.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
optimization-remarks-passed-yaml.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
optimization-remarks-with-hotness.ll
optimization-remarks-yaml.ll
optimization-remarks.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
parallel-loop-md-callee.ll
parallel-loop-md-merge.ll
parallel-loop-md.ll
partial-inline-act.ll
partial-inline-incompat-attrs.ll
pr21206.ll
pr22285.ll
pr26698.ll
pr28298.ll
pr33637.ll
pr46945.ll
pr48209.ll
pr50270.ll [Inliner] Fix noalias metadata handling for instructions simplified during cloning (PR50270) 2021-05-10 21:59:59 +02:00
pr50589.ll [Inline] Fix noalias addition on simplified instructions (PR50589) 2021-07-20 19:52:41 +02:00
PR4909.ll
prof-update-instr.ll
prof-update-sample-alwaysinline.ll
prof-update-sample.ll
profile-meta.ll
ptr-diff.ll
recursive.ll
redundant-loads.ll
ret_attr_update.ll
simplified_to.ll
store-sroa.ll
switch.ll
unwind-inline-asm.ll Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
vector-bonus.ll
vector-no-bonus.ll
zero-cost.ll