llvm-6502/lib/Transforms
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
..
Hello Add an exports file for the Hello example plugin. 2010-06-24 17:36:51 +00:00
InstCombine cache result of operator* 2010-07-09 15:01:36 +00:00
Instrumentation use setArgOperand 2010-06-28 12:31:35 +00:00
IPO cache result of operator* 2010-07-09 16:51:20 +00:00
Scalar The accumulator tail recursion transform claims to work for any associative 2010-07-10 20:31:42 +00:00
Utils cache result of operator* 2010-07-09 16:31:08 +00:00
Makefile Revert r100896 and around - this breaks the only mingw32 buildbot we have. 2010-04-15 19:51:42 +00:00