llvm-6502/lib/Analysis
Gabor Greif 2ff961f668 reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 20:51:13 +00:00
..
IPA reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +00:00
AliasAnalysis.cpp
AliasAnalysisCounter.cpp
AliasAnalysisEvaluator.cpp clean up algorithm and remove operand order assumptions 2010-04-08 16:46:24 +00:00
AliasDebugger.cpp
AliasSetTracker.cpp
Analysis.cpp
BasicAliasAnalysis.cpp reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +00:00
CaptureTracking.cpp
CFGPrinter.cpp
CMakeLists.txt Update CMake build. 2010-04-08 18:52:18 +00:00
ConstantFolding.cpp reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +00:00
DbgInfoPrinter.cpp
DebugInfo.cpp DebugInfoFinder::processModule was foiling my plot by 2010-04-02 20:44:29 +00:00
DomPrinter.cpp Remove dead code in the dotty dominance tree printer. 2010-04-12 15:02:19 +00:00
InlineCost.cpp performance: cache the dereferenced use_iterator 2010-04-14 18:13:29 +00:00
InstCount.cpp
InstructionSimplify.cpp
Interval.cpp
IntervalPartition.cpp
IVUsers.cpp Add a cast to void to show that the return value is being 2010-04-11 19:30:19 +00:00
LazyValueInfo.cpp
LibCallAliasAnalysis.cpp
LibCallSemantics.cpp
Lint.cpp Add several more lint checks. 2010-04-09 01:39:53 +00:00
LiveValues.cpp
LoopDependenceAnalysis.cpp
LoopInfo.cpp Fix a bunch of namespace polution. 2010-04-15 17:08:50 +00:00
LoopPass.cpp Ok, third time's the charm. No changes from last time except the CMake 2010-04-02 23:17:14 +00:00
Makefile
MemoryBuiltins.cpp reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +00:00
MemoryDependenceAnalysis.cpp reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +00:00
PHITransAddr.cpp
PointerTracking.cpp Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise 2010-04-11 19:27:13 +00:00
PostDominators.cpp Remove unneeded debug in PostDominator runOnFunction() 2010-04-12 15:32:55 +00:00
ProfileEstimatorPass.cpp
ProfileInfo.cpp
ProfileInfoLoader.cpp
ProfileInfoLoaderPass.cpp
ProfileVerifierPass.cpp
README.txt
ScalarEvolution.cpp Make getPredecessorWithUniqueSuccessorForBB return the unique successor 2010-04-15 16:19:08 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Fix a bunch of namespace polution. 2010-04-15 17:08:50 +00:00
ScalarEvolutionNormalization.cpp Generalize IVUsers to track arbitrary expressions rather than expressions 2010-04-07 22:27:08 +00:00
SparsePropagation.cpp
Trace.cpp
ValueTracking.cpp reapply r101364, which has been backed out in r101368 2010-04-15 20:51:13 +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.

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