llvm-6502/lib/Analysis
Dan Gohman fd447eff22 The FoldingSet hash data includes pointer values, so it isn't
determinstic. Instead, give SCEV objects an arbitrary sequence
number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105548 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 19:36:14 +00:00
..
IPA Create new accessors to get arguments for call/invoke instructions. It breaks 2010-06-07 19:05:06 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp Fix AliasDebugger to be aware of operand values too. 2010-05-28 22:31:51 +00:00
AliasSetTracker.cpp
Analysis.cpp
BasicAliasAnalysis.cpp
CaptureTracking.cpp
CFGPrinter.cpp
CMakeLists.txt Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of 2010-05-28 16:19:17 +00:00
ConstantFolding.cpp
DbgInfoPrinter.cpp
DebugInfo.cpp Revert 105492 & 105493 due to a testcase regression. Radar 7424645. 2010-06-05 00:39:29 +00:00
DomPrinter.cpp
InlineCost.cpp Avoid counting InlineAsm as a call - it prevents loop unrolling. 2010-05-26 22:40:28 +00:00
InstCount.cpp
InstructionSimplify.cpp
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
LazyValueInfo.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Fix the noalias checking so that it doesn't worry about 2010-06-01 20:51:40 +00:00
LiveValues.cpp
Loads.cpp Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of 2010-05-28 16:19:17 +00:00
LoopDependenceAnalysis.cpp
LoopInfo.cpp
LoopPass.cpp
Makefile
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
ModuleDebugInfoPrinter.cpp Add a simple module-level debug info printer. It just sets up a 2010-05-07 16:22:32 +00:00
PHITransAddr.cpp
PointerTracking.cpp
PostDominators.cpp
ProfileEstimatorPass.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt When checking whether the special handling for an addrec increment which 2010-04-26 21:46:36 +00:00
ScalarEvolution.cpp The FoldingSet hash data includes pointer values, so it isn't 2010-06-07 19:36:14 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp LSR needs to remember inserted instructions even in postinc mode, because 2010-06-05 00:33:07 +00:00
ScalarEvolutionNormalization.cpp Fix normalization and de-normalization of non-affine SCEVs. 2010-06-04 19:16:34 +00:00
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp

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))

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