llvm-project/llvm/test/Transforms
Wei Mi 7a6c89427c [SampleFDO] Add use-sample-profile function attribute.
When sampleFDO is enabled, people may expect they can use
-fno-profile-sample-use to opt-out using sample profile for a certain file.
That could be either for debugging purpose or for performance tuning purpose.
However, when thinlto is enabled, if a function in file A compiled with
-fno-profile-sample-use is imported to another file B compiled with
-fprofile-sample-use, the inlined copy of the function in file B may still
get its profile annotated.

The inconsistency may even introduce profile unused warning because if the
target is not compiled with explicit debug information flag, the function
in file A won't have its debug information enabled (debug information will
be enabled implicitly only when -fprofile-sample-use is used). After it is
imported into file B which is compiled with -fprofile-sample-use, profile
annotation for the outline copy of the function will fail because the
function has no debug information, and that will trigger  profile unused
warning.

We add a new attribute use-sample-profile to control whether a function
will use its sample profile no matter for its outline or inline copies.
That will make the behavior of -fno-profile-sample-use consistent.

Differential Revision: https://reviews.llvm.org/D79959
2020-06-02 17:23:17 -07:00
..
ADCE
AddDiscriminators
AggressiveInstCombine
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
Attributor Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
BDCE
BlockExtractor
BranchFolding
CallSiteSplitting
CalledValuePropagation
CanonicalizeAliases
CanonicalizeFreezeInLoops [TargetPassConfig] Add CanonicalizeFreezeInLoops before LSR 2020-05-28 05:21:12 +09:00
CodeExtractor
CodeGenPrepare
ConstProp
ConstantHoisting
ConstantMerge
Coroutines
CorrelatedValuePropagation
CrossDSOCFI
DCE
DeadArgElim Preserve DbgLoc when DeadArgumentElimination rewrites a 'ret'. 2020-05-29 10:00:33 -07:00
DeadStoreElimination [DSE] Remove noop stores in MSSA. 2020-05-30 09:57:30 -07:00
DivRemPairs
EarlyCSE [EarlyCSE] Common gc.relocate calls. 2020-06-02 12:25:43 +03:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible
Float2Int
ForcedFunctionAttrs
FunctionAttrs Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
FunctionImport
GCOVProfiling
GVN Make Value::getPointerAlignment() return an Align, not a MaybeAlign. 2020-05-20 16:37:20 -07:00
GVNHoist
GVNSink
GlobalDCE
GlobalMerge
GlobalOpt Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
GlobalSplit
GuardWidening
HardwareLoops [HardwareLoops] llvm.loop.decrement.reg definition 2020-05-21 10:48:16 +01:00
HotColdSplit
IPConstantProp
IRCE
IndVarSimplify [IndVarSimplify][LoopUtils] Avoid TOCTOU/ordering issues (PR45835) 2020-05-21 13:05:55 +03:00
IndirectBrExpand
InferAddressSpaces AMDGPU: Handle rewriting ptrmask for more address spaces 2020-05-28 14:35:15 -04:00
InferFunctionAttrs
Inline [SampleFDO] Add use-sample-profile function attribute. 2020-06-02 17:23:17 -07:00
InstCombine [InstCombine] add tests for select-of-select-shuffle; NFC 2020-06-02 13:26:21 -04:00
InstMerge
InstNamer [InstNamer] use 'i' for Instructions, not 'tmp' 2020-06-01 11:11:14 -04:00
InstSimplify [FPEnv] Intrinsic llvm.roundeven 2020-05-26 19:24:58 +07:00
InterleavedAccess [Alignment] Fix misaligned interleaved loads 2020-05-27 12:12:22 +00:00
Internalize
JumpThreading
LCSSA
LICM [FPEnv] Intrinsic llvm.roundeven 2020-05-26 19:24:58 +07:00
LoadStoreVectorizer LoadStoreVectorizer: Match nested adds to prove vectorization is safe 2020-05-18 12:13:01 -07:00
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopFusion Revert "[llvm][test] Add COM: directives before colon-less non-CHECKs in comments. NFC" 2020-05-22 05:36:15 -06:00
LoopIdiom
LoopInstSimplify
LoopInterchange
LoopLoadElim
LoopPredication
LoopReroll
LoopRotate
LoopSimplify [LoopSimplify] don't separate nested loops with convergent calls 2020-05-19 09:22:39 +05:30
LoopSimplifyCFG
LoopStrengthReduce
LoopTransformWarning
LoopUnroll [LoopUnroll] Add a test case for rG7873376bb36b. 2020-05-30 20:34:27 +00:00
LoopUnrollAndJam [UnJ] Update LI for inner nested loops 2020-05-27 14:36:38 +01:00
LoopUnswitch
LoopVectorize [LV] Make sure the MaxVF is a power-of-2 by rounding down. 2020-06-02 10:40:49 +01:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [llvm] [MatrixIntrinsics] Add row-major support for llvm.matrix.transpose 2020-05-28 12:13:32 -07:00
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt
MergeFunc
MergeICmps
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN
ObjCARC
OpenMP [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def 2020-06-01 16:23:10 -04:00
PGOProfile [PGO] Guard the memcmp/bcmp size value profiling instrumentation behind flag. 2020-05-28 10:07:04 -07:00
PartiallyInlineLibCalls
PhaseOrdering [PhaseOrdering] add test for hoisting/CSE (PR46115); NFC 2020-05-31 10:34:18 -04:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate
Reg2Mem
RewriteStatepointsForGC [Tests] Switch a few statepoint tests to using operand bundles 2020-05-28 14:36:05 -07:00
SCCP [SCCP] Switch to widen at PHIs, stores and call edges. 2020-05-29 11:59:17 +01:00
SLPVectorizer [SLP] Apply external to vectorizable tree users cost adjustment for 2020-05-29 15:37:41 -07:00
SROA Temporarily removed unstable test. NFC. 2020-06-01 10:18:54 -07:00
SafeStack [Instruction] Set metadata uses to undef on deletion 2020-05-21 15:58:12 -07:00
SampleProfile [SampleFDO] Add use-sample-profile function attribute. 2020-06-02 17:23:17 -07:00
ScalarizeMaskedMemIntrin/X86
Scalarizer
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [SimpleLoopUnswitch] Drop uses of instructions before block deletion 2020-05-27 18:25:18 +07:00
SimplifyCFG [InstCombine] Sink pure instructions down to return and unreachable blocks 2020-05-22 14:33:42 +07:00
Sink
SpeculateAroundPHIs
SpeculativeExecution
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG [StructurizeCFG] Fix region nodes ordering 2020-06-01 12:50:35 +03:00
SyntheticCountsPropagation
TailCallElim [TRE] Allow elimination when the returned value is non-constant 2020-05-27 16:55:03 -07:00
ThinLTOBitcodeWriter
TypePromotion/ARM
UnifyLoopExits
UniqueInternalLinkageNames
Util [Tests] Switch a few statepoint tests to using operand bundles 2020-05-28 14:36:05 -07:00
VectorCombine/X86 [VectorCombine][X86] Add loaded insert tests from D80885 2020-06-02 10:04:05 +01:00
WholeProgramDevirt