llvm-6502/lib/Analysis
Eli Friedman e2f93131fb Revert r108401; it breaks bootstrap :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 05:09:31 +00:00
..
IPA cache result of operator* 2010-07-09 16:22:36 +00:00
AliasAnalysis.cpp Remove interprocedural-basic-aa and associated code. The AliasAnalysis 2010-07-07 14:27:09 +00:00
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp Remove interprocedural-basic-aa and associated code. The AliasAnalysis 2010-07-07 14:27:09 +00:00
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 Add parentheses around an || to correct the logic. Also silences a GCC warning 2010-07-12 06:47:05 +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 Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can be reused from PartialSpecializationCost 2010-06-09 15:11:37 +00:00
InstCount.cpp
InstructionSimplify.cpp Revert r108401; it breaks bootstrap :( 2010-07-15 05:09:31 +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 minor enhancement to llvm::isFreeCall API: return CallInst; no functional change 2010-06-23 21:51:12 +00:00
MemoryDependenceAnalysis.cpp use the new isFreeCall API and ArgOperand accessors 2010-06-23 22:48:06 +00:00
ModuleDebugInfoPrinter.cpp
PHITransAddr.cpp
PointerTracking.cpp
PostDominators.cpp cache result of operator* 2010-07-09 15:52:36 +00:00
ProfileEstimatorPass.cpp
ProfileInfo.cpp Remove a pointless variable. 2010-06-29 11:39:45 +00:00
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt
ScalarEvolution.cpp In ScalarEvolution::forgetValue, eliminate any SCEVUnknown 2010-06-30 20:21:12 +00:00
ScalarEvolutionAliasAnalysis.cpp Rework scev-aa's basic computation so that it doesn't depend 2010-06-30 06:12:16 +00:00
ScalarEvolutionExpander.cpp remove useless cast and fix typos in comment 2010-07-09 16:42:04 +00:00
ScalarEvolutionNormalization.cpp
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp use ArgOperand accessors 2010-06-23 23:38:07 +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))

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