1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib/Analysis
Shiva Chen 17aab021be [BasicAA] Return MayAlias for the pointer plus variable offset to
structure object member

Differential Revision: https://reviews.llvm.org/D45510

llvm-svn: 330106
2018-04-16 01:58:39 +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 Add an analysis printer for must execute reasoning 2018-03-20 17:09:21 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp [BasicAA] Return MayAlias for the pointer plus variable offset to 2018-04-16 01:58:39 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp [Analysis] Change std::sort to llvm::sort in response to r327219 2018-04-01 01:46:51 +00:00
BranchProbabilityInfo.cpp Fix more spelling mistakes in comments of LLVM Analysis passes 2018-03-02 18:57:02 +00:00
CallGraph.cpp [Analysis] Change std::sort to llvm::sort in response to r327219 2018-04-01 01:46:51 +00:00
CallGraphSCCPass.cpp [NFC] OptPassGate extracted from OptBisect 2018-03-27 16:57:20 +00:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp [CFGVPrinter] Fix -dot-cfg-only 2017-12-19 15:20:18 +00:00
CFLAndersAliasAnalysis.cpp [Analysis] Change std::sort to llvm::sort in response to r327219 2018-04-01 01:46:51 +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 an analysis printer for must execute reasoning 2018-03-20 17:09:21 +00:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp [Evaluator] Evaluate load/store with bitcast 2018-03-13 10:19:50 +00:00
CostModel.cpp
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 [DA] Improve alias checking in dependence analysis 2018-04-10 11:37:21 +00:00
DivergenceAnalysis.cpp
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
InlineCost.cpp Don't inline @llvm.icall.branch.funnel 2018-04-04 21:46:27 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] fix formatting; NFC 2018-04-10 18:38:19 +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 [SLP] Fix PR36481: vectorize reassociated instructions. 2018-04-03 17:14:47 +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 [NFC] OptPassGate extracted from OptBisect 2018-03-27 16:57:20 +00:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp [Analysis] Support aligned new/delete functions. 2018-04-04 19:01:51 +00:00
MemoryDependenceAnalysis.cpp [Analysis] Change std::sort to llvm::sort in response to r327219 2018-04-01 01:46:51 +00:00
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] remove cruft; NFC. 2018-04-09 23:09:27 +00:00
MemorySSAUpdater.cpp [MemorySSAUpdater] Mark Phi users of a node being moved as non-optimize 2018-04-09 20:55:37 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [ThinLTO] Add an option to force summary call edges cold for debugging 2018-03-31 00:18:08 +00:00
MustExecute.cpp Make helpers static. NFC. 2018-04-04 11:45:11 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
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 Fix a typo in a comment; NFC 2018-04-12 18:36:01 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp [NFC] OptPassGate extracted from OptBisect 2018-03-27 16:57:20 +00:00
RegionPrinter.cpp
ScalarEvolution.cpp [NFC] Loosen restriction on preheader to fix buildbot 2018-04-06 07:23:45 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp [Analysis] Change std::sort to llvm::sort in response to r327219 2018-04-01 01:46:51 +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] Support aligned new/delete functions. 2018-04-04 19:01:51 +00:00
TargetTransformInfo.cpp [LV] Introduce TTI::getMinimumVF 2018-04-13 20:16:32 +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 [InstCombine] Simplify 'add' to 'or' if no common bits are set. 2018-04-15 18:59:33 +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))

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