llvm-6502/lib/Transforms/Scalar
Duncan Sands 24080a9878 The accumulator tail recursion transform claims to work for any associative
operation, but the way it's implemented requires the operation to also be
commutative.  So add a check for commutativity (and tweak the corresponding
comments).  This makes no difference in practice since every associative
LLVM instruction is also commutative!  Here's an example to show the need
for commutativity: the accum_recursion.ll testcase calculates the factorial
function.  Before the transformation the result of a call is
  ((((1*1)*2)*3)...)*x
while afterwards it is
  (((1*x)*(x-1))...*2)*1
which clearly requires both associativity and commutativity of * to be equal
to the original.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-10 20:31:42 +00:00
..
ABCD.cpp Remove another memory leak from ABCD by using Edges by value instead of 2010-03-27 09:09:17 +00:00
ADCE.cpp Use pre-increment instead of post-increment when the result is not used. 2010-06-22 15:08:57 +00:00
BasicBlockPlacement.cpp eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861 2009-09-02 06:11:42 +00:00
CMakeLists.txt Update CMake build. 2010-05-07 17:13:20 +00:00
CodeGenPrepare.cpp use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand 2010-06-30 09:19:23 +00:00
ConstantProp.cpp remove a bunch of extraneous LLVMContext arguments 2009-11-06 04:27:31 +00:00
DCE.cpp eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861 2009-09-02 06:11:42 +00:00
DeadStoreElimination.cpp Don't claim to preserve AliasAnalysis. First, this is doesn't actually 2010-07-02 18:43:05 +00:00
GEPSplitter.cpp Check in the experimental GEP splitter pass. This pass splits complex 2009-10-26 19:12:14 +00:00
GVN.cpp cache result of operator* (found by inspection) 2010-07-09 14:48:08 +00:00
IndVarSimplify.cpp cache result of operator* 2010-07-09 15:40:10 +00:00
JumpThreading.cpp jump threading can't split a critical edge from an indirectbr. This 2010-06-14 19:45:43 +00:00
LICM.cpp performance: cache the dereferenced use_iterator 2010-04-14 16:13:56 +00:00
LoopDeletion.cpp Use pre-increment instead of post-increment when the result is not used. 2010-06-22 15:08:57 +00:00
LoopIndexSplit.cpp Use ValueMap instead of DenseMap. 2010-06-24 00:33:28 +00:00
LoopRotation.cpp Use pre-increment instead of post-increment when the result is not used. 2010-06-22 15:08:57 +00:00
LoopStrengthReduce.cpp use getArgOperand instead of getOperand 2010-06-30 09:15:28 +00:00
LoopUnrollPass.cpp Add a DominatorTree argument to isLCSSA so that it doesn't have to 2010-03-10 19:38:49 +00:00
LoopUnswitch.cpp Use ValueMap instead of DenseMap. 2010-06-24 00:33:28 +00:00
Makefile make -fno-rtti the default unless a directory builds with REQUIRES_RTTI. 2010-01-24 20:43:08 +00:00
MemCpyOptimizer.cpp Use pre-increment instead of post-increment when the result is not used. 2010-06-22 15:08:57 +00:00
Reassociate.cpp fix a nice subtle reassociate bug which would only occur 2010-03-05 07:18:54 +00:00
Reg2Mem.cpp performance: cache the dereferenced use_iterator 2010-04-14 16:48:56 +00:00
Scalar.cpp Whoops this already existed. 2010-03-11 23:21:19 +00:00
ScalarReplAggregates.cpp Fix the second half of PR7437: scalarrepl wasn't preserving 2010-07-08 00:27:05 +00:00
SCCP.cpp fix PR6940: sitofp(undef) folds to 0.0, not undef. 2010-04-26 18:21:23 +00:00
SimplifyCFGPass.cpp SimplifyCFG: don't turn volatile stores to null/undef into unreachable. Fixes PR7369. 2010-06-13 14:35:54 +00:00
SimplifyHalfPowrLibCalls.cpp refactor the interface to InlineFunction so that most of the in/out 2010-04-22 23:07:58 +00:00
SimplifyLibCalls.cpp Detabify this file. 2010-07-06 03:53:43 +00:00
Sink.cpp Add an LLVM IR version of code sinking. This uses the same simple algorithm 2010-05-07 15:40:13 +00:00
TailDuplication.cpp Change errs() to dbgs(). 2010-01-05 01:27:33 +00:00
TailRecursionElimination.cpp The accumulator tail recursion transform claims to work for any associative 2010-07-10 20:31:42 +00:00