android13/external/llvm/lib/Analysis
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
AliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
AliasAnalysisEvaluator.cpp initial 2024-06-22 20:45:49 +08:00
AliasAnalysisSummary.cpp initial 2024-06-22 20:45:49 +08:00
AliasAnalysisSummary.h initial 2024-06-22 20:45:49 +08:00
AliasSetTracker.cpp initial 2024-06-22 20:45:49 +08:00
Analysis.cpp initial 2024-06-22 20:45:49 +08:00
Android.bp initial 2024-06-22 20:45:49 +08:00
AssumptionCache.cpp initial 2024-06-22 20:45:49 +08:00
BasicAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
BlockFrequencyInfo.cpp initial 2024-06-22 20:45:49 +08:00
BlockFrequencyInfoImpl.cpp initial 2024-06-22 20:45:49 +08:00
BranchProbabilityInfo.cpp initial 2024-06-22 20:45:49 +08:00
CFG.cpp initial 2024-06-22 20:45:49 +08:00
CFGPrinter.cpp initial 2024-06-22 20:45:49 +08:00
CFLAndersAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
CFLGraph.h initial 2024-06-22 20:45:49 +08:00
CFLSteensAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
CGSCCPassManager.cpp initial 2024-06-22 20:45:49 +08:00
CMakeLists.txt initial 2024-06-22 20:45:49 +08:00
CallGraph.cpp initial 2024-06-22 20:45:49 +08:00
CallGraphSCCPass.cpp initial 2024-06-22 20:45:49 +08:00
CallPrinter.cpp initial 2024-06-22 20:45:49 +08:00
CaptureTracking.cpp initial 2024-06-22 20:45:49 +08:00
CodeMetrics.cpp initial 2024-06-22 20:45:49 +08:00
ConstantFolding.cpp initial 2024-06-22 20:45:49 +08:00
CostModel.cpp initial 2024-06-22 20:45:49 +08:00
Delinearization.cpp initial 2024-06-22 20:45:49 +08:00
DemandedBits.cpp initial 2024-06-22 20:45:49 +08:00
DependenceAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
DivergenceAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
DomPrinter.cpp initial 2024-06-22 20:45:49 +08:00
DominanceFrontier.cpp initial 2024-06-22 20:45:49 +08:00
EHPersonalities.cpp initial 2024-06-22 20:45:49 +08:00
GlobalsModRef.cpp initial 2024-06-22 20:45:49 +08:00
IVUsers.cpp initial 2024-06-22 20:45:49 +08:00
IndirectCallPromotionAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
InlineCost.cpp initial 2024-06-22 20:45:49 +08:00
InstCount.cpp initial 2024-06-22 20:45:49 +08:00
InstructionSimplify.cpp initial 2024-06-22 20:45:49 +08:00
Interval.cpp initial 2024-06-22 20:45:49 +08:00
IntervalPartition.cpp initial 2024-06-22 20:45:49 +08:00
IteratedDominanceFrontier.cpp initial 2024-06-22 20:45:49 +08:00
LLVMBuild.txt initial 2024-06-22 20:45:49 +08:00
LazyBlockFrequencyInfo.cpp initial 2024-06-22 20:45:49 +08:00
LazyCallGraph.cpp initial 2024-06-22 20:45:49 +08:00
LazyValueInfo.cpp initial 2024-06-22 20:45:49 +08:00
Lint.cpp initial 2024-06-22 20:45:49 +08:00
Loads.cpp initial 2024-06-22 20:45:49 +08:00
LoopAccessAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
LoopInfo.cpp initial 2024-06-22 20:45:49 +08:00
LoopPass.cpp initial 2024-06-22 20:45:49 +08:00
LoopPassManager.cpp initial 2024-06-22 20:45:49 +08:00
LoopUnrollAnalyzer.cpp initial 2024-06-22 20:45:49 +08:00
MemDepPrinter.cpp initial 2024-06-22 20:45:49 +08:00
MemDerefPrinter.cpp initial 2024-06-22 20:45:49 +08:00
MemoryBuiltins.cpp initial 2024-06-22 20:45:49 +08:00
MemoryDependenceAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
MemoryLocation.cpp initial 2024-06-22 20:45:49 +08:00
ModuleDebugInfoPrinter.cpp initial 2024-06-22 20:45:49 +08:00
ModuleSummaryAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
ObjCARCAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
ObjCARCAnalysisUtils.cpp initial 2024-06-22 20:45:49 +08:00
ObjCARCInstKind.cpp initial 2024-06-22 20:45:49 +08:00
OrderedBasicBlock.cpp initial 2024-06-22 20:45:49 +08:00
PHITransAddr.cpp initial 2024-06-22 20:45:49 +08:00
PostDominators.cpp initial 2024-06-22 20:45:49 +08:00
ProfileSummaryInfo.cpp initial 2024-06-22 20:45:49 +08:00
PtrUseVisitor.cpp initial 2024-06-22 20:45:49 +08:00
README.txt initial 2024-06-22 20:45:49 +08:00
RegionInfo.cpp initial 2024-06-22 20:45:49 +08:00
RegionPass.cpp initial 2024-06-22 20:45:49 +08:00
RegionPrinter.cpp initial 2024-06-22 20:45:49 +08:00
ScalarEvolution.cpp initial 2024-06-22 20:45:49 +08:00
ScalarEvolutionAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
ScalarEvolutionExpander.cpp initial 2024-06-22 20:45:49 +08:00
ScalarEvolutionNormalization.cpp initial 2024-06-22 20:45:49 +08:00
ScopedNoAliasAA.cpp initial 2024-06-22 20:45:49 +08:00
SparsePropagation.cpp initial 2024-06-22 20:45:49 +08:00
StratifiedSets.h initial 2024-06-22 20:45:49 +08:00
TargetLibraryInfo.cpp initial 2024-06-22 20:45:49 +08:00
TargetTransformInfo.cpp initial 2024-06-22 20:45:49 +08:00
Trace.cpp initial 2024-06-22 20:45:49 +08:00
TypeBasedAliasAnalysis.cpp initial 2024-06-22 20:45:49 +08:00
TypeMetadataUtils.cpp initial 2024-06-22 20:45:49 +08:00
ValueTracking.cpp initial 2024-06-22 20:45:49 +08:00
VectorUtils.cpp initial 2024-06-22 20:45:49 +08: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))

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