llvm-project/llvm/lib/Analysis
eopXD 6a84579243 [LSR][TTI][PowerPC][SystemZ][X86] Add const-ness to TTI::isLSRCostLess. NFC
Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D126350
2022-05-27 15:22:23 -07:00
..
models [MLGO] ML Regalloc Eviction Advisor 2022-01-19 11:00:32 -08:00
AliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
AliasAnalysisEvaluator.cpp Cleanup includes: final pass 2022-03-29 09:00:21 +02:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
Analysis.cpp [DomPrinter] Migrate -dot-dom to the new pass manager. 2022-05-16 15:07:16 -05:00
AssumeBundleQueries.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
AssumptionCache.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
BasicAliasAnalysis.cpp [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
BlockFrequencyInfo.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
BlockFrequencyInfoImpl.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
BranchProbabilityInfo.cpp [NFC] Add missing <map> includes 2022-01-19 12:29:03 +01:00
CFG.cpp
CFGPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp [llvm] Remove redundant member initialization (NFC) 2022-01-07 17:45:09 -08:00
CGSCCPassManager.cpp [CGSCC] Use make_early_inc_range. NFC 2022-03-23 15:31:09 -07:00
CMakeLists.txt [mlgo] Factor out TensorSpec 2022-04-25 18:35:46 -07:00
CallGraph.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
CallGraphSCCPass.cpp [NFC] Rename Instrinsic to Intrinsic 2022-04-25 18:13:23 +01:00
CallPrinter.cpp [CallPrinter] Port CallPrinter passes to new pass manager 2022-04-18 10:02:18 -07:00
CaptureTracking.cpp [CaptureTracking] Ignore ephemeral values in EarliestEscapeInfo 2022-04-08 10:07:26 -07:00
CmpInstAnalysis.cpp [InstCombine][Analysis] Move getFCmpCode and getPredForFCmpCode to CmpInstAnalysis. NFC 2022-03-03 09:33:24 -08:00
CodeMetrics.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ConstantFolding.cpp [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
ConstraintSystem.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
CostModel.cpp [CostModel] Change printer pass wording to work with update_analyze_test_checks.py 2022-03-03 10:10:48 -08:00
CycleAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DDG.cpp [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
DDGPrinter.cpp
Delinearization.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DemandedBits.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DependenceAnalysis.cpp [DA] Refactor with a better API 2022-04-13 14:51:48 -04:00
DependenceGraphBuilder.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
DevelopmentModeInlineAdvisor.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
DivergenceAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
DomPrinter.cpp [DomPrinter] Migrate -dot-dom to the new pass manager. 2022-05-16 15:07:16 -05:00
DomTreeUpdater.cpp [DomTreeUpdater] Remove deprecated methods 2022-04-20 12:14:29 +02:00
DominanceFrontier.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
EHPersonalities.cpp
FunctionPropertiesAnalysis.cpp [NFC] remove const from FunctionPropertiesAnalysis::run, keep on Result 2022-04-28 15:10:21 -07:00
GlobalsModRef.cpp [GlobalsModRef][FIX] Ensure we honor synchronizing effects of intrinsics 2022-04-12 16:42:50 -05:00
GuardUtils.cpp
HeatUtils.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
IRSimilarityIdentifier.cpp [IRSim] Remove early check from similarity matching such that commutative instructions are checked correctly when using the same value. 2022-05-09 22:59:09 -05:00
IVDescriptors.cpp [LoopVectorize] Support reductions that store intermediary result 2022-05-03 10:12:30 +01:00
IVUsers.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ImportedFunctionsInliningStatistics.cpp
IndirectCallPromotionAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
InlineAdvisor.cpp [Analysis] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC) 2022-03-20 18:21:40 -07:00
InlineCost.cpp [InlineCost] Set LastCallToStaticBonus in ML inlining models. 2022-04-24 09:34:19 +08:00
InlineSizeEstimatorAnalysis.cpp Fix build breaks on ml-* bots introduced by include cleanups 2022-03-01 11:29:18 -08:00
InstCount.cpp
InstructionPrecedenceTracking.cpp Revert "[IPT] Restructure cache to allow lazy update following invalidation [NFC]" 2021-10-21 10:48:41 -07:00
InstructionSimplify.cpp [IR] add and use pattern match specialization for sqrt intrinsic; NFC 2022-05-23 14:16:30 -04:00
Interval.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
IntervalPartition.cpp [llvm] Use range-based for loops (NFC) 2021-11-20 18:42:10 -08:00
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp Add missing include under EXPENSIVE_CHECKS 2022-03-12 18:54:29 +01:00
LazyValueInfo.cpp [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
LegacyDivergenceAnalysis.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
Lint.cpp [Lint][Verifier] NFC: Rename 'Assert*' macros to 'Check*'. 2022-04-05 15:34:35 -04:00
Loads.cpp [Loads] Check type size in bits during store to load forwarding 2022-04-08 17:29:29 +02:00
LoopAccessAnalysis.cpp [LAA,LV] Add initial support for pointer-diff memory checks. 2022-05-16 15:27:22 +01:00
LoopAnalysisManager.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
LoopCacheAnalysis.cpp fix warning caused by ef4ecc3cef 2022-05-02 17:06:27 -04:00
LoopInfo.cpp Fix warnings about variables that are set but only used in debug mode 2022-04-06 10:01:46 +03:00
LoopNestAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
LoopPass.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
LoopUnrollAnalyzer.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MLInlineAdvisor.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
MemDepPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemDerefPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemoryBuiltins.cpp [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf 2022-05-19 11:23:13 +01:00
MemoryDependenceAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemoryLocation.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
MemorySSA.cpp [MSSA] Print memory phis when inspecting walker. 2022-04-06 16:06:14 -07:00
MemorySSAUpdater.cpp Fix MemorySSAUpdater::insertDef for dead code 2022-03-31 16:32:35 -07:00
ModelUnderTrainingRunner.cpp [iwyu] Handle regressions in libLLVM header include 2022-05-26 08:12:34 +02:00
ModuleDebugInfoPrinter.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ModuleSummaryAnalysis.cpp [LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable() 2022-03-03 19:04:11 -05:00
MustExecute.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
NoInferenceModelRunner.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
ObjCARCAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp [ObjCARC] Use "UnsafeClaimRV" to refer to unsafeClaim in enums. NFC. 2022-01-24 19:37:01 -08:00
OptimizationRemarkEmitter.cpp [Analysis] Apply clang-tidy fixes for readability-redundant-smartptr-get (NFC) 2022-03-20 18:21:40 -07:00
OverflowInstAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
PHITransAddr.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
PtrUseVisitor.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
README.txt
RegionInfo.cpp [NFC] Remove unnecessary #includes 2022-02-04 21:22:41 -08:00
RegionPass.cpp [LegacyPassManager] Move structural hashing into Pass classes. NFC. 2022-03-17 09:51:12 +00:00
RegionPrinter.cpp [polly] migrate -polly-show to the new pass manager 2022-05-09 14:04:29 -05:00
ReplayInlineAdvisor.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolution.cpp [SCEV] Collect conditions from assumes same way as for branches. 2022-05-26 18:17:13 +01:00
ScalarEvolutionAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolutionDivision.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ScalarEvolutionNormalization.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
ScopedNoAliasAA.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
StackLifetime.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
StackSafetyAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
StratifiedSets.h
SyncDependenceAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
SyntheticCountsUtils.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
TFUtils.cpp [mlgo] Support exposing more features than those supported by models 2022-05-09 18:01:21 -07:00
TargetLibraryInfo.cpp [TLI] Check that malloc argument has type size_t 2022-03-14 17:22:24 +01:00
TargetTransformInfo.cpp [LSR][TTI][PowerPC][SystemZ][X86] Add const-ness to TTI::isLSRCostLess. NFC 2022-05-27 15:22:23 -07:00
TensorSpec.cpp [mlgo] Factor out TensorSpec 2022-04-25 18:35:46 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
TypeMetadataUtils.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
VFABIDemangling.cpp Cleanup includes: LLVMAnalysis 2022-03-01 18:01:54 +01:00
ValueLattice.cpp
ValueLatticeUtils.cpp [SCCP] Check that load/store and global type match 2022-02-11 11:01:18 +01:00
ValueTracking.cpp [ValueTracking] Added support to deduce PHI Nodes values being a power of 2 2022-05-26 20:30:31 +00:00
VectorUtils.cpp [LV][SLP] Mark fptosi_sat as vectorizable 2022-05-03 09:32:34 +01:00

README.txt

Analysis Opportunities:

//===---------------------------------------------------------------------===//

In test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll, the
ScalarEvolution expression for %r is this:

  {1,+,3,+,2}<loop>

Outside the loop, this could be evaluated simply as (%n * %n), however
ScalarEvolution currently evaluates it as

  (-2 + (2 * (trunc i65 (((zext i64 (-2 + %n) to i65) * (zext i64 (-1 + %n) to i65)) /u 2) to i64)) + (3 * %n))

In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.

//===---------------------------------------------------------------------===//

In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll,

ScalarEvolution is forming this expression:

((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))

This could be folded to

(-1 * (trunc i64 undef to i32))

//===---------------------------------------------------------------------===//