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 [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
AliasAnalysisSummary.h [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
AliasSetTracker.cpp Revert "[AST] Use ModRefInfo to represent access kind (NFC)" 2023-03-17 17:24:35 +01:00
Analysis.cpp [AA] Remove CFL AA passes 2022-12-12 09:34:20 +01:00
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 [CallGraph][FIX] Ensure generic intrinsics are represented in the CG 2023-01-10 11:38:58 -08:00
CallGraphSCCPass.cpp [CallGraph][FIX] Ensure generic intrinsics are represented in the CG 2023-01-10 11:38:58 -08:00
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 Fix some -Wconstant-conversion warnings for future Clang (D139114) 2023-01-13 16:28:44 -08:00
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 [NFC] Replaced BB->getInstList().{erase(),pop_front(),pop_back()} with eraseFromParent(). 2022-11-23 22:47:46 -08:00
FunctionPropertiesAnalysis.cpp
GlobalsModRef.cpp [Analysis] Use isa instead of dyn_cast to suppress an unused variable warning. NFC 2023-01-13 10:40:25 -08:00
GuardUtils.cpp
HeatUtils.cpp
ImportedFunctionsInliningStatistics.cpp [Inliner] Move cl::opt inside llvm:: 2022-11-24 20:31:13 -08:00
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 [NFC] Cleanup: Remove instances of Function::getBasicBlockList() 2022-12-15 13:08:25 -08:00
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 Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part 2023-01-05 14:11:08 +01:00
LazyValueInfo.cpp Use APInt::count{l,r}_{zero,one} (NFC) 2023-02-19 22:04:47 -08:00
LegacyDivergenceAnalysis.cpp [LegacyDivergenceAnalysis] Add NewPM support 2023-01-20 15:53:28 -07:00
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 Detemplate llvm::EmitGEPOffset and move it into a cpp file. NFC. 2022-12-29 16:24:21 +01:00
LoopAccessAnalysis.cpp [Analysis] Make order of analysis executions more stable 2023-03-17 09:33:16 +01:00
LoopAnalysisManager.cpp [Analysis] Use std::optional in LoopAnalysisManager.cpp (NFC) 2022-11-25 10:28:54 -08:00
LoopCacheAnalysis.cpp [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
LoopInfo.cpp [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
LoopNestAnalysis.cpp [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
LoopPass.cpp Use PassGate from LLVMContext if any otherwise global one 2022-11-25 15:13:04 +07:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp [NFC] Use TypeSize::getKnownMinValue() instead of TypeSize::getKnownMinSize() 2023-01-11 16:36:39 +00:00
MemoryDependenceAnalysis.cpp Revert "[GVN] Support address translation through select instructions" 2023-02-27 12:57:59 +03:00
MemoryLocation.cpp MemoryLocation: convert Optional to std::optional 2022-12-01 15:36:20 -08:00
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 [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [llvm] Teach whole program devirtualization about relative vtables 2023-02-23 22:18:43 +00:00
MustExecute.cpp std::optional::value => operator*/operator-> 2022-12-16 22:44:08 +00:00
NoInferenceModelRunner.cpp
ObjCARCAliasAnalysis.cpp [AA] Allow for flow-sensitive analyses. 2022-12-15 21:04:38 -08:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp [YAML] Convert Optional to std::optional 2022-12-06 12:49:32 -08:00
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 std::optional::value => operator*/operator-> 2022-12-16 22:44:08 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp Use PassGate from LLVMContext if any otherwise global one 2022-11-25 15:13:04 +07:00
RegionPrinter.cpp
ReplayInlineAdvisor.cpp [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
ScalarEvolution.cpp [SCEV] Preserve divisibility and min/max information in applyLoopGuards 2023-03-20 12:04:05 +02:00
ScalarEvolutionAliasAnalysis.cpp [AA] Allow for flow-sensitive analyses. 2022-12-15 21:04:38 -08:00
ScalarEvolutionDivision.cpp Revert "Revert "[SCEV] Add SCEVType to represent vscale."" 2023-03-02 13:14:07 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp [AA] Allow for flow-sensitive analyses. 2022-12-15 21:04:38 -08:00
StackLifetime.cpp [Analysis] Use *{Set,Map}::contains (NFC) 2023-03-14 00:32:40 -07:00
StackSafetyAnalysis.cpp [NFC] Use TypeSize::geFixedValue() instead of TypeSize::getFixedSize() 2023-01-11 16:49:38 +00:00
StratifiedSets.h Don't include Optional.h 2022-12-14 21:16:22 -08:00
SyncDependenceAnalysis.cpp Fix module build after TargetParser 2022-12-20 10:31:19 -08:00
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 [Analysis] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00
Trace.cpp
TrainingLogger.cpp [mlgo] Allow logging the spec for the "advice", if needed 2023-02-01 10:24:38 -08:00
TypeBasedAliasAnalysis.cpp [AA] Allow for flow-sensitive analyses. 2022-12-15 21:04:38 -08:00
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] llvm::Optional => std::optional 2022-12-14 07:32:24 +00:00

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

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