1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Analysis
Peter Collingbourne 19d18aa6de MemorySSA: Revert r269678 and r268068; replace with special casing in MemorySSA.
It turns out that too many passes are relying on alias analysis results
for control dependencies. Until we fix that by introducing a more accurate
modelling of control dependencies, special case assume in MemorySSA instead.

Also introduce tests to ensure we don't regress the FunctionAttrs or LICM
passes.

Differential Revision: http://reviews.llvm.org/D20658

llvm-svn: 270823
2016-05-26 04:58:46 +00:00
..
AliasAnalysis.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
AliasAnalysisEvaluator.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
AliasSetTracker.cpp [AliasSetTracker] Correctly handle changing the size of an entry 2016-04-14 22:00:11 +00:00
Analysis.cpp [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
AssumptionCache.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
BasicAliasAnalysis.cpp MemorySSA: Revert r269678 and r268068; replace with special casing in MemorySSA. 2016-05-26 04:58:46 +00:00
BitSetUtils.cpp Re-apply r269081 and r269082 with a fix for MSVC. 2016-05-10 18:07:21 +00:00
BlockFrequencyInfo.cpp [PM] port Branch Frequency Analaysis pass to new PM 2016-05-05 21:13:27 +00:00
BlockFrequencyInfoImpl.cpp fix spelling; NFC 2016-05-09 16:07:45 +00:00
BranchProbabilityInfo.cpp [PM] Port Branch Probability Analysis pass to the new pass manager. 2016-05-05 02:59:57 +00:00
CallGraph.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
CallGraphSCCPass.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
CallPrinter.cpp [CG] Rename the DOT printing pass to actually reference "DOT". 2016-03-10 11:04:40 +00:00
CaptureTracking.cpp Fold compares irrespective of whether allocation can be elided 2016-05-03 14:58:21 +00:00
CFG.cpp
CFGPrinter.cpp
CFLAliasAnalysis.cpp [CFLAA] Fix a use-of-invalid-pointer bug. 2016-05-02 18:09:19 +00:00
CGSCCPassManager.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
CMakeLists.txt Re-apply r269081 and r269082 with a fix for MSVC. 2016-05-10 18:07:21 +00:00
CodeMetrics.cpp use range-based for loop; NFCI 2016-03-08 20:53:48 +00:00
ConstantFolding.cpp [ConstantFolding, ValueTracking] Fold constants involving bitcasts of ConstantVector 2016-05-04 06:13:33 +00:00
CostModel.cpp [CodeGen] Teach LLVM how to lower @llvm.{min,max}num to {MIN,MAX}NAN 2016-04-14 07:13:24 +00:00
Delinearization.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DemandedBits.cpp Port DemandedBits to the new pass manager. 2016-04-18 23:55:01 +00:00
DependenceAnalysis.cpp [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
DivergenceAnalysis.cpp DivergenceAnalysis: Fix crash with no return blocks 2016-05-09 16:57:08 +00:00
DominanceFrontier.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
DomPrinter.cpp
EHPersonalities.cpp Add Rust's personality function to the list of known personality functions 2016-03-15 20:35:45 +00:00
GlobalsModRef.cpp Don't IPO over functions that can be de-refined 2016-04-08 00:48:30 +00:00
InlineCost.cpp Allow -inline-threshold to override default threshold. 2016-05-19 23:02:09 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] use computeKnownBits on shift amount operands 2016-05-10 20:46:54 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp Correct IDF calculator for ReverseIDF 2016-04-19 06:13:28 +00:00
IVUsers.cpp
LazyCallGraph.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
LazyValueInfo.cpp [LazyValueInfo] Simplify return after else. NFCI. 2016-05-25 22:29:34 +00:00
Lint.cpp
LLVMBuild.txt Revert r269131 2016-05-10 23:26:04 +00:00
Loads.cpp NFC. Introduce Value::isPointerDereferenceable 2016-05-11 14:43:28 +00:00
LoopAccessAnalysis.cpp [LAA] Check independence of strided accesses before forward case 2016-05-19 15:37:19 +00:00
LoopInfo.cpp Look for a loop's starting location in the llvm.loop metadata 2016-05-25 21:42:37 +00:00
LoopPass.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
LoopPassManager.cpp PM: Check that loop passes preserve a basic set of analyses 2016-05-03 21:35:08 +00:00
LoopUnrollAnalyzer.cpp [LoopUnrollAnalyzer] Fix a crash in UnrolledInstAnalyzer::visitCastInst. 2016-05-24 22:59:58 +00:00
MemDepPrinter.cpp [PM] Port memdep to the new pass manager. 2016-03-10 00:55:30 +00:00
MemDerefPrinter.cpp
MemoryBuiltins.cpp Calculate __builtin_object_size when pointer depends on a condition 2016-04-13 12:25:25 +00:00
MemoryDependenceAnalysis.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
MemoryLocation.cpp [TLI] Unify LibFunc signature checking. NFCI. 2016-04-27 19:04:35 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function 2016-05-06 08:25:33 +00:00
ObjCARCAliasAnalysis.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] No-wrap flags are not propagated when folding "{S,+,X}+T ==> {S+T,+,X}" 2016-05-25 13:01:33 +00:00
ScalarEvolutionAliasAnalysis.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
ScalarEvolutionExpander.cpp [SCEVExpander] Fix a failed cast<> assertion 2016-05-11 17:41:41 +00:00
ScalarEvolutionNormalization.cpp Remove emacs mode markers from .cpp files. NFC 2016-04-24 17:55:41 +00:00
ScopedNoAliasAA.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
SparsePropagation.cpp
StratifiedSets.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
TargetLibraryInfo.cpp [TLI] Also cover Linux 64 libfunc (stat64, ...) prototype checking. 2016-05-25 21:16:33 +00:00
TargetTransformInfo.cpp [TTI] Add hook for vector extract with extension 2016-04-27 15:20:21 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp [PM] Make the AnalysisManager parameter to run methods a reference. 2016-03-11 11:05:24 +00:00
ValueTracking.cpp [ValueTracking, InstSimplify] extend isKnownNonZero() to handle vector constants 2016-05-24 14:18:49 +00:00
VectorUtils.cpp Revert "[VectorUtils] Query number of sign bits to allow more truncations" 2016-05-10 12:27:23 +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))

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