llvm-project/llvm/test/Transforms
Hongtao Yu 9641b9be9d [Inliner] Preserve !prof metadata when converting call to invoke.
When a callee function is inlined via an invoke instruction, every function call inside the callee, if not an invoke,  will be converted to an invoke after cloned to the caller body. I found that during the conversion the !prof metadata was dropped. This in turned caused a cloned indirect call not properly promoted in subsequent passes.

The particular scenario I was investigating was with AutoFDO and thinLTO. In prelink, no ICP was triggered (neither by the sample loader nor PGO ICP), no indirect call was promoted. This is because 1) the particular indirect call did not have inlined samples;  and 2) PGO ICP was intentionally disabled.  After inlining, the prof metadata was dropped. Then in postlink, PGO ICP jumped in but didn't do anything. Thus the opportunity was missed.

I'm making a simple fix to preserve !prof metadata when converting call to invoke.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D125249
2022-05-09 15:08:09 -07:00
..
ADCE
AddDiscriminators
AggressiveInstCombine [AggressiveInstCombine] Add `phi` nodes support to `TruncInstCombine` 2022-02-25 07:57:35 +03:00
AlignmentFromAssumptions
ArgumentPromotion [ArgPromotion][Attributor] Update min-legal-vector-width when do promotion 2022-05-02 14:13:05 +08:00
AtomicExpand [PowerPC] Adjust `MaxAtomicSizeInBitsSupported` on PPC64 2022-04-09 00:03:09 +00:00
Attributor [ArgPromotion][Attributor] Update min-legal-vector-width when do promotion 2022-05-02 14:13:05 +08:00
BDCE
BlockExtractor
BranchFolding
CallSiteSplitting [llvm][test] rewrite callbr to use i rather than X constraint NFC 2022-01-11 11:31:08 -08:00
CalledValuePropagation
CanonicalizeAliases
CanonicalizeFreezeInLoops
CodeExtractor Implement inlining of strictfp functions 2022-03-31 19:15:52 +07:00
CodeGenPrepare [AArch64] Async unwind - function epilogues 2022-04-12 16:50:50 +01:00
ConstantHoisting [OpaquePtr][AArch64] Use elementtype on ldxr/stxr 2022-03-14 10:09:59 -07:00
ConstantMerge [test] Use -passes syntax when specifying pipeline in some more tests 2021-11-27 09:52:55 +01:00
ConstraintElimination [ConstraintElimination] Add initial ssub.with.overflow tests. 2022-05-09 10:02:59 +01:00
Coroutines [NFC] [Pipelines] Hoist CoroCleanup as Module Pass 2022-05-05 15:15:09 +08:00
CorrelatedValuePropagation [Transforms] Enhance CorrelatedValuePropagation to handle both values of select 2022-02-23 00:11:20 +04:00
CrossDSOCFI
DCE
DFAJumpThreading [DFAJumpThreading] Determinator BB should precede switch-defining BB 2021-12-24 10:27:03 -05:00
DeadArgElim Revert "[DeadArgElim] Set unused arguments for internal functions" 2022-05-02 15:10:26 -07:00
DeadStoreElimination [test][DSE] Precommit test 2022-04-12 16:21:04 -07:00
DivRemPairs
EarlyCSE [EarlyCSE] Add tests demonstrating missed opportunitites 2022-04-26 11:58:16 -07:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp [ExpandMemCmp] Properly expand `bcmp` to an equality pattern. 2022-04-15 11:26:24 +02:00
FixIrreducible LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
Float2Int [Float2Int] Make sure dependent ranges are calculated first (PR54669) 2022-04-04 10:18:39 +02:00
ForcedFunctionAttrs
FunctionAttrs [NFCI] Fixed missing colon in CHECK directives - part 2 2022-04-03 14:42:59 +02:00
FunctionImport [Tests] Add elementtype attribute to indirect inline asm operands (NFC) 2022-01-06 14:23:51 +01:00
FunctionSpecialization [FuncSpec] Conditional jump or move depends on uninitialised value(s). 2022-04-27 07:28:25 +01:00
GCOVProfiling [gcov][test] Change some legacy PM tests to new PM and remove others 2022-04-14 19:12:14 -07:00
GVN [GVN] Encode GEPs in offset representation 2022-04-28 09:32:05 +02:00
GVNHoist [GVNHoist] drop debug location according to the debug info guide 2022-03-30 20:17:53 -07:00
GVNSink [SimplifyCFG] Thread branches on same condition in more cases (PR54980) 2022-04-29 09:44:05 +02:00
GlobalDCE [GlobalDCE] [VFE] Avoid dropping vfunc dependencies when an invalid vtable entry is present 2022-02-17 19:41:46 -08:00
GlobalMerge
GlobalOpt [GlobalOpt] Iterate over replaced values deterministically to constprop 2022-05-02 09:43:20 -07:00
GlobalSplit
GuardWidening
HardwareLoops
HelloNew
HotColdSplit
IRCE [SCEVExpander] Drop poison generating flags when reusing instructions 2021-11-29 15:23:34 -08:00
IROutliner [IROutliner] Accomodate blocks containing PHINodes with one entry outside the region and others inside the region. 2022-05-07 17:11:21 -05:00
IndVarSimplify [IndVarSimplify] Replace legacy loop-unswitch with SimpleLoopUnswitch. 2022-04-23 14:08:47 +01:00
IndirectBrExpand
InferAddressSpaces [InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair 2022-04-28 11:10:55 +08:00
InferFunctionAttrs BuildLibCalls: simplify switch statement slightly 2022-05-03 13:17:33 -04:00
Inline [Inliner] Preserve !prof metadata when converting call to invoke. 2022-05-09 15:08:09 -07:00
InstCombine [InstCombine] Add test coverage for PR43261 / Issue #42606 2022-05-08 11:10:49 +01:00
InstMerge Reland "[LICM] Hoist LOAD without sinking the STORE" 2021-12-02 03:53:50 -08:00
InstNamer
InstSimplify [ConstantFold] Use getFltSemantics instead of manually checking the type 2022-05-05 15:52:19 +02:00
InterleavedAccess
Internalize
JumpThreading [JumpThreading] Add a test for handling zero !prof branch_weights 2022-01-26 13:42:21 +07:00
LCSSA
LICM [LICM] Add test to exercise assertion from D123473. 2022-05-05 10:49:52 +01:00
LoadStoreVectorizer [AMDGPU][FIX] Proper load-store-vectorizer result with opaque pointers 2022-04-15 13:42:46 -05:00
LoopBoundSplit
LoopDataPrefetch
LoopDeletion [test][LoopDeletion] Precommit test 2022-04-15 12:40:12 -07:00
LoopDistribute Autogen a couple of predicated SCEV tests 2022-02-11 13:56:35 -08:00
LoopFlatten
LoopFusion [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
LoopIdiom [NFCI] Regenerate LoopIdiomRecognize test checks 2022-04-04 00:21:26 +02:00
LoopInstSimplify [LoopInstSimplify] Ignore users in unreachable blocks. PR55072 2022-04-25 17:35:28 +07:00
LoopInterchange [LoopInterchange] Try to achieve the most optimal access pattern after interchange 2022-04-06 15:31:56 -04:00
LoopLoadElim [NFC][LAA] Match-up type sizes for possible extensions, based on actual bit-size rather than rounded-up byte size. 2022-04-22 23:16:20 -07:00
LoopPredication [SCEVExpander] Drop poison generating flags when reusing instructions 2021-11-29 15:23:34 -08:00
LoopReroll
LoopRotate [llvm][test] rewrite callbr to use i rather than X constraint NFC 2022-01-11 11:31:08 -08:00
LoopSimplify
LoopSimplifyCFG [LoopSimplifyCFG] Check predecessors of exits before marking them dead. 2022-03-18 08:54:44 +00:00
LoopStrengthReduce [X86] Autogen a few tests for ease of update [nfc] 2022-05-03 08:28:44 -07:00
LoopTransformWarning
LoopUnroll [LoopUnroll] Always respect user unroll pragma 2022-04-11 14:33:24 -04:00
LoopUnrollAndJam [LoopUnroll] Disable loop unroll when user explicitly asks for unroll-and-jam 2021-12-15 15:58:05 +00:00
LoopVectorize [NFC][LoopVectorize] Add SVE test for tail-folding combined with interleaving 2022-05-09 13:08:25 +01:00
LoopVersioning [IRBuilder] Migrate and-folding to value-based FoldAnd. 2022-01-20 10:22:21 +00:00
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics [builtin_object_size] Basic support for posix_memalign 2022-04-08 09:31:11 +02:00
LowerExpectIntrinsic
LowerGlobalDestructors Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO" 2022-03-23 18:36:55 -07:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes" 2022-03-25 09:36:50 -05:00
LowerSwitch LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
LowerTypeTests [llvm][IR] Add no_cfi constant 2021-12-20 12:55:32 -08:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg [Mem2Reg] Check that load type matches alloca type 2022-02-08 17:16:15 +01:00
MemCpyOpt [MemCpyOpt] Work around PR54682 2022-04-04 10:19:51 +02:00
MergeFunc
MergeICmps Reapply [MergeICmps] Don't require GEP 2022-03-04 11:39:11 +01:00
MetaRenamer [TLI] Check that malloc argument has type size_t 2022-03-14 17:22:24 +01:00
NameAnonGlobals
NaryReassociate
NewGVN [GVN][NewGVN] Regenerate no_speculative_loads_with_asan.ll tests 2022-04-27 10:45:39 +01:00
ObjCARC Reapply "[Intrinsics] Add `nocallback` to the default intrinsic attributes" 2022-03-25 09:36:50 -05:00
OpenMP [Attributor] CGSCC pass should not recompute results outside the SCC (reapply) 2022-04-17 12:48:49 -05:00
PGOProfile [CHR] Skip region containing llvm.coro.id 2022-04-27 10:27:25 -07:00
PartialInlining
PartiallyInlineLibCalls [PartiallyInlineLibCalls] Don't partially inline a musttail libcall. 2022-04-05 22:30:50 +03:00
PhaseOrdering [SLP]Improve reductions analysis and emission, part 1. 2022-05-02 12:03:58 -07:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate Split fast-basictest.ll according to passes responsible for optimizations 2022-02-04 12:20:10 +03:00
Reg2Mem
RelLookupTableConverter/X86 [RelLookupTableConverter] Ensure that GV, GEP and load types match 2022-02-17 12:05:05 +01:00
RewriteStatepointsForGC [RS4GC] Add support for 'freeze' instruction to findBaseDefiningValue 2022-05-06 20:46:29 +07:00
SCCP [CompileTime] [Passes] Avoid computing unnecessary analyses. NFC 2022-04-29 10:00:06 -04:00
SLPVectorizer Revert "[SLP]Further improvement of the cost model for scalars used in buildvectors." 2022-05-09 13:46:06 -07:00
SROA [NFC] Rename Instrinsic to Intrinsic 2022-04-25 18:13:23 +01:00
SafeStack [safestack] Support safestack in stack size diagnostics 2022-04-20 18:29:40 +00:00
SampleProfile [NFCI] Fixed missing colon in CHECK directives 2022-04-03 11:52:38 +02:00
ScalarizeMaskedMemIntrin
Scalarizer [LV][SLP] Mark fptosi_sat as vectorizable 2022-05-03 09:32:34 +01:00
SeparateConstOffsetFromGEP [CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC. 2022-02-18 16:10:56 +00:00
SimpleLoopUnswitch Recommit "[SimpleLoopUnswitch] Collect either logical ANDs/ORs but not both." 2022-05-09 13:49:12 +01:00
SimplifyCFG [SimplifyCFG] Avoid shifting by a too large exponent. 2022-04-29 15:19:06 +01:00
Sink [Sink] Don't sink non-willreturn calls (PR51188) 2022-04-07 16:35:05 +02:00
SpeculativeExecution
StraightLineStrengthReduce [CodeGen] Remove unneeded regex escaping in FileCheck patterns. NFC. 2022-02-18 16:10:56 +00:00
StripDeadPrototypes
StripSymbols
StructurizeCFG LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
SyntheticCountsPropagation
TailCallElim [IR] Define "ptrauth" operand bundle. 2022-02-14 11:27:35 -08:00
ThinLTOBitcodeWriter [ThinLTO][MC] Use conditional assignments for promotion aliases 2021-12-10 12:21:37 -08:00
TypePromotion [NFC] TypePromotion test 2022-03-03 11:47:37 +00:00
UnifyFunctionExitNodes
UnifyLoopExits LowerSwitch: Avoid inserting NewDefault block 2022-04-14 13:30:56 +08:00
Util [Debugify] Limit number of processed functions for original mode 2022-04-21 13:58:17 +02:00
VectorCombine [VectorCombine] Attempt to fold select shuffles from reductions 2022-05-08 10:32:41 +01:00
WholeProgramDevirt [WPD] Add statistics 2022-04-05 18:48:23 -07:00