hanchenye-llvm-project/llvm/test/Transforms/Inline
David Green ba9f245b0d [Inliner] Penalise inlining of calls with loops at Oz
We currently seem to underestimate the size of functions with loops in them,
both in terms of absolute code size and in the difficulties of dealing with
such code. (Calls, for example, can be tail merged to further reduce
codesize). At -Oz, we can then increase code size by inlining small loops
multiple times.

This attempts to penalise functions with loops at -Oz by adding a CallPenalty
for each top level loop in the function. It uses LI (and hence DT) to calculate
the number of loops. As we are dealing with minsize, the inline threshold is
small and functions at this point should be relatively small, making the
construction of these cheap.

Differential Revision: https://reviews.llvm.org/D52716

llvm-svn: 346134
2018-11-05 14:54:34 +00:00
..
AArch64 [InlineCost] Find more free binary operations 2017-12-22 17:09:09 +00:00
AMDGPU AMDGPU: Use a custom areInlineCompatible 2017-08-07 17:08:44 +00:00
ARM [Inliner] Penalise inlining of calls with loops at Oz 2018-11-05 14:54:34 +00:00
PowerPC [TTI] Refine the cost of EXT in getUserCost() 2017-07-15 02:12:16 +00:00
X86 [TTI] Refine the cost of EXT in getUserCost() 2017-07-15 02:12:16 +00: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
PR4909.ll
align.ll
alloca-bonus.ll
alloca-dbgdeclare-merge.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
alloca-dbgdeclare.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
alloca-in-scc.ll
alloca-merge-align.ll
alloca_test.ll
always-inline.ll Revert "CallGraphSCCPass: iterate over all functions." 2018-07-13 16:32:31 +00:00
arg-attr-propagation.ll
array-alloca.ll
array_merge.ll
attributes.ll [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative 2018-09-04 12:38:00 +00:00
basictest.ll
bfi-update.ll
blockaddress.ll
byval-tail-call.ll [TailCallElim] Enable marking of calls with byval as tails 2018-10-08 18:03:40 +00:00
byval.ll Avoid inlining if there is byval arguments with non-alloca address space 2018-01-10 13:01:18 +00:00
byval_lifetime.ll
callgraph-update.ll
casts.ll
cfg_preserve_test.ll
cgscc-cycle.ll [PM] keeping history when original SCC split and then merge into itself 2018-10-23 23:29:45 +00:00
cgscc-incremental-invalidate.ll [New PM] Introducing PassInstrumentation framework 2018-09-20 17:08:45 +00:00
cgscc-invalidate.ll
cgscc-update.ll [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
clear-analyses.ll
comdat-ipo.ll
crash-lifetime-marker.ll
crash.ll
crash2.ll
debug-info-duplicate-calls.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
debug-invoke.ll
delete-call.ll
deopt-bundles.ll
deoptimize-intrinsic-cconv.ll
deoptimize-intrinsic.ll NFC - Various typo fixes in tests 2018-07-04 13:28:39 +00:00
devirtualize-2.ll
devirtualize-3.ll
devirtualize.ll
dynamic_alloca_test.ll
ephemeral.ll
externally_available.ll
frameescape.ll
function-count-update-2.ll
function-count-update-3.ll
function-count-update.ll
guard-intrinsic.ll
gvn-inline-iteration.ll
ignore-debug-info.ll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
inalloca-not-static.ll
infinite-loop-two-predecessors.ll [CloneFunction] Constant fold terminators before checking single predecessor 2018-08-28 12:40:11 +00:00
inline-assume.ll
inline-brunch-funnel.ll Don't inline @llvm.icall.branch.funnel 2018-04-04 21:46:27 +00:00
inline-byval-bonus.ll
inline-cold-callee.ll
inline-cold-callsite-pgo.ll
inline-cold-callsite-samplepgo.ll Move accurate-sample-profile into the function attribute. 2017-08-24 21:37:04 +00:00
inline-cold-callsite.ll
inline-cold.ll
inline-constexpr-addrspacecast-argument.ll
inline-fast-math-flags.ll
inline-funclets.ll
inline-hot-callee.ll
inline-hot-callsite-2.ll
inline-hot-callsite.ll
inline-indirect.ll
inline-invoke-tail.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
inline-invoke-with-asm-call.ll
inline-optnone.ll
inline-optsize.ll
inline-probe-stack.ll
inline-remark.ll [Inliner] Attribute callsites with inline remarks 2018-08-28 15:27:25 +00:00
inline-stack-probe-size.ll
inline-tail.ll Treat inlining a notail call as a regular, non-tail call 2018-04-02 21:23:16 +00:00
inline-threshold.ll
inline-varargs.ll [inline Cost] Don't mark functions accessing varargs as non-inlinable 2018-09-20 18:39:34 +00:00
inline-vla.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
inline_cleanup.ll
inline_constprop.ll
inline_dbg_declare.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
inline_dce.ll
inline_inv_group.ll ConstantFolding: Avoid a crash. 2018-07-23 21:20:00 +00:00
inline_invoke.ll
inline_minisize.ll
inline_prune.ll
inline_returns_twice.ll
inline_ssp.ll
inline_stats.ll [ThinLTO] Port InlinerFunctionImportStats handling to new PM 2018-06-28 20:07:47 +00:00
inline_unreachable-2.ll
inline_unreachable.ll
internal-scc-members.ll
invoke-cleanup.ll
invoke-combine-clauses.ll
invoke-cost.ll
invoke_test-1.ll
invoke_test-2.ll
invoke_test-3.ll
label-annotation.ll Add llvm.codeview.annotation to implement MSVC __annotation 2017-09-05 20:14:58 +00:00
last-call-bonus.ll [PM] Split LoopUnrollPass and make partial unroller a function pass 2017-08-02 20:35:29 +00:00
last-call-no-bonus.ll [PM] Split LoopUnrollPass and make partial unroller a function pass 2017-08-02 20:35:29 +00:00
last-callsite.ll [NFC] fix trivial typos in comments and documents 2018-01-29 05:17:03 +00:00
launder.invariant.group.ll Set cost of invariant group intrinsics to 0 2018-09-07 22:29:48 +00:00
lifetime-no-datalayout.ll
lifetime.ll
local-as-metadata-undominated-use.ll Remove the obsolete offset parameter from @llvm.dbg.value 2017-07-28 20:21:02 +00:00
monster_scc.ll [PM] keeping history when original SCC split and then merge into itself 2018-10-23 23:29:45 +00:00
nested-inline.ll
noalias-calls.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
noalias-cs.ll
noalias.ll
noalias2.ll
noinline-recursive-fn.ll
noinline.ll
nonnull.ll
null-function.ll
optimization-remarks-hotness-threshold.ll Enrich inline messages 2018-08-05 14:53:08 +00:00
optimization-remarks-passed-yaml.ll Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
optimization-remarks-with-hotness.ll Enrich inline messages 2018-08-05 14:53:08 +00:00
optimization-remarks-yaml.ll Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
optimization-remarks.ll Enrich inline messages 2018-08-05 14:53:08 +00:00
parallel-loop-md.ll
partial-inline-act.ll
pr21206.ll
pr22285.ll
pr26698.ll [InlineCost] Refactor the checks for different analyses to be a bit more 2017-08-14 21:25:00 +00:00
pr28298.ll
pr33637.ll
prof-update-instr.ll
prof-update-sample.ll
profile-meta.ll
ptr-diff.ll Teach InlineCost about address spaces 2018-01-04 18:23:40 +00:00
recursive.ll [Inliner] Fix a nasty bug when inlining a non-recursive trace of 2017-08-19 06:56:11 +00:00
redundant-loads.ll [InlineCost] Skip volatile loads when looking for repeated loads 2017-12-19 13:42:58 +00:00
store-sroa.ll
switch.ll
vector-bonus.ll
vector-no-bonus.ll [Inliner] Do not apply any bonus for cold callsites. 2017-07-28 21:47:36 +00:00
zero-cost.ll