llvm-project/llvm/test/Transforms
Hongtao Yu ac068e014b [CSSPGO] Consume pseudo-probe-based AutoFDO profile
This change enables pseudo-probe-based sample counts to be consumed by the sample profile loader under the regular `-fprofile-sample-use` switch with minimal adjustments to the existing sample file formats. After the counts are imported, a probe helper, aka, a `PseudoProbeManager` object, is automatically launched to verify the CFG checksum of every function in the current compilation against the corresponding checksum from the profile. Mismatched checksums will cause a function profile to be slipped. A `SampleProfileProber` pass is scheduled before any of the `SampleProfileLoader` instances so that the CFG checksums as well as probe mappings are available during the profile loading time. The `PseudoProbeManager` object is set up right after the profile reading is done. In the future a CFG-based fuzzy matching could be done in `PseudoProbeManager`.

Samples will be applied only to pseudo probe instructions as well as probed callsites once the checksum verification goes through. Those instructions are processed in the same way that regular instructions would be processed in the line-number-based scenario. In other words, a function is processed in a regular way as if it was reduced to just containing pseudo probes (block probes and callsites).

**Adjustment to profile format **

A CFG checksum field is being added to the existing AutoFDO profile formats. So far only the text format and the extended binary format are supported. For the text format, a new line like
```
!CFGChecksum: 12345
```
is added to the end of the body sample lines. For the extended binary profile format, we introduce a metadata section to store the checksum map from function names to their CFG checksums.

Differential Revision: https://reviews.llvm.org/D92347
2020-12-16 15:57:18 -08:00
..
ADCE [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
AddDiscriminators
AggressiveInstCombine [TruncInstCombine] Remove scalable vector restriction 2020-12-10 18:00:19 +08:00
AlignmentFromAssumptions Reland [AssumeBundles] Use operand bundles to encode alignment assumptions 2020-09-12 15:36:06 +02:00
ArgumentPromotion [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
AtomicExpand [AArch64] Out-of-line atomics (-moutline-atomics) implementation. 2020-11-20 13:30:12 +00:00
Attributor [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
BDCE [DemandedBits][BDCE] Add support for min/max intrinsics 2020-09-10 22:13:31 +02:00
BlockExtractor [BlockExtract][NewPM] Port -extract-blocks to NPM 2020-10-21 12:51:11 -07:00
BranchFolding
CallSiteSplitting
CalledValuePropagation
CanonicalizeAliases [NPM] Move more O0 pass building into PassBuilder 2020-11-19 11:22:23 -08:00
CanonicalizeFreezeInLoops
CodeExtractor [Inline] prevent inlining on stack protector mismatch 2020-12-02 11:00:16 -08:00
CodeGenPrepare [CodeGenPrepare] Update optimizeGatherScatterInst for scalable vectors. 2020-12-15 10:57:51 +00:00
ConstantHoisting [test] Fix const-addr-no-neg-offset.ll under NPM 2020-11-13 23:29:58 -08:00
ConstantMerge
ConstraintElimination [ConstraintElimination] Bail out if system gets too big. 2020-12-06 20:19:15 +00:00
Coroutines [test] Fix coro-retcon.ll under NPM 2020-12-09 22:04:59 -08:00
CorrelatedValuePropagation [AC] Handle (X+C1)<C2 assumes (PR48408) 2020-12-13 21:00:32 +01:00
CrossDSOCFI
DCE [DCE] Always get TargetLibraryInfo 2020-11-17 20:41:05 -08:00
DeadArgElim OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
DeadStoreElimination [DSE] Precommit test case for PR48279. 2020-11-24 18:10:23 +00:00
DivRemPairs
EarlyCSE OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible [FixIrreducible][NewPM] Port -fix-irreducible to NPM 2020-10-09 09:22:09 -07:00
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FunctionAttrs][NPM] Fix handling of convergent 2020-11-23 21:09:41 -08:00
FunctionImport [CGProfile] allows bitcast in metadata node storing function pointers 2020-11-13 09:28:21 -08:00
GCOVProfiling [gcov] Add spanning tree optimization 2020-09-13 00:07:31 -07:00
GVN [NFC] Added test for PR33549 2020-12-09 03:21:52 +01:00
GVNHoist
GVNSink [GVNSink][NewPM] Add GVNSinkPass to PassRegistry.def 2020-09-22 08:24:09 -07: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 [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
HelloNew Reland [docs][NewPM] Add docs for writing NPM passes 2020-09-14 16:06:19 -07:00
HotColdSplit [CodeGen] Add text section prefix for COFF object file 2020-12-08 18:56:21 +08:00
IRCE [IRCE] Add test case for PR48051 2020-12-14 12:01:19 +00:00
IndVarSimplify [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
IndirectBrExpand
InferAddressSpaces [InferAddrSpace] Teach to handle assumed address space. 2020-11-16 17:06:33 -05:00
InferFunctionAttrs Make inferLibFuncAttributes() add SExt attribute on second arg to ldexp. 2020-11-10 18:32:15 +01:00
Inline [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
InstCombine [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
InstMerge OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
InstNamer Port -instnamer to NPM 2020-10-22 12:08:36 -07:00
InstSimplify [InstSimplify] Add tests that fold instructions with poison operands (NFC) 2020-12-02 01:01:59 +09:00
InterleavedAccess [InterleavedAccess] Remove unused check-prefixes 2020-11-09 13:12:40 +00:00
Internalize
JumpThreading Disable Jump Threading for the targets with divergent control flow 2020-12-17 02:40:54 +03:00
LCSSA
LICM [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoadStoreVectorizer [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
LoopDataPrefetch
LoopDeletion [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopDistribute [LoopVersioning] Form dedicated exits for versioned loop to preserve simplify form 2020-10-24 21:40:46 +08: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 [NFCI][SimplifyCFG] Mark all the SimplifyCFG tests that already don't invalidate DomTree as such 2020-12-17 01:03:49 +03:00
LoopInstSimplify
LoopInterchange [SimplifyCFG] MergeBlockIntoPredecessor() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopLoadElim [LoopLoadElim] Make sure all loops are in simplify form. PR48150 2020-11-26 10:51:11 +07:00
LoopPredication
LoopReroll [SCEV] Strength nowrap flags after constant folding 2020-10-25 18:00:22 +01:00
LoopRotate [test] Rewrite phi-empty.ll into a unittest 2020-12-08 09:59:31 -08:00
LoopSimplify [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopSimplifyCFG [LoopSimplifyCFG][NewPM] Rename simplify-cfg -> loop-simplifycfg 2020-09-21 08:27:19 -07:00
LoopStrengthReduce Reland [DebugInfo] Improve dbg preservation in LSR. 2020-12-14 16:15:18 +01:00
LoopTransformWarning
LoopUnroll [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopUnrollAndJam [NPM] Share pass building options with legacy PM 2020-11-23 13:04:05 -08:00
LoopUnswitch [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopVectorize [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
LoopVersioning [BasicAA] Handle two unknown sizes for GEPs 2020-12-11 18:45:53 +01:00
LoopVersioningLICM [test] Fix Transforms/LoopVersioningLICM under NPM 2020-12-07 21:54:38 -08:00
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2020-11-14 13:12:38 +03:00
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [test] Fix multiply-minimal.ll 2020-11-19 18:16:35 -08:00
LowerSwitch [LowerSwitch][NewPM] Port lowerswitch to NPM 2020-09-15 18:18:31 -07:00
LowerTypeTests [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08: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 [NARY-REASSOCIATE] Simplify traversal logic by post deleting dead instructions 2020-12-04 16:17:50 +07:00
NewGVN [MemCpyOpt] Correctly merge alias scopes during call slot optimization 2020-12-03 09:23:37 -08:00
ObjCARC [test] Pin provenance.ll to legacy PM 2020-12-07 23:08:02 -08:00
OpenMP [OpenMP] Use assumptions during ICV tracking 2020-12-15 16:51:34 -06:00
PGOProfile [PGO] Use the sum of profile counts to fix the function entry count 2020-12-16 13:37:43 -08:00
PartialInlining [PartialInliner]: Handle code regions in a switch stmt cases 2020-11-02 14:32:45 -05:00
PartiallyInlineLibCalls
PhaseOrdering [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00
PlaceSafepoints [PlaceSafepoints] Pin tests to legacy PM 2020-10-26 20:07:37 -07:00
PreISelIntrinsicLowering
PruneEH [PruneEH] Pin tests to legacy PM 2020-10-29 18:17:55 -07:00
Reassociate [Reassociate] Don't convert add-like-or's into add's if they appear to be part of load-combining idiom 2020-11-18 17:55:02 +03:00
Reg2Mem [Reg2Mem] add support for the new pass manager 2020-11-08 11:14:05 +00:00
RewriteStatepointsForGC GC-parseable element atomic memcpy/memmove 2020-10-23 14:06:09 -07:00
SCCP [SimplifyCFG] TryToSimplifyUncondBranchFromEmptyBlock() already knows how to preserve DomTree 2020-12-17 01:03:49 +03:00
SLPVectorizer [SLP] Control maximum vectorization factor from TTI 2020-12-14 08:49:40 -08:00
SROA [ConstantFold] Fold more operations to poison 2020-11-29 21:19:48 +09:00
SafeStack OpaquePtr: Bulk update tests to use typed byval 2020-11-20 14:00:46 -05:00
SampleProfile [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
ScalarizeMaskedMemIntrin
Scalarizer [Scalarizer] Remove unused check-prefixes 2020-11-09 10:37:17 +00:00
SeparateConstOffsetFromGEP [NewPM] Port -separate-const-offset-from-gep 2020-11-09 17:42:36 -08:00
SimpleLoopUnswitch OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
SimplifyCFG [SimplifyCFG] Teach mergeEmptyReturnBlocks() to preserve DomTree 2020-12-17 01:03:50 +03:00
Sink Sink: Handle instruction sink when a user is dead 2020-10-09 16:20:26 -07:00
SpeculateAroundPHIs
SpeculativeExecution SpeculativeExecution: Allow speculating more instruction types 2020-11-18 17:00:19 +01:00
StraightLineStrengthReduce [NPM] Add remaining test of -slsr 2020-11-17 14:41:01 +08:00
StripDeadPrototypes
StripSymbols [NewPM] Port strip* passes to NPM 2020-09-15 18:25:12 -07:00
StructurizeCFG [StructurizeCFG][NewPM] Port -structurizecfg to NPM 2020-10-23 15:54:03 -07:00
SyntheticCountsPropagation
TailCallElim OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
ThinLTOBitcodeWriter [test] Fix split-vfunc.ll under NPM 2020-11-19 14:59:05 -08:00
TypePromotion/ARM
UnifyFunctionExitNodes [NPM] Port -mergereturn to NPM 2020-10-20 10:33:58 -07:00
UnifyLoopExits [NPM] port -unify-loop-exits to NPM 2020-10-20 10:46:57 -07:00
UniqueInternalLinkageNames [NewPM] Add unique-internal-linkage-names to PassRegistry.def 2020-11-09 12:54:13 -08:00
Util Add pass to add !annotate metadata from @llvm.global.annotations. 2020-11-16 14:57:11 +00:00
VectorCombine [VectorCombine] adjust test alignments for better coverage; NFC 2020-12-16 16:30:45 -05:00
WholeProgramDevirt [WholeProgramDevirt][NewPM] Add NPM testing path to match legacy pass 2020-09-30 17:27:37 -07:00
lit.local.cfg [FileCheck] Enforce --allow-unused-prefixes=false for llvm/test/Transforms 2020-12-09 08:51:38 -08:00