1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/include/llvm/Analysis
David Sherwood 2d2e4a1b17 [Analysis] Add simple cost model for strict (in-order) reductions
I have added a new FastMathFlags parameter to getArithmeticReductionCost
to indicate what type of reduction we are performing:

  1. Tree-wise. This is the typical fast-math reduction that involves
  continually splitting a vector up into halves and adding each
  half together until we get a scalar result. This is the default
  behaviour for integers, whereas for floating point we only do this
  if reassociation is allowed.
  2. Ordered. This now allows us to estimate the cost of performing
  a strict vector reduction by treating it as a series of scalar
  operations in lane order. This is the case when FP reassociation
  is not permitted. For scalable vectors this is more difficult
  because at compile time we do not know how many lanes there are,
  and so we use the worst case maximum vscale value.

I have also fixed getTypeBasedIntrinsicInstrCost to pass in the
FastMathFlags, which meant fixing up some X86 tests where we always
assumed the vector.reduce.fadd/mul intrinsics were 'fast'.

New tests have been added here:

  Analysis/CostModel/AArch64/reduce-fadd.ll
  Analysis/CostModel/AArch64/sve-intrinsics.ll
  Transforms/LoopVectorize/AArch64/strict-fadd-cost.ll
  Transforms/LoopVectorize/AArch64/sve-strict-fadd-cost.ll

Differential Revision: https://reviews.llvm.org/D105432
2021-07-26 10:26:06 +01:00
..
Utils [NFC][MLGO] Just use the underlying protobuf object for logging 2021-07-23 10:56:48 -07:00
AliasAnalysis.h [AA] Support callCapturesBefore() on BatchAA (NFCI) 2021-05-14 21:48:08 +02:00
AliasAnalysisEvaluator.h
AliasSetTracker.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
AssumeBundleQueries.h Plumb AssumeInst through operand bundle apis [nfc] 2021-04-06 12:53:53 -07:00
AssumptionCache.h Add a subclass of IntrinsicInst for llvm.assume [nfc] 2021-04-06 11:16:22 -07:00
BasicAliasAnalysis.h [BasicAA] Be more careful with modulo ops on VariableGEPIndex. 2021-06-29 09:22:36 +01:00
BlockFrequencyInfo.h
BlockFrequencyInfoImpl.h [Analysis] Remove getLoopPackage (NFC) 2021-07-18 08:16:29 -07:00
BranchProbabilityInfo.h [Analaysis, CodeGen] Remove getHotSucc (NFC) 2021-07-17 07:31:36 -07:00
CallGraph.h
CallGraphSCCPass.h
CallPrinter.h
CaptureTracking.h
CFG.h [Analysis] Remove unused declaration isPotentiallyReachableFromMany (NFC) 2021-07-11 07:10:11 -07:00
CFGPrinter.h NFC. Mark DOTFuncInfo getters as const 2021-06-03 11:27:06 -07:00
CFLAliasAnalysisUtils.h
CFLAndersAliasAnalysis.h
CFLSteensAliasAnalysis.h [NFC][AA] Prepare to convert AliasResult to class with PartialAlias offset. 2021-04-09 12:54:22 +03:00
CGSCCPassManager.h [NewPM] Fix wrong perfect forwardings 2021-07-19 17:21:32 +01:00
CmpInstAnalysis.h
CodeMetrics.h
ConstantFolding.h Explicitly pass type to cast load constant folding result 2021-04-20 00:53:21 -07:00
ConstraintSystem.h [ConstraintElimination] Add nicer way to dump constraints (NFC). 2021-02-02 16:36:45 +00:00
DDG.h [Analysis] Drop unnecessary const from return types (NFC) 2021-02-13 20:41:38 -08:00
DDGPrinter.h
Delinearization.h
DemandedBits.h Add getDemandedBits for uses. 2021-06-02 10:07:40 -04:00
DependenceAnalysis.h
DependenceGraphBuilder.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
DivergenceAnalysis.h [Analysis] Remove isJoinDivergent (NFC) 2021-07-16 18:23:17 -07:00
DominanceFrontier.h
DominanceFrontierImpl.h
DomPrinter.h
DomTreeUpdater.h
DOTGraphTraitsPass.h [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
EHPersonalities.h
FunctionPropertiesAnalysis.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
GlobalsModRef.h
GuardUtils.h
HeatUtils.h
IndirectCallPromotionAnalysis.h
IndirectCallVisitor.h
InlineAdvisor.h [NFC] clang-format on InlineCost.cpp and InlineAdvisor.h. 2021-06-29 18:15:27 +00:00
InlineCost.h [Inline] Fix a warning by removing an explicit copy constructor 2021-07-25 06:56:47 -07:00
InlineModelFeatureMaps.h Unpack the CostEstimate feature in ML inlining models. 2021-07-02 16:57:16 +00:00
InlineSizeEstimatorAnalysis.h
InstCount.h
InstructionPrecedenceTracking.h [GVN] Properly invalidate ICF cache when we simplify a value 2021-04-08 14:01:57 -07:00
InstructionSimplify.h [FPEnv][InstSimplify] Constrained FP support for NaN 2021-07-09 11:26:28 -04:00
Interval.h
IntervalIterator.h
IntervalPartition.h
IRSimilarityIdentifier.h [IRSim] Strip out the findSimilarity call from the constructor 2021-06-11 18:41:28 -05:00
IteratedDominanceFrontier.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
IVDescriptors.h [LV] Try to sink users recursively for first-order recurrences. 2021-05-31 19:55:33 +01:00
IVUsers.h
LazyBlockFrequencyInfo.h
LazyBranchProbabilityInfo.h
LazyCallGraph.h Allow building for release with EXPENSIVE_CHECKS 2021-06-19 17:02:11 +01:00
LazyValueInfo.h [CVP] @llvm.[us]{min,max}() intrinsics handling 2021-04-11 00:33:47 +03:00
LegacyDivergenceAnalysis.h [NewPM] Introduce (GPU)DivergenceAnalysis in the new pass manager 2021-02-16 10:26:45 +05:30
Lint.h
Loads.h Make FindAvailableLoadedValue TBAA aware 2021-03-24 17:20:26 +00:00
LoopAccessAnalysis.h [LAA] Make getPointersDiff() API compatible with opaque pointers 2021-06-23 18:44:34 +02:00
LoopAnalysisManager.h [NFC] Remove redundant word in comment 2021-02-21 18:04:20 +00:00
LoopCacheAnalysis.h [llvm] Drop unnecessary const from return types (NFC) 2021-01-31 10:23:43 -08:00
LoopInfo.h [LoopFlatten][LoopInfo] Use Loop to identify latch compare instruction 2021-07-21 10:14:18 +01:00
LoopInfoImpl.h [NewPM] Cleanup IR printing instrumentation 2021-04-15 09:50:55 -07:00
LoopIterator.h
LoopNestAnalysis.h Revert "Revert "[LoopNest] Fix Wdeprecated-copy warnings"" 2021-06-08 21:51:53 +00:00
LoopPass.h
LoopUnrollAnalyzer.h [unroll] Use value domain for symbolic execution based cost model 2021-05-26 08:41:25 -07:00
MemDerefPrinter.h
MemoryBuiltins.h Update basic deref API to account for possiblity of free [NFC] 2021-03-19 11:17:19 -07:00
MemoryDependenceAnalysis.h [NFC] MemoryDependenceAnalysis cleanup. 2021-05-31 18:07:55 +03:00
MemoryLocation.h
MemorySSA.h [IR] Added operator delete to subclasses of User to avoid UB 2021-07-08 11:59:22 +02:00
MemorySSAUpdater.h [Analysis] Remove changeCondBranchToUnconditionalTo (NFC) 2021-07-10 17:31:43 -07:00
MLInlineAdvisor.h Reland "[NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor" 2021-01-20 13:33:43 -08:00
MLModelRunner.h
ModuleDebugInfoPrinter.h
ModuleSummaryAnalysis.h
MustExecute.h
ObjCARCAliasAnalysis.h
ObjCARCAnalysisUtils.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ObjCARCInstKind.h
ObjCARCUtil.h [ObjC][ARC] Ignore operand bundle "clang.arc.attachedcall" on a call if 2021-06-28 11:02:30 -07:00
OptimizationRemarkEmitter.h [Remarks] Add analysis remarks for memset/memcpy/memmove lengths 2021-05-24 10:10:44 -07:00
OverflowInstAnalysis.h [InstCombine] Fold overflow bit of [u|s]mul.with.overflow in a poison-safe way 2021-05-02 11:54:12 +09:00
Passes.h
PHITransAddr.h
PhiValues.h
PostDominators.h
ProfileSummaryInfo.h [CSSPGO][llvm-profdata] Support trimming cold context when merging profiles 2021-04-22 00:42:37 -07:00
PtrUseVisitor.h
RegionInfo.h
RegionInfoImpl.h [llvm] Use pop_back_val (NFC) 2021-01-24 12:18:57 -08:00
RegionIterator.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
RegionPass.h
RegionPrinter.h
ReplayInlineAdvisor.h [InlineAdvisor] Allow replay of inline decisions for the CGSCC inliner from optimization remarks 2021-01-25 15:38:57 -08:00
ScalarEvolution.h [ScalarEvolution] Fix overflow in computeBECount. 2021-07-16 16:15:18 -07:00
ScalarEvolutionAliasAnalysis.h [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
ScalarEvolutionDivision.h
ScalarEvolutionExpressions.h [NFC][ScalarEvolution] Fix SCEVNAryExpr::getType(). 2021-06-23 12:55:59 -07:00
ScalarEvolutionNormalization.h
ScopedNoAliasAA.h
SparsePropagation.h [llvm] Use pop_back_val (NFC) 2021-02-01 20:55:05 -08:00
StackLifetime.h [StackSafety] Use ListSeparator (NFC) 2021-01-25 19:23:59 -08:00
StackSafetyAnalysis.h
SyncDependenceAnalysis.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
SyntheticCountsUtils.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
TargetFolder.h
TargetLibraryInfo.def [OpenMP] Change __kmpc_free_shared to include the paired allocation size 2021-07-21 20:56:21 -04:00
TargetLibraryInfo.h [SimplifyLibCalls] Take size of int into consideration when emitting ldexp/ldexpf 2021-06-02 11:40:34 +02:00
TargetTransformInfo.h [Analysis] Add simple cost model for strict (in-order) reductions 2021-07-26 10:26:06 +01:00
TargetTransformInfoImpl.h [Analysis] Add simple cost model for strict (in-order) reductions 2021-07-26 10:26:06 +01:00
Trace.h
TypeBasedAliasAnalysis.h
TypeMetadataUtils.h
ValueLattice.h [NFC][ConstantRange] Add 'icmp' helper method 2021-04-10 19:38:55 +03:00
ValueLatticeUtils.h
ValueTracking.h Plumb TLI through isSafeToExecuteUnconditionally [NFC] 2021-03-24 17:52:04 -07:00
VecFuncs.def [NFC] Fix a few whitespace issues and typos. 2021-07-04 11:49:58 +01:00
VectorUtils.h [NFC] Fix a few whitespace issues and typos. 2021-07-04 11:49:58 +01:00