llvm-project/llvm/test/Transforms
Diego Novillo 84f06cc835 SamplePGO - Add initial support for inliner annotations.
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
2015-11-27 23:14:51 +00:00
..
ADCE [PM] Port ADCE to the new pass manager 2015-10-30 23:13:18 +00:00
AddDiscriminators Reimplement discriminator assignment algorithm. 2015-11-19 19:53:05 +00:00
AlignmentFromAssumptions Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
ArgumentPromotion DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
AtomicExpand [ARM] Emit clrex in the expanded cmpxchg fail block. 2015-09-22 17:22:58 +00:00
BBVectorize Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
BDCE Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BranchFolding Make the default triple optional by allowing an empty string 2015-09-16 05:34:32 +00:00
CodeExtractor Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
CodeGenPrepare [WinEH] Fix problem where CodeGenPrepare incorrectly sinks a bitcast into an EH pad. 2015-11-23 19:16:15 +00:00
ConstProp [test] (NFC) Simplify Transforms/ConstProp/calls.ll 2015-08-28 18:04:20 +00:00
ConstantHoisting [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
ConstantMerge [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
CorrelatedValuePropagation Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
DeadArgElim DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
DeadStoreElimination Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
EarlyCSE [EarlyCSE] Fix handling of target memory intrinsics for CSE'ing loads. 2015-10-07 07:41:29 +00:00
EliminateAvailableExternally Don't change the visibility when converting a definition to a declaration. 2015-07-13 14:18:22 +00:00
Float2Int Reapply r233175 and r233183: float2int. 2015-03-27 10:36:57 +00:00
FunctionAttrs [FunctionAttrs] Provide a mechanism for adding function attributes from the command line 2015-11-19 08:49:57 +00:00
FunctionImport Disallow aliases to available_externally. 2015-11-26 19:22:59 +00:00
GCOVProfiling DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
GVN [WinEH] Fix a case where GVN could incorrectly PRE a load into an EH pad. 2015-11-23 19:51:41 +00:00
GlobalDCE [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
GlobalOpt [GlobalOpt] Localize some globals that have non-instruction users 2015-11-19 18:04:33 +00:00
IPConstantProp Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
IRCE [IRCE] Fix a regression introduced in r232444. 2015-03-24 19:29:18 +00:00
IndVarSimplify ScalarEvolution: do not set nuw when creating exprs of form <expr> + <all-ones>. 2015-11-20 01:26:13 +00:00
Inline Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
InstCombine [SimplifyLibCalls] Don't depend on a called function having a name, it might be an indirect call. 2015-11-26 09:51:17 +00:00
InstMerge [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
InstSimplify [ValueTracking] Teach isImpliedCondition a new bitwise trick 2015-11-10 23:56:20 +00:00
Internalize [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
JumpThreading [JumpThreading] Use dominating conditions to prove implications 2015-10-28 21:27:08 +00:00
LCSSA Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LICM Revert "Revert "Strip metadata when speculatively hoisting instructions (r252604)" 2015-11-18 14:50:18 +00:00
LoadCombine [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopDeletion [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LoopDistribute Allow LLE/LD and the loop versioning infrastructure to use SCEV predicates 2015-11-09 13:26:09 +00:00
LoopIdiom Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
LoopInterchange Add support to interchange loops with reductions. 2015-04-23 04:51:44 +00:00
LoopLoadElim Allow LLE/LD and the loop versioning infrastructure to use SCEV predicates 2015-11-09 13:26:09 +00:00
LoopReroll DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
LoopRotate DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
LoopSimplify DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
LoopStrengthReduce [LoopStrengthReduce] Don't increment iterator past the end of the BB 2015-11-16 17:37:58 +00:00
LoopUnroll Don't recompute LCSSA after loop-unrolling when possible. 2015-11-14 05:51:41 +00:00
LoopUnswitch Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
LoopVectorize [LoopVectorize] Use MapVector rather than DenseMap for MinBWs. 2015-11-26 20:39:51 +00:00
LowerAtomic [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
LowerBitSets [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
LowerExpectIntrinsic [PM] Port StripDeadPrototypes to the new pass manager 2015-10-30 23:28:12 +00:00
LowerInvoke Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LowerSwitch Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
Mem2Reg DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
MemCpyOpt Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
MergeFunc Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
MetaRenamer Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
NaryReassociate [NaryReassociate] SeenExprs records WeakVH 2015-10-01 03:51:44 +00:00
ObjCARC Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
PartiallyInlineLibCalls
PhaseOrdering Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
PlaceSafepoints Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
PruneEH [PruneEH] A naked, noinline function can return via InlineAsm 2015-06-27 07:52:53 +00:00
Reassociate Fix another infinite loop in Reassociate caused by Constant::isZero(). 2015-11-20 22:34:48 +00:00
Reg2Mem Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
RewriteStatepointsForGC Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00
SCCP [opaque pointer type] Add textual IR support for explicit type parameter for global aliases 2015-09-11 03:22:04 +00:00
SLPVectorizer Fix SLPVectorizer commutativity reordering 2015-11-06 20:17:51 +00:00
SROA Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
SafeStack [safestack] Fix alignment of dynamic allocas. 2015-11-25 22:52:30 +00:00
SampleProfile SamplePGO - Add initial support for inliner annotations. 2015-11-27 23:14:51 +00:00
ScalarRepl Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +00:00
Scalarizer DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
SeparateConstOffsetFromGEP [SeparateConstOffsetFromGEP] sext(a)+sext(b) => sext(a+b) when a+b can't sign-overflow. 2015-08-14 02:02:05 +00:00
SimplifyCFG Revert "Revert "Strip metadata when speculatively hoisting instructions (r252604)" 2015-11-18 14:50:18 +00:00
Sink [Sink] Don't move landingpads 2015-11-16 04:47:58 +00:00
SpeculativeExecution Add a speculative execution pass 2015-05-15 17:54:48 +00:00
StraightLineStrengthReduce [SeparateConstOffsetFromGEP] strengthen the inbounds attribute 2015-08-13 18:48:49 +00:00
StripDeadPrototypes [PM] Port StripDeadPrototypes to the new pass manager 2015-10-30 23:28:12 +00:00
StripSymbols DI: Reverse direction of subprogram -> function edge. 2015-11-05 22:03:56 +00:00
StructurizeCFG Fix CHECK directives that weren't checking. 2015-08-31 21:10:35 +00:00
TailCallElim Add 'notail' marker for call instructions. 2015-11-06 23:55:38 +00:00
TailDup [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Util Have a single way for creating unique value names. 2015-11-22 00:16:24 +00:00