llvm-for-llvmta/lib/Analysis
Nils Hölscher 3500bf8dde first commit 2022-04-25 10:02:23 +02:00
..
models/inliner first commit 2022-04-25 10:02:23 +02:00
AliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
AliasAnalysisEvaluator.cpp first commit 2022-04-25 10:02:23 +02:00
AliasAnalysisSummary.cpp first commit 2022-04-25 10:02:23 +02:00
AliasAnalysisSummary.h first commit 2022-04-25 10:02:23 +02:00
AliasSetTracker.cpp first commit 2022-04-25 10:02:23 +02:00
Analysis.cpp first commit 2022-04-25 10:02:23 +02:00
AssumeBundleQueries.cpp first commit 2022-04-25 10:02:23 +02:00
AssumptionCache.cpp first commit 2022-04-25 10:02:23 +02:00
BasicAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
BlockFrequencyInfo.cpp first commit 2022-04-25 10:02:23 +02:00
BlockFrequencyInfoImpl.cpp first commit 2022-04-25 10:02:23 +02:00
BranchProbabilityInfo.cpp first commit 2022-04-25 10:02:23 +02:00
CFG.cpp first commit 2022-04-25 10:02:23 +02:00
CFGPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
CFLAndersAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
CFLGraph.h first commit 2022-04-25 10:02:23 +02:00
CFLSteensAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
CGSCCPassManager.cpp first commit 2022-04-25 10:02:23 +02:00
CMakeLists.txt first commit 2022-04-25 10:02:23 +02:00
CallGraph.cpp first commit 2022-04-25 10:02:23 +02:00
CallGraphSCCPass.cpp first commit 2022-04-25 10:02:23 +02:00
CallPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
CaptureTracking.cpp first commit 2022-04-25 10:02:23 +02:00
CmpInstAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
CodeMetrics.cpp first commit 2022-04-25 10:02:23 +02:00
ConstantFolding.cpp first commit 2022-04-25 10:02:23 +02:00
ConstraintSystem.cpp first commit 2022-04-25 10:02:23 +02:00
CostModel.cpp first commit 2022-04-25 10:02:23 +02:00
DDG.cpp first commit 2022-04-25 10:02:23 +02:00
DDGPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
Delinearization.cpp first commit 2022-04-25 10:02:23 +02:00
DemandedBits.cpp first commit 2022-04-25 10:02:23 +02:00
DependenceAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
DependenceGraphBuilder.cpp first commit 2022-04-25 10:02:23 +02:00
DevelopmentModeInlineAdvisor.cpp first commit 2022-04-25 10:02:23 +02:00
DivergenceAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
DomPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
DomTreeUpdater.cpp first commit 2022-04-25 10:02:23 +02:00
DominanceFrontier.cpp first commit 2022-04-25 10:02:23 +02:00
EHPersonalities.cpp first commit 2022-04-25 10:02:23 +02:00
FunctionPropertiesAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
GlobalsModRef.cpp first commit 2022-04-25 10:02:23 +02:00
GuardUtils.cpp first commit 2022-04-25 10:02:23 +02:00
HeatUtils.cpp first commit 2022-04-25 10:02:23 +02:00
IRSimilarityIdentifier.cpp first commit 2022-04-25 10:02:23 +02:00
IVDescriptors.cpp first commit 2022-04-25 10:02:23 +02:00
IVUsers.cpp first commit 2022-04-25 10:02:23 +02:00
ImportedFunctionsInliningStatistics.cpp first commit 2022-04-25 10:02:23 +02:00
IndirectCallPromotionAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
InlineAdvisor.cpp first commit 2022-04-25 10:02:23 +02:00
InlineCost.cpp first commit 2022-04-25 10:02:23 +02:00
InlineSizeEstimatorAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
InstCount.cpp first commit 2022-04-25 10:02:23 +02:00
InstructionPrecedenceTracking.cpp first commit 2022-04-25 10:02:23 +02:00
InstructionSimplify.cpp first commit 2022-04-25 10:02:23 +02:00
Interval.cpp first commit 2022-04-25 10:02:23 +02:00
IntervalPartition.cpp first commit 2022-04-25 10:02:23 +02:00
LazyBlockFrequencyInfo.cpp first commit 2022-04-25 10:02:23 +02:00
LazyBranchProbabilityInfo.cpp first commit 2022-04-25 10:02:23 +02:00
LazyCallGraph.cpp first commit 2022-04-25 10:02:23 +02:00
LazyValueInfo.cpp first commit 2022-04-25 10:02:23 +02:00
LegacyDivergenceAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
Lint.cpp first commit 2022-04-25 10:02:23 +02:00
Loads.cpp first commit 2022-04-25 10:02:23 +02:00
LoopAccessAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
LoopAnalysisManager.cpp first commit 2022-04-25 10:02:23 +02:00
LoopCacheAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
LoopInfo.cpp first commit 2022-04-25 10:02:23 +02:00
LoopNestAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
LoopPass.cpp first commit 2022-04-25 10:02:23 +02:00
LoopUnrollAnalyzer.cpp first commit 2022-04-25 10:02:23 +02:00
MLInlineAdvisor.cpp first commit 2022-04-25 10:02:23 +02:00
MemDepPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
MemDerefPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
MemoryBuiltins.cpp first commit 2022-04-25 10:02:23 +02:00
MemoryDependenceAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
MemoryLocation.cpp first commit 2022-04-25 10:02:23 +02:00
MemorySSA.cpp first commit 2022-04-25 10:02:23 +02:00
MemorySSAUpdater.cpp first commit 2022-04-25 10:02:23 +02:00
ModuleDebugInfoPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
ModuleSummaryAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
MustExecute.cpp first commit 2022-04-25 10:02:23 +02:00
ObjCARCAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
ObjCARCAnalysisUtils.cpp first commit 2022-04-25 10:02:23 +02:00
ObjCARCInstKind.cpp first commit 2022-04-25 10:02:23 +02:00
OptimizationRemarkEmitter.cpp first commit 2022-04-25 10:02:23 +02:00
PHITransAddr.cpp first commit 2022-04-25 10:02:23 +02:00
PhiValues.cpp first commit 2022-04-25 10:02:23 +02:00
PostDominators.cpp first commit 2022-04-25 10:02:23 +02:00
ProfileSummaryInfo.cpp first commit 2022-04-25 10:02:23 +02:00
PtrUseVisitor.cpp first commit 2022-04-25 10:02:23 +02:00
README.txt first commit 2022-04-25 10:02:23 +02:00
RegionInfo.cpp first commit 2022-04-25 10:02:23 +02:00
RegionPass.cpp first commit 2022-04-25 10:02:23 +02:00
RegionPrinter.cpp first commit 2022-04-25 10:02:23 +02:00
ReleaseModeModelRunner.cpp first commit 2022-04-25 10:02:23 +02:00
ReplayInlineAdvisor.cpp first commit 2022-04-25 10:02:23 +02:00
ScalarEvolution.cpp first commit 2022-04-25 10:02:23 +02:00
ScalarEvolutionAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
ScalarEvolutionDivision.cpp first commit 2022-04-25 10:02:23 +02:00
ScalarEvolutionNormalization.cpp first commit 2022-04-25 10:02:23 +02:00
ScopedNoAliasAA.cpp first commit 2022-04-25 10:02:23 +02:00
StackLifetime.cpp first commit 2022-04-25 10:02:23 +02:00
StackSafetyAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
StratifiedSets.h first commit 2022-04-25 10:02:23 +02:00
SyncDependenceAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
SyntheticCountsUtils.cpp first commit 2022-04-25 10:02:23 +02:00
TFUtils.cpp first commit 2022-04-25 10:02:23 +02:00
TargetLibraryInfo.cpp first commit 2022-04-25 10:02:23 +02:00
TargetTransformInfo.cpp first commit 2022-04-25 10:02:23 +02:00
Trace.cpp first commit 2022-04-25 10:02:23 +02:00
TypeBasedAliasAnalysis.cpp first commit 2022-04-25 10:02:23 +02:00
TypeMetadataUtils.cpp first commit 2022-04-25 10:02:23 +02:00
VFABIDemangling.cpp first commit 2022-04-25 10:02:23 +02:00
ValueLattice.cpp first commit 2022-04-25 10:02:23 +02:00
ValueLatticeUtils.cpp first commit 2022-04-25 10:02:23 +02:00
ValueTracking.cpp first commit 2022-04-25 10:02:23 +02:00
VectorUtils.cpp first commit 2022-04-25 10:02:23 +02: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))

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