llvm-project/llvm/lib/Transforms/IPO
wlei 6d5132b426 [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner
We see a regression related to low probe factor(0.01) which prevents some callsites being promoted in ICPPass and later cause the missing inline in CGSCC inliner. The root cause is due to redundant(the second) multiplication of the probe factor and this change try to fix it.

`Sum` does multiply a factor right after findCallSamples but later when using as the parameter in setProbeDistributionFactor, it multiplies one again.

This change could get ~2% perf back on mcf benchmark. In mcf, previously the corresponding factor is 1 and it's the recent feature introducing the <1 factor then trigger this bug.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D99787
2021-04-07 08:48:59 -07:00
..
AlwaysInliner.cpp [coroutine] should disable inline before calling coro split 2020-12-08 08:53:08 -08:00
Annotation2Metadata.cpp Add pass to add !annotate metadata from @llvm.global.annotations. 2020-11-16 14:57:11 +00:00
ArgumentPromotion.cpp Revert "[ArgPromotion] Copy additional metadata for loads." 2021-03-26 21:34:54 +01:00
Attributor.cpp Plumb AssumeInst through operand bundle apis [nfc] 2021-04-06 12:53:53 -07:00
AttributorAttributes.cpp [Attributor] Cleanup detection of non-relaxed atomics in nosync inference 2021-04-01 12:01:29 -07:00
BarrierNoopPass.cpp
BlockExtractor.cpp [BlockExtract][NewPM] Port -extract-blocks to NPM 2020-10-21 12:51:11 -07:00
CMakeLists.txt [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
CalledValuePropagation.cpp
ConstantMerge.cpp [Alignment][NFC] migrate DataLayout::getPreferredAlignment 2020-06-29 11:24:36 +00:00
CrossDSOCFI.cpp
DeadArgumentElimination.cpp [DAE] Adjust param/arg attributes when changing parameter to undef 2021-03-25 14:53:22 -07:00
ElimAvailExtern.cpp
ExtractGV.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
ForceFunctionAttrs.cpp [IR] Add vscale_range IR function attribute 2021-03-22 12:05:06 +00:00
FunctionAttrs.cpp [funcattrs] Respect nofree attribute on callsites (not just callee) 2021-04-01 14:45:49 -07:00
FunctionImport.cpp [FunctionImport] Delete unneeded setLive. NFC 2021-03-06 14:09:54 -08:00
GlobalDCE.cpp
GlobalOpt.cpp Revert "[IR] Ignore bitcasts of function pointers which are only used as callees in callbase instruction" 2021-04-06 16:33:28 +02:00
GlobalSplit.cpp
HotColdSplitting.cpp [Transforms/IPO] Use range-based for loops (NFC) 2021-02-03 20:41:20 -08:00
IPO.cpp [IRSim][IROutliner] Adding the extraction basics for the IROutliner. 2020-12-17 11:27:26 -06:00
IROutliner.cpp IROutliner.cpp - fix Wdocumentation warning. NFCI. 2021-02-05 11:38:09 +00:00
InferFunctionAttrs.cpp
InlineSimple.cpp
Inliner.cpp [NFC][Inliner] Debugging support to print funtion size after each inlining. 2021-03-14 22:11:53 -07:00
Internalize.cpp collectUsedGlobalVariables: migrate SmallPtrSetImpl overload to SmallVecImpl overload after D97128 2021-02-23 16:09:06 -08:00
LoopExtractor.cpp [LoopExtract][NewPM] Port -loop-extract to NPM 2020-10-13 22:55:42 -07:00
LowerTypeTests.cpp Use AssumeInst in a few more places [nfc] 2021-04-06 13:18:53 -07:00
MergeFunctions.cpp [Transforms/IPO] Use range-based for loops (NFC) 2021-02-03 20:41:20 -08:00
OpenMPOpt.cpp [clang][OpenMP] Use OpenMPIRBuilder for workshare loops. 2021-03-04 22:52:59 -06:00
PartialInlining.cpp NFC: Migrate PartialInlining to work on InstructionCost 2021-03-30 11:59:45 +01:00
PassManagerBuilder.cpp [PassManager] Run additional LICM before LoopRotate 2021-04-02 11:11:42 +03:00
PruneEH.cpp [PruneEH][NFC] Use CallGraphUpdater in PruneEH 2020-09-14 14:43:19 -07:00
SCCP.cpp Add a missing file header comment, NFC. 2021-03-26 15:34:04 -07:00
SampleContextTracker.cpp [CSSPGO] Top-down processing order based on full profile. 2021-03-30 10:42:22 -07:00
SampleProfile.cpp [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner 2021-04-07 08:48:59 -07:00
SampleProfileProbe.cpp [CSSPGO] Unblocking optimizations by dangling pseudo probes. 2021-03-03 22:44:42 -08:00
StripDeadPrototypes.cpp
StripSymbols.cpp [Transforms] Use range-based for loops (NFC) 2021-02-08 22:33:53 -08:00
SyntheticCountsPropagation.cpp [CallGraph] Add support for callback call sites 2020-07-01 13:44:11 -07:00
ThinLTOBitcodeWriter.cpp [ThinLTO] Make cloneUsedGlobalVariables deterministic 2021-02-23 16:09:05 -08:00
WholeProgramDevirt.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00