1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Analysis
David Majnemer 7fe7d83fab [AliasAnalysis] CatchPad and CatchRet can modify escaped memory
CatchPad and CatchRet behave a lot like function calls: they can
potentially modify any memory which has been escaped.

llvm-svn: 253323
2015-11-17 08:15:14 +00:00
..
AliasAnalysis.cpp [AliasAnalysis] CatchPad and CatchRet can modify escaped memory 2015-11-17 08:15:14 +00:00
AliasAnalysisEvaluator.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
AliasSetTracker.cpp Revert "r251451 - [AliasSetTracker] Use mod/ref information for UnknownInstr" 2015-10-28 22:13:41 +00:00
Analysis.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp Fix a typo in BasicAliasAnalysis 2015-11-17 08:15:08 +00:00
BlockFrequencyInfo.cpp Recommit r250345, it was reverted in r250366 to investigate a bot failure. 2015-10-15 14:59:40 +00:00
BlockFrequencyInfoImpl.cpp Recommit r250345, it was reverted in r250366 to investigate a bot failure. 2015-10-15 14:59:40 +00:00
BranchProbabilityInfo.cpp Check the case that the numerator and denominator are both zeros when getting edge probabilities in BPI and return 100% in this case. 2015-10-26 18:00:17 +00:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis 2015-11-05 21:07:12 +00:00
CFG.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
CFGPrinter.cpp
CFLAliasAnalysis.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
CGSCCPassManager.cpp
CMakeLists.txt [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
CodeMetrics.cpp Use all_of to simplify control flow. NFC. 2015-10-24 19:30:37 +00:00
ConstantFolding.cpp
CostModel.cpp Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis 2015-11-05 21:07:12 +00:00
Delinearization.cpp SCEV: Allow simple AddRec * Parameter products in delinearization 2015-10-12 08:02:00 +00:00
DemandedBits.cpp Compute demanded bits for icmp instructions 2015-10-08 12:40:06 +00:00
DependenceAnalysis.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
DivergenceAnalysis.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
DominanceFrontier.cpp
DomPrinter.cpp
GlobalsModRef.cpp [GlobalsAA] An indirect global that is initialized is not fair game 2015-10-28 10:41:29 +00:00
InlineCost.cpp Revert r252990. 2015-11-13 01:44:32 +00:00
InstCount.cpp
InstructionSimplify.cpp [ValueTracking] Add parameters to isImpliedCondition; NFC 2015-11-06 19:01:08 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
LazyCallGraph.cpp
LazyValueInfo.cpp [LVI] Update a comment to clarify what's actually happening and why 2015-11-04 01:47:04 +00:00
LibCallSemantics.cpp [WinEH] Recognize CoreCLR personality function 2015-10-06 20:28:16 +00:00
Lint.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
LLVMBuild.txt
Loads.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
LoopAccessAnalysis.cpp Fix LoopAccessAnalysis when potentially nullptr check are involved 2015-11-05 05:49:43 +00:00
LoopInfo.cpp Revert "Strip metadata when speculatively hoisting instructions" 2015-11-10 18:01:16 +00:00
LoopPass.cpp PM: Rephrase PrintLoopPass as a wrapper around a new-style pass. NFC 2015-11-04 22:24:08 +00:00
Makefile
MemDepPrinter.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
MemDerefPrinter.cpp
MemoryBuiltins.cpp Use find_if to simplify control flow. NFC. 2015-10-24 19:03:15 +00:00
MemoryDependenceAnalysis.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ObjCARCAliasAnalysis.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Move helper classes into anonymous namespaces. NFC. 2015-11-16 09:01:28 +00:00
ScalarEvolutionAliasAnalysis.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
ScalarEvolutionExpander.cpp ADT: Remove last implicit ilist iterator conversions, NFC 2015-11-07 00:01:16 +00:00
ScalarEvolutionNormalization.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
ScopedNoAliasAA.cpp Fix Clang-tidy modernize-use-nullptr warnings in source directories and generated files; other minor cleanups. 2015-10-06 23:24:35 +00:00
SparsePropagation.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
StratifiedSets.h
TargetLibraryInfo.cpp [TargetLibraryInfo] Add support for fls, flsl, flsll. 2015-11-09 23:23:20 +00:00
TargetTransformInfo.cpp Revert r243347 "Add TargetTransformInfo::isZExtFree." 2015-11-12 20:51:52 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
ValueTracking.cpp [ValueTracking] Remove untested / unreachable code, NFC 2015-11-11 00:16:41 +00:00
VectorUtils.cpp [LoopVectorize] Address post-commit feedback on r250032 2015-11-09 14:32:05 +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))

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