1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib/Analysis
Akira Hatanaka a41bf2744e Revert r252990.
Some of the buildbots are still failing.

llvm-svn: 252999
2015-11-13 01:44:32 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasSetTracker.cpp Revert "r251451 - [AliasSetTracker] Use mod/ref information for UnknownInstr" 2015-10-28 22:13:41 +00:00
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis 2015-11-05 21:07:12 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp
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
CFGPrinter.cpp
CFLAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp
CostModel.cpp Refactor: Simplify boolean conditional return statements in llvm/lib/Analysis 2015-11-05 21:07:12 +00:00
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
GlobalsModRef.cpp
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
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
Lint.cpp
LLVMBuild.txt
Loads.cpp
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
MemDerefPrinter.cpp
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Re-apply r251050 with a for PR25421 2015-11-05 23:45:38 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp ADT: Remove last implicit ilist iterator conversions, NFC 2015-11-07 00:01:16 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
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
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))

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