1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Analysis
Sanjoy Das e90f281076 Introduce a range version of std::any_of, and use it in SCEV
Reviewers: dblaikie, pcc

Subscribers: llvm-commits

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

llvm-svn: 254390
2015-12-01 07:49:23 +00:00
..
AliasAnalysis.cpp [AliasAnalysis] CatchPad and CatchRet can modify escaped memory 2015-11-17 08:15:14 +00:00
AliasAnalysisEvaluator.cpp Default SetVector to use a DenseSet. 2015-11-18 06:52:18 +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 Replace all weight-based interfaces in MBB with probability-based interfaces, and update all uses of old interfaces. 2015-12-01 05:29:22 +00:00
CallGraph.cpp [Analysis/CallGraph] Switch dump() definitions over to LLVM_DUMP_METHOD. 2015-11-23 02:58:42 +00:00
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 Add some constantness to GetSuccessorNumber(). 2015-11-20 23:02:06 +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 Remove unnecessary intermediate lambda. NFC 2015-11-29 04:37:14 +00:00
InlineCost.cpp Revert r252990. 2015-11-13 01:44:32 +00:00
InstCount.cpp
InstructionSimplify.cpp Remove unnecessary intermediate lambda. NFC 2015-11-29 04:37:14 +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 Revert "Change memcpy/memset/memmove to have dest and source alignments." 2015-11-19 05:56:52 +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 "Revert "Strip metadata when speculatively hoisting instructions (r252604)" 2015-11-18 14:50:18 +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 Specify explicit storage type for AllocType. NFC. 2015-11-17 19:48:06 +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 Introduce a range version of std::any_of, and use it in SCEV 2015-12-01 07:49:23 +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] Use C++isms; NFC 2015-11-21 23:20:10 +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] Use MapVector rather than DenseMap for MinBWs. 2015-11-26 20:39:51 +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))

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