llvm-project/llvm/test/Transforms
Wei Mi 14756b70ee [SampleFDO] Don't mix up the existing indirect call value profile with the new
value profile annotated after inlining.

In https://reviews.llvm.org/D96806 and https://reviews.llvm.org/D97350, we
use the magic number -1 in the value profile to avoid repeated indirect call
promotion to the same target for an indirect call. Function updateIDTMetaData
is used to mark an target as being promoted in the value profile with the
magic number. updateIDTMetaData is also used to update the value profile
when an indirect call is inlined and new inline instance profile should be
applied. For the second case, currently updateIDTMetaData mixes up the
existing value profile of the indirect call with the new profile, leading
to the problematic senario that a target count is larger than the total count
in the value profile.

The patch fixes the problem. When updateIDTMetaData is used to update the
value profile after inlining, all the values in the existing value profile
will be dropped except the values with the magic number counts.

Differential Revision: https://reviews.llvm.org/D98835
2021-03-18 09:54:34 -07:00
..
ADCE [DCE] Don't remove non-willreturn calls 2021-02-19 12:35:40 +01:00
AddDiscriminators
AggressiveInstCombine [AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to generic funnel shifts (REAPPLIED) 2020-12-21 15:22:27 +00:00
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion] Copy additional metadata for loads. 2021-03-14 21:28:14 +00:00
AtomicExpand AMDGPU: Add support for amdgpu-unsafe-fp-atomics attribute 2021-02-04 08:09:34 -05:00
Attributor [Attributor] Derive `willreturn` based on `mustprogress` 2021-03-11 23:31:44 -06:00
BDCE [DCE] Don't remove non-willreturn calls 2021-02-19 12:35:40 +01:00
BlockExtractor
BranchFolding
CallSiteSplitting [SimplifyCFG] Teach simplifyUnreachable() to preserve DomTree 2020-12-18 00:37:22 +03:00
CalledValuePropagation
CanonicalizeAliases [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
CanonicalizeFreezeInLoops
CodeExtractor [HotColdSplit] Reflect full cost of parameters in split penalty 2020-12-18 17:06:17 -08:00
CodeGenPrepare [test] Fix new CodeGenPrepare test for non-X86 systems 2021-03-05 11:48:38 +01:00
ConstantHoisting [ConstantHoisting] Fix bug where constant materialization could insert into EH pad 2021-02-01 11:23:56 -08:00
ConstantMerge
ConstraintElimination [ConstraintElimination] Use unsigned > 0 instead of != 0. 2021-02-22 17:54:36 +00:00
Coroutines [coro async] Transfer the original function's attributes to the clone 2021-03-09 17:01:41 -08:00
CorrelatedValuePropagation [CVP] Remove -cvp-dont-add-nowrap-flags option 2021-03-07 18:19:31 +01:00
CrossDSOCFI
DCE [Tests] Add willreturn to libcalls in some tests 2021-01-22 21:47:35 +01:00
DeadArgElim [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
DeadStoreElimination [DSE] Extending isOverwrite to support offsetted fully overlapping stores 2021-03-10 21:09:33 +01:00
DivRemPairs
EarlyCSE [gvn] CSE gc.relocates based on meaning, not spelling (try 2) 2021-03-16 10:59:31 -07:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FuncAttrs] Add tests for willreturn callsite inference. 2021-02-18 11:41:42 +00:00
FunctionImport
GCOVProfiling Encode alignment attribute for `atomicrmw` 2021-02-11 15:17:37 -05:00
GVN Revert "[ConstantFold] Handle vectors in ConstantFoldLoadThroughBitcast()" 2021-03-16 14:36:21 -07:00
GVNHoist [ValueTracking] Don't assume readonly function will return 2021-01-24 10:40:21 +01:00
GVNSink [AssumptionCache] Do not track llvm.assume calls (PR49043) 2021-02-06 12:18:30 -06:00
GlobalDCE [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
GlobalMerge
GlobalOpt Fix for Bug 48055. 2020-12-04 11:05:01 -08:00
GlobalSplit
GuardWidening
HardwareLoops [ARM] Improve WLS lowering 2021-03-11 17:56:19 +00:00
HelloNew
HotColdSplit [HotColdSplit] Reflect full cost of parameters in split penalty 2020-12-18 17:06:17 -08:00
IRCE [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
IROutliner [IROutliner] Adapting to hoisted bitcasts in CodeExtractor 2021-01-13 11:10:37 -06:00
IndVarSimplify [Test] Add test with loops guarded by trivial conditions 2021-03-16 19:46:36 +07:00
IndirectBrExpand
InferAddressSpaces [NewPM] Port infer-address-spaces 2020-12-28 19:58:12 -08:00
InferFunctionAttrs [BuildLibCalls] Add noundef to allocator fns' size 2021-02-23 13:58:03 +09:00
Inline [AMDGPU] Fix -amdgpu-inline-arg-alloca-cost 2021-03-12 10:19:50 -08:00
InstCombine [InstCombine] Avoid Bitcast-GEP fusion for pointers directly from allocation functions 2021-03-16 17:05:44 -04:00
InstMerge OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
InstNamer
InstSimplify [InstSimplify] Restrict a GEP transform to avoid provenance changes 2021-03-16 18:53:05 +02:00
InterleavedAccess [CodeGen] Update transformations to use poison for shufflevector/insertelem's initial vector elem 2021-01-10 18:03:51 +09:00
Internalize
JumpThreading [BasicAA] Drop dependency on Loop Info. PR43276 2021-03-17 11:43:44 +07:00
LCSSA [DebugInfo] Avoid re-ordering assignments in LCSSA 2020-12-17 16:17:32 +00:00
LICM [LICM] Fix a crash when sinking instructions w/token operands 2021-03-17 11:18:46 -07:00
LoadStoreVectorizer Precommit transform tests that have poison as insertelement's placeholder 2020-12-24 11:46:17 +09:00
LoopDataPrefetch
LoopDeletion [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00
LoopDistribute [LoopDistribute] Add tests with uncomputable BTCs. 2021-01-01 13:57:03 +00:00
LoopFlatten [test] Fix widen-iv.ll under NPM 2020-12-07 19:34:31 -08:00
LoopFusion [test] Fix LoopFusion tests under NewPM 2020-12-07 17:37:42 -08:00
LoopIdiom [Tests] Added test for memcpy loop idiom recognization 2021-01-13 14:55:46 +01:00
LoopInstSimplify
LoopInterchange Revert "[LoopInterchange] Replace tightly-nesting-ness check with the one from `LoopNest`" 2021-03-11 01:24:43 +08:00
LoopLoadElim [LoopLoadElim] Pass ScalarEvolution in old pass manager. PR49141 2021-02-15 18:08:23 +07:00
LoopPredication [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
LoopReroll
LoopRotate [LoopRotate] Use llvm.experimental.noalias.scope.decl for duplicating noalias metadata as needed 2021-01-24 13:53:13 +01:00
LoopSimplify Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
LoopSimplifyCFG
LoopStrengthReduce Reland [SCEV] Improve modelling for (null) pointer constants 2021-03-13 16:05:34 +03:00
LoopTransformWarning
LoopUnroll [NFC][LoopUnroll] Add `-unroll-runtime-other-exit-predictable=false` in 2021-03-07 23:51:09 +00:00
LoopUnrollAndJam LoopUnrollAndJam] Only allow loops with single exit(ing) blocks 2021-02-05 16:10:53 +00:00
LoopUnswitch [LoopUnswitch] Add shortcut if unswitched path is a no-op. 2021-02-01 09:03:30 +00:00
LoopVectorize [LoopVectorize] relax FMF constraint for FP induction 2021-03-18 08:11:22 -04:00
LoopVersioning Revert "[BasicAA] Handle two unknown sizes for GEPs" 2020-12-18 17:59:12 +00:00
LoopVersioningLICM [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics Reland "[Libcalls, Attrs] Annotate libcalls with noundef" 2021-02-20 06:18:48 +01:00
LowerSwitch
LowerTypeTests [LTT] Don't attempt to lower type tests used only by assumes 2021-02-06 09:02:10 -08:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [MemCpyOpt] Handle read from lifetime.start with offset 2021-03-13 20:38:09 +01:00
MergeFunc OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
MergeICmps [MergeICmps] Fix missing split. 2020-12-01 16:50:55 +01:00
MetaRenamer OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
NameAnonGlobals [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
NaryReassociate Revert "[NARY-REASSOCIATE] Support reassociation of min/max" 2021-02-26 19:47:54 +07:00
NewGVN [Local] Treat calls that may not return as being alive. 2021-01-23 16:05:14 +00:00
ObjCARC [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
OpenMP [OpenMP] Restore backwards compatibility for libomptarget 2021-03-11 09:52:11 -05:00
PGOProfile [IndirectCallPromotion] Recommit "Don't strip ".__uniq." suffix when it strips 2021-03-12 13:48:14 -08:00
PartialInlining
PartiallyInlineLibCalls
PhaseOrdering Fix ppc build bot after 239a6181 2021-03-08 10:00:56 -08:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [FuncAttrs] Infer noreturn 2021-01-05 13:25:42 -08:00
Reassociate Revert "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" 2021-03-11 14:48:01 +00:00
Reg2Mem
RewriteStatepointsForGC [rs4gc] don't force a conflict for a canonical broadcast 2021-03-16 12:59:06 -07:00
SCCP [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
SLPVectorizer [SLP]Fix crash on extending scheduling region. 2021-03-18 06:11:08 -07:00
SROA [SROA] Regenerate test checks (NFC) 2021-03-13 22:00:00 +01:00
SafeStack OpaquePtr: Bulk update tests to use typed byval 2020-11-20 14:00:46 -05:00
SampleProfile [SampleFDO] Don't mix up the existing indirect call value profile with the new 2021-03-18 09:54:34 -07:00
ScalarizeMaskedMemIntrin Expand masked mem intrinsics correctly wrt big-endian 2021-02-11 08:59:52 +00:00
Scalarizer [Scalarizer] Use poison as insertelement's placeholder 2021-01-04 00:35:28 +09:00
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [LoopUnswitch] unswitch if cond is in select form of and/or as well 2021-03-08 01:19:43 +09:00
SimplifyCFG [SimplifyCFG] avoid sinking insts within an infinite-loop 2021-03-12 08:04:57 -05:00
Sink
SpeculateAroundPHIs
SpeculativeExecution Precommit tests that have poison as shufflevector's placeholder 2020-12-29 17:09:31 +09:00
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG [test] Pin backedge-id-bug-xfail.ll to legacy PM 2021-01-04 13:09:42 -08:00
SyntheticCountsPropagation
TailCallElim [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
ThinLTOBitcodeWriter Transforms: Clone distinct nodes in metadata mapper unless RF_ReuseAndMutateDistinctMDs 2021-02-24 12:57:52 -08:00
TypePromotion/ARM
UnifyFunctionExitNodes
UnifyLoopExits
Util Support !heapallocsite attachments in StripDebugInfo(). 2021-03-16 10:05:13 -07:00
VectorCombine Revert "[ConstantFold] Fold more operations to poison" 2021-02-04 00:24:02 +09:00
WholeProgramDevirt [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00