1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Analysis
Serguei Katkov f7b67d048b [SCEV] Factor out isKnownViaInduction. NFC.
This just extracts the isKnownViaInduction from isKnownPredicate.

Reviewers: sanjoy, mkazantsev, reames
Reviewed By: mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44554

llvm-svn: 327824
2018-03-19 08:32:09 +00:00
..
AliasAnalysis.cpp [ModRefInfo] Return NoModRef for Must and NoModRef. 2018-01-19 10:26:40 +00:00
AliasAnalysisEvaluator.cpp [ModRefInfo] Add must alias info to ModRefInfo. 2017-12-21 21:41:53 +00:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
AliasSetTracker.cpp
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp [ModRefInfo] Return NoModRef for Must and NoModRef. 2018-01-19 10:26:40 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
BranchProbabilityInfo.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp [CFGVPrinter] Fix -dot-cfg-only 2017-12-19 15:20:18 +00:00
CFLAndersAliasAnalysis.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp Fixed spelling mistake in comments of LLVM Analysis passes 2018-02-28 19:08:52 +00:00
CMakeLists.txt Add a pass to generate synthetic function entry counts. 2018-01-09 19:39:35 +00:00
CmpInstAnalysis.cpp
CodeMetrics.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ConstantFolding.cpp [Evaluator] Evaluate load/store with bitcast 2018-03-13 10:19:50 +00:00
CostModel.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
Delinearization.cpp [NFC] Consolidate six getPointerOperand() utility functions into one place 2018-03-09 21:05:58 +00:00
DemandedBits.cpp Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
DependenceAnalysis.cpp [NFC] Consolidate six getPointerOperand() utility functions into one place 2018-03-09 21:05:58 +00:00
DivergenceAnalysis.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp [GlobalsAA] Fix a pretty terrible bug that has been in GlobalsAA for 2018-03-16 23:51:33 +00:00
IndirectCallPromotionAnalysis.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
InlineCost.cpp Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] loosen FMF for sqrt(X) * sqrt(X) --> X 2018-03-18 14:12:25 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
LazyValueInfo.cpp [LazyValueInfo] PR33357 prevent infinite recursion on BinaryOperator 2018-03-13 18:14:10 +00:00
Lint.cpp [Lint] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFCI) 2018-01-31 16:42:15 +00:00
LLVMBuild.txt
Loads.cpp Adding a width of the GEP index to the Data Layout. 2018-02-14 06:58:08 +00:00
LoopAccessAnalysis.cpp [NFC] Consolidate six getPointerOperand() utility functions into one place 2018-03-09 21:05:58 +00:00
LoopAnalysisManager.cpp Fixed spelling mistake in comments of LLVM Analysis passes 2018-02-28 19:08:52 +00:00
LoopInfo.cpp
LoopPass.cpp Follow-up for r324429: "[LCSSAVerification] Run verification only when asserts are enabled." 2018-02-07 04:24:44 +00:00
LoopUnrollAnalyzer.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
MemDepPrinter.cpp
MemDerefPrinter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
MemoryBuiltins.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
MemoryDependenceAnalysis.cpp [MDA] Use common code instead of reimplementing same. [NFC] 2018-01-17 19:57:19 +00:00
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] Fix comment + remove redundant dyn_casts; NFC 2018-03-11 04:16:12 +00:00
MemorySSAUpdater.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ModuleDebugInfoPrinter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
ModuleSummaryAnalysis.cpp [ThinLTO] Add funtions in callees metadata to CallGraphEdges 2018-03-13 04:26:58 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp [Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees 2018-02-28 11:00:08 +00:00
ProfileSummaryInfo.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp Remove redundant includes from lib/Analysis. 2017-12-13 21:30:41 +00:00
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Factor out isKnownViaInduction. NFC. 2018-03-19 08:32:09 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StratifiedSets.h
SyntheticCountsUtils.cpp Remove CallGraphTraits and use equivalent methods in GraphTraits 2018-02-01 19:40:35 +00:00
TargetLibraryInfo.cpp [Analysis] Disable calls to *_finite and other glibc-only functions on Android. 2018-01-31 19:12:50 +00:00
TargetTransformInfo.cpp [LoopStrengthReduce, x86] don't add cost for a cmp that will be macro-fused (PR35681) 2018-02-05 23:43:05 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [NFC] Factor out a helper function for checking if a block has a potential early implicit exit. 2018-03-08 21:25:30 +00:00
VectorUtils.cpp Fixed spelling mistake in comments of LLVM Analysis passes 2018-02-28 19:08:52 +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))

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