llvm-6502/lib/Analysis
David Majnemer 821c6f765a InstSimplify: Don't bother if getScalarSizeInBits returns zero
getScalarSizeInBits returns zero when the comparison operands are not
integral.  No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224675 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-20 04:45:33 +00:00
..
IPA Remove the unused FindUsedTypes pass. 2014-11-24 20:53:26 +00:00
AliasAnalysis.cpp Sink store based on alias analysis 2014-12-15 14:09:53 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp AliasSet: Simplify mergeSetIn 2014-11-19 19:36:18 +00:00
Analysis.cpp
AssumptionTracker.cpp
BasicAliasAnalysis.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp BFI: Saturate when combining edges to a successor 2014-12-05 19:13:42 +00:00
BranchProbabilityInfo.cpp IR: Split Metadata from Value 2014-12-09 18:38:53 +00:00
CaptureTracking.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
CFG.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
CFGPrinter.cpp
CFLAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt
CodeMetrics.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
ConstantFolding.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
CostModel.cpp
Delinearization.cpp
DependenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
FunctionTargetTransformInfo.cpp
InstCount.cpp
InstructionSimplify.cpp InstSimplify: Don't bother if getScalarSizeInBits returns zero 2014-12-20 04:45:33 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
JumpInstrTableInfo.cpp
LazyCallGraph.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
LazyValueInfo.cpp LazyValueInfo: Actually re-visit partially solved block-values in solveBlockValue() 2014-11-25 17:23:05 +00:00
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
LLVMBuild.txt
Loads.cpp Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite 2014-11-25 08:20:27 +00:00
LoopInfo.cpp
LoopPass.cpp
Makefile
MemDepPrinter.cpp
MemoryBuiltins.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
MemoryDependenceAnalysis.cpp Remove redundant assignment. 2014-12-19 11:29:34 +00:00
ModuleDebugInfoPrinter.cpp
NoAliasAnalysis.cpp
PHITransAddr.cpp
PostDominators.cpp
PtrUseVisitor.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Teach ScalarEvolution to exploit min and max expressions when proving 2014-12-15 22:50:15 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
TargetTransformInfo.cpp Loop Vectorizer minor changes in the code - 2014-12-14 09:43:50 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp IR: Split Metadata from Value 2014-12-09 18:38:53 +00:00
ValueTracking.cpp ValueTracking: Don't recurse too deeply in computeKnownBitsFromAssume 2014-12-12 23:59:29 +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))

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