1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib/Analysis
Tobias Grosser 7157394614 ScalerEvolution: Only erase temporary values if they actually have been added
This addresses post-review comments from Sanjoy Das for r261485.

llvm-svn: 261486
2016-02-21 18:50:09 +00:00
..
AliasAnalysis.cpp [PM/AA] Actually wire the AAManager I built for the new pass manager 2016-02-13 23:32:00 +00:00
AliasAnalysisEvaluator.cpp [PM/AA] Port alias analysis evaluator to the new pass manager, and use 2016-02-20 03:46:03 +00:00
AliasSetTracker.cpp [AliasSetTracker] Teach AliasSetTracker about MemSetInst 2016-02-17 02:01:50 +00:00
Analysis.cpp [PM/AA] Port alias analysis evaluator to the new pass manager, and use 2016-02-20 03:46:03 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +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 Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes. 2016-02-02 18:20:45 +00:00
BranchProbabilityInfo.cpp [BPI] Fix two potential divide-by-zero operations that are introduced in r256263. 2015-12-22 23:45:55 +00:00
CallGraph.cpp [Analysis/CallGraph] Switch dump() definitions over to LLVM_DUMP_METHOD. 2015-11-23 02:58:42 +00:00
CallGraphSCCPass.cpp Recommit r256952 "Filtering IR printing for print-after-all/print-before-all" 2016-01-06 22:55:03 +00:00
CallPrinter.cpp
CaptureTracking.cpp [CaptureTracking] Support atomicrmw and cmpxchg 2016-02-18 19:23:27 +00:00
CFG.cpp Avoid overly large SmallPtrSet/SmallSet 2016-01-30 01:24:31 +00:00
CFGPrinter.cpp
CFLAliasAnalysis.cpp [PM/AA] Wire up CFLAA to the new pass manager fully, and port one of its 2016-02-20 03:52:02 +00:00
CGSCCPassManager.cpp
CMakeLists.txt Factor out UnrollAnalyzer to Analysis, and add unit tests for it. 2016-02-08 23:03:59 +00:00
CodeMetrics.cpp Add convergent property to CodeMetrics. 2016-02-12 21:01:31 +00:00
ConstantFolding.cpp [ConstantFolding] Reduce APInt and APFloat copying. 2016-02-13 16:54:14 +00:00
CostModel.cpp Implemented cost model for masked gather and scatter operations 2015-12-28 20:10:59 +00:00
Delinearization.cpp SCEV: Allow simple AddRec * Parameter products in delinearization 2015-10-12 08:02:00 +00:00
DemandedBits.cpp [DemandedBits] Revert r249687 due to PR26071 2016-02-03 15:05:06 +00:00
DependenceAnalysis.cpp [SCEV] Add and use SCEVConstant::getAPInt; NFCI 2015-12-17 20:28:46 +00:00
DivergenceAnalysis.cpp Make some headers self-contained, remove unused includes that violate layering. 2016-01-27 16:05:37 +00:00
DominanceFrontier.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
DomPrinter.cpp
EHPersonalities.cpp [WinEH] Rename CatchReturnInst::getParentPad, NFC 2016-01-15 21:16:19 +00:00
GlobalsModRef.cpp [GMR/OperandBundles] Teach getModRefBehavior about operand bundles 2016-02-09 02:31:47 +00:00
InlineCost.cpp CallAnalyzer::analyzeCall: change the condition back to "Cost < Threshold" 2016-02-05 20:32:42 +00:00
InstCount.cpp
InstructionSimplify.cpp [opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr. 2016-01-22 01:17:26 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
LazyCallGraph.cpp [LCG] Construct an actual call graph with call-edge SCCs nested inside 2016-02-17 00:18:16 +00:00
LazyValueInfo.cpp [LVI] Move ConstantRanges instead of copying. 2016-02-20 10:40:34 +00:00
Lint.cpp [opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just the pointer. 2016-01-22 01:51:51 +00:00
LLVMBuild.txt
Loads.cpp Make context-sensitive isDereferenceable queries in isSafeToLoadUnconditionally 2016-02-11 13:42:59 +00:00
LoopAccessAnalysis.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
LoopInfo.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
LoopPass.cpp LoopInfo: Simplify ownership of Loop objects 2016-01-08 19:08:53 +00:00
LoopUnrollAnalyzer.cpp Factor out UnrollAnalyzer to Analysis, and add unit tests for it. 2016-02-08 23:03:59 +00:00
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 [MemoryBuiltins] Fix an issue with hasNoAliasAttr 2016-02-09 21:54:18 +00:00
MemoryDependenceAnalysis.cpp When MemoryDependenceAnalysis hits a CFG with many transparent blocks, 2016-02-20 11:24:44 +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 Add support for objc_unsafeClaimAutoreleasedReturnValue to the 2016-01-27 19:05:08 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
PostDominators.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp ScalerEvolution: Only erase temporary values if they actually have been added 2016-02-21 18:50:09 +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 [SCEVExpander] Make findExistingExpansion smarter 2016-02-16 06:46:58 +00:00
ScalarEvolutionNormalization.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
ScopedNoAliasAA.cpp rangify; NFCI 2016-01-13 18:37:28 +00:00
SparsePropagation.cpp Analysis: Remove implicit ilist iterator conversions 2015-10-10 00:53:03 +00:00
StratifiedSets.h
TargetLibraryInfo.cpp Disable all standard lib functions for NVVM. 2016-01-26 23:51:06 +00:00
TargetTransformInfo.cpp [TTI] Add getPrefetchDistance from PPCLoopDataPrefetch, NFC 2016-01-27 22:21:25 +00:00
Trace.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
TypeBasedAliasAnalysis.cpp fix typo 2016-01-13 16:34:10 +00:00
ValueTracking.cpp Remove uses of builtin comma operator. 2016-02-18 22:09:30 +00:00
VectorUtils.cpp [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +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))

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