llvm-6502/lib/Analysis
Gabor Greif a6aac4c5bc eliminate CallInst::ArgOffset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-16 09:38:02 +00:00
..
IPA cache result of operator* 2010-07-09 16:22:36 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp
AliasDebugger.cpp
AliasSetTracker.cpp
Analysis.cpp
BasicAliasAnalysis.cpp Minore code simplification. 2010-07-07 14:30:04 +00:00
CaptureTracking.cpp
CFGPrinter.cpp
CMakeLists.txt
ConstantFolding.cpp eliminate CallInst::ArgOffset 2010-07-16 09:38:02 +00:00
DbgInfoPrinter.cpp
DebugInfo.cpp Reverting r107918 and r107919. Radar 8063111. 2010-07-08 23:25:39 +00:00
DomPrinter.cpp Convert some tab stops into spaces. 2010-07-12 08:16:59 +00:00
InlineCost.cpp
InstCount.cpp
InstructionSimplify.cpp Fix PR7647, handling the case when 'To' ends up being 2010-07-15 06:36:08 +00:00
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp
LazyValueInfo.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Add a lint check for mismatched return types, inspired by PR6944. 2010-07-12 18:02:04 +00:00
LiveValues.cpp
Loads.cpp
LoopDependenceAnalysis.cpp
LoopInfo.cpp cache result of operator* 2010-07-09 14:28:41 +00:00
LoopPass.cpp
Makefile
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
ModuleDebugInfoPrinter.cpp
PHITransAddr.cpp
PointerTracking.cpp
PostDominators.cpp cache result of operator* 2010-07-09 15:52:36 +00:00
ProfileEstimatorPass.cpp
ProfileInfo.cpp cache another dereferenced iterator 2010-07-15 10:19:23 +00:00
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt
ScalarEvolution.cpp Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef. 2010-07-15 20:02:11 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Fix the order that SCEVExpander considers add operands in so that 2010-07-15 23:38:13 +00:00
ScalarEvolutionNormalization.cpp
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))

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