llvm-project/llvm/lib/Analysis
2023-03-21 17:40:35 -07:00
..
models [mlgo] Disable mlgo tests when python version is 6 2023-02-03 19:45:22 -08:00
AliasAnalysis.cpp [AlwaysInliner] Make legacy pass like the new pass 2023-03-21 11:04:22 -07:00
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp Revert "[AST] Use ModRefInfo to represent access kind (NFC)" 2023-03-17 17:24:35 +01:00
Analysis.cpp
AssumeBundleQueries.cpp Revert "[AssumptionCache] caches @llvm.experimental.guard's" 2023-02-20 18:38:07 +07:00
AssumptionCache.cpp Attributor: Assume handling for nofpclass 2023-03-17 07:39:40 -04:00
BasicAliasAnalysis.cpp [InstCombine] Simplify separate_storage assumptions 2023-03-03 13:26:29 +01:00
BlockFrequencyInfo.cpp [Analysis] Make order of analysis executions more stable 2023-03-17 09:33:16 +01:00
BlockFrequencyInfoImpl.cpp BlockFrequencyInfoImpl.cpp - add missing closing namespace comment. NFC 2023-02-12 16:42:28 +00:00
BranchProbabilityInfo.cpp [Analysis] Make order of analysis executions more stable 2023-03-17 09:33:16 +01:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp [NFC] Add some debug printouts to CaptureTracking 2023-03-15 14:22:14 +07:00
CFG.cpp
CFGPrinter.cpp [Analysis] Use *{Set,Map}::contains (NFC) 2023-03-14 00:32:40 -07:00
CFGSCCPrinter.cpp
CGSCCPassManager.cpp [PassManager] Run PassInstrumentation after analysis invalidation 2023-03-15 08:36:14 -07:00
CMakeLists.txt Revert "[LogicCombine 1/?] Implement a general way to simplify logical operations." 2023-03-14 09:00:06 +08:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp ConstantFolding: Minor cleanups for is_fpclass 2023-03-15 18:06:36 -04:00
ConstraintSystem.cpp [ConstraintSystem] Use sparse representation for constraints. (NFC) 2023-02-16 14:44:49 +00:00
CostModel.cpp
CycleAnalysis.cpp
DDG.cpp [llvm] Use *{Map,Set}::contains (NFC) 2023-03-15 18:06:32 -07:00
DDGPrinter.cpp
Delinearization.cpp
DemandedBits.cpp [Analysis] Use *{Set,Map}::contains (NFC) 2023-03-14 00:32:40 -07:00
DependenceAnalysis.cpp
DependenceGraphBuilder.cpp
DevelopmentModeInlineAdvisor.cpp Reland "[mlgo] Hook up the interactive runner to the mlgo-ed passes" 2023-02-03 17:54:42 -08:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
FunctionPropertiesAnalysis.cpp
GlobalsModRef.cpp
GuardUtils.cpp
HeatUtils.cpp
ImportedFunctionsInliningStatistics.cpp
IndirectCallPromotionAnalysis.cpp
InlineAdvisor.cpp Reland "[mlgo] Hook up the interactive runner to the mlgo-ed passes" 2023-02-03 17:54:42 -08:00
InlineCost.cpp [Inliner] clang-format InlineCost.cpp and Inliner.cpp (NFC) 2023-03-16 14:55:28 -07:00
InlineOrder.cpp [InlineOrder] Plugin Inline Order 2023-03-15 13:15:14 -04:00
InlineSizeEstimatorAnalysis.cpp
InstCount.cpp
InstructionPrecedenceTracking.cpp [llvm] Use *{Map,Set}::contains (NFC) 2023-03-15 18:06:32 -07:00
InstructionSimplify.cpp [NFC] Fix incorrect comment for simplifyRightShift 2023-03-21 12:05:37 -07:00
InteractiveModelRunner.cpp Reapply 9cffabc68c 2023-02-02 08:44:39 -08:00
Interval.cpp
IntervalPartition.cpp
IRSimilarityIdentifier.cpp [IRSim] Check largest sections first when analyzing similarity 2023-03-21 14:49:41 -05:00
IVDescriptors.cpp [IVDescriptors] Pass IsSigned when creating an all 1s constant for UMin recurrence. 2023-03-08 09:52:42 -08:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp Use APInt::count{l,r}_{zero,one} (NFC) 2023-02-19 22:04:47 -08:00
LegacyDivergenceAnalysis.cpp
Lint.cpp Revert "[Lint] Use new PM instead of legacy PM in lintFunction and lintModule" 2023-02-06 19:29:06 +01:00
Loads.cpp [LV] Use speculatability within entire loop to avoid strided load predication 2023-03-21 12:08:25 -04:00
Local.cpp
LoopAccessAnalysis.cpp [Analysis] Make order of analysis executions more stable 2023-03-17 09:33:16 +01:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp Revert "[GVN] Support address translation through select instructions" 2023-02-27 12:57:59 +03:00
MemoryLocation.cpp
MemoryProfileInfo.cpp [MemProf] Make hasSingleAllocType helper non-static 2023-02-21 12:00:03 -08:00
MemorySSA.cpp [DebugInfo] Remove dbg.addr from Analysis 2023-03-02 09:29:43 +00:00
MemorySSAUpdater.cpp
MLInlineAdvisor.cpp Reland "[mlgo] Hook up the interactive runner to the mlgo-ed passes" 2023-02-03 17:54:42 -08:00
ModelUnderTrainingRunner.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [llvm] Teach whole program devirtualization about relative vtables 2023-02-23 22:18:43 +00:00
MustExecute.cpp
NoInferenceModelRunner.cpp
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
OverflowInstAnalysis.cpp
PHITransAddr.cpp Revert "[GVN] Support address translation through select instructions" 2023-02-27 12:57:59 +03:00
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ReplayInlineAdvisor.cpp
ScalarEvolution.cpp [SCEV] Preserve divisibility and min/max information in applyLoopGuards 2023-03-20 12:04:05 +02:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp Revert "Revert "[SCEV] Add SCEVType to represent vscale."" 2023-03-02 13:14:07 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StackLifetime.cpp [Analysis] Use *{Set,Map}::contains (NFC) 2023-03-14 00:32:40 -07:00
StackSafetyAnalysis.cpp
StratifiedSets.h
SyncDependenceAnalysis.cpp
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [NFC][TargetParser] Remove llvm/ADT/Triple.h 2023-02-07 12:39:46 +00:00
TargetTransformInfo.cpp [SLP] Outline GEP chain cost modeling into new TTI interface - NFCI. 2023-03-14 14:01:34 -07:00
TensorSpec.cpp Fix "not all control paths return a value" introduced by D142642 2023-01-27 17:59:05 -08:00
TFLiteUtils.cpp
Trace.cpp
TrainingLogger.cpp [mlgo] Allow logging the spec for the "advice", if needed 2023-02-01 10:24:38 -08:00
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp [llvm] Use ConstantInt::{isZero,isOne} (NFC) 2023-03-21 17:40:35 -07:00
UniformityAnalysis.cpp [AMDGPU] Use UniformityAnalysis in AtomicOptimizer 2023-03-15 09:39:55 +01:00
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [LSR/LFTR] Move two utilities to common code for reuse [nfc] 2023-03-20 09:05:38 -07:00
VectorUtils.cpp Use llvm::bit_ceil (NFC) 2023-01-28 16:13:09 -08:00
VFABIDemangling.cpp

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))

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