Name Last Update
..
models/inliner Loading commit data...
AliasAnalysis.cpp Loading commit data...
AliasAnalysisEvaluator.cpp Loading commit data...
AliasAnalysisSummary.cpp Loading commit data...
AliasAnalysisSummary.h Loading commit data...
AliasSetTracker.cpp Loading commit data...
Analysis.cpp Loading commit data...
AssumeBundleQueries.cpp Loading commit data...
AssumptionCache.cpp Loading commit data...
BasicAliasAnalysis.cpp Loading commit data...
BlockFrequencyInfo.cpp Loading commit data...
BlockFrequencyInfoImpl.cpp Loading commit data...
BranchProbabilityInfo.cpp Loading commit data...
CFG.cpp Loading commit data...
CFGPrinter.cpp Loading commit data...
CFLAndersAliasAnalysis.cpp Loading commit data...
CFLGraph.h Loading commit data...
CFLSteensAliasAnalysis.cpp Loading commit data...
CGSCCPassManager.cpp Loading commit data...
CMakeLists.txt Loading commit data...
CallGraph.cpp Loading commit data...
CallGraphSCCPass.cpp Loading commit data...
CallPrinter.cpp Loading commit data...
CaptureTracking.cpp Loading commit data...
CmpInstAnalysis.cpp Loading commit data...
CodeMetrics.cpp Loading commit data...
ConstantFolding.cpp Loading commit data...
CostModel.cpp Loading commit data...
DDG.cpp Loading commit data...
Delinearization.cpp Loading commit data...
DemandedBits.cpp Loading commit data...
DependenceAnalysis.cpp Loading commit data...
DependenceGraphBuilder.cpp Loading commit data...
DivergenceAnalysis.cpp Loading commit data...
DomPrinter.cpp Loading commit data...
DomTreeUpdater.cpp Loading commit data...
DominanceFrontier.cpp Loading commit data...
EHPersonalities.cpp Loading commit data...
GlobalsModRef.cpp Loading commit data...
GuardUtils.cpp Loading commit data...
HeatUtils.cpp Loading commit data...
IVDescriptors.cpp Loading commit data...
IVUsers.cpp Loading commit data...
IndirectCallPromotionAnalysis.cpp Loading commit data...
InlineAdvisor.cpp Loading commit data...
InlineCost.cpp Loading commit data...
InlineFeaturesAnalysis.cpp Loading commit data...
InlineSizeEstimatorAnalysis.cpp Loading commit data...
InstCount.cpp Loading commit data...
InstructionPrecedenceTracking.cpp Loading commit data...
InstructionSimplify.cpp Loading commit data...
Interval.cpp Loading commit data...
IntervalPartition.cpp Loading commit data...
LLVMBuild.txt Loading commit data...
LazyBlockFrequencyInfo.cpp Loading commit data...
LazyBranchProbabilityInfo.cpp Loading commit data...
LazyCallGraph.cpp Loading commit data...
LazyValueInfo.cpp Loading commit data...
LegacyDivergenceAnalysis.cpp Loading commit data...
Lint.cpp Loading commit data...
Loads.cpp Loading commit data...
LoopAccessAnalysis.cpp Loading commit data...
LoopAnalysisManager.cpp Loading commit data...
LoopCacheAnalysis.cpp Loading commit data...
LoopInfo.cpp Loading commit data...
LoopNestAnalysis.cpp Loading commit data...
LoopPass.cpp Loading commit data...
LoopUnrollAnalyzer.cpp Loading commit data...
MLInlineAdvisor.cpp Loading commit data...
MemDepPrinter.cpp Loading commit data...
MemDerefPrinter.cpp Loading commit data...
MemoryBuiltins.cpp Loading commit data...
MemoryDependenceAnalysis.cpp Loading commit data...
MemoryLocation.cpp Loading commit data...
MemorySSA.cpp Loading commit data...
MemorySSAUpdater.cpp Loading commit data...
ModuleDebugInfoPrinter.cpp Loading commit data...
ModuleSummaryAnalysis.cpp Loading commit data...
MustExecute.cpp Loading commit data...
ObjCARCAliasAnalysis.cpp Loading commit data...
ObjCARCAnalysisUtils.cpp Loading commit data...
ObjCARCInstKind.cpp Loading commit data...
OptimizationRemarkEmitter.cpp Loading commit data...
PHITransAddr.cpp Loading commit data...
PhiValues.cpp Loading commit data...
PostDominators.cpp Loading commit data...
ProfileSummaryInfo.cpp Loading commit data...
PtrUseVisitor.cpp Loading commit data...
README.txt Loading commit data...
RegionInfo.cpp Loading commit data...
RegionPass.cpp Loading commit data...
RegionPrinter.cpp Loading commit data...
ReleaseModeModelRunner.cpp Loading commit data...
ScalarEvolution.cpp Loading commit data...
ScalarEvolutionAliasAnalysis.cpp Loading commit data...
ScalarEvolutionDivision.cpp Loading commit data...
ScalarEvolutionNormalization.cpp Loading commit data...
ScopedNoAliasAA.cpp Loading commit data...
StackLifetime.cpp Loading commit data...
StackSafetyAnalysis.cpp Loading commit data...
StratifiedSets.h Loading commit data...
SyncDependenceAnalysis.cpp Loading commit data...
SyntheticCountsUtils.cpp Loading commit data...
TFUtils.cpp Loading commit data...
TargetLibraryInfo.cpp Loading commit data...
TargetTransformInfo.cpp Loading commit data...
Trace.cpp Loading commit data...
TypeBasedAliasAnalysis.cpp Loading commit data...
TypeMetadataUtils.cpp Loading commit data...
VFABIDemangling.cpp Loading commit data...
ValueLattice.cpp Loading commit data...
ValueLatticeUtils.cpp Loading commit data...
ValueTracking.cpp Loading commit data...
VectorUtils.cpp Loading commit data...
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))

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