Skip to content
  1. Jul 12, 2010
  2. Jul 10, 2010
    • Duncan Sands's avatar
      The accumulator tail recursion transform claims to work for any associative · 82b21c08
      Duncan Sands authored
      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.
      
      llvm-svn: 108056
      82b21c08
  3. Jul 09, 2010
  4. Jul 08, 2010
    • Benjamin Kramer's avatar
      Teach instcombine to transform · 2321e6a4
      Benjamin Kramer authored
      (X >s -1) ? C1 : C2 and (X <s  0) ? C2 : C1
      into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional.
      
      This optimization could be extended to take non-const C1 and C2 but we better
      stay conservative to avoid code size bloat for now.
      
      for
      int sel(int n) {
           return n >= 0 ? 60 : 100;
      }
      
      we now generate
        sarl  $31, %edi
        andl  $40, %edi
        leal  60(%rdi), %eax
      
      instead of
        testl %edi, %edi
        movl  $60, %ecx
        movl  $100, %eax
        cmovnsl %ecx, %eax
      
      llvm-svn: 107866
      2321e6a4
    • Chris Lattner's avatar
      Fix the second half of PR7437: scalarrepl wasn't preserving · efa3c824
      Chris Lattner authored
      address spaces when SRoA'ing memcpy's.
      
      llvm-svn: 107846
      efa3c824
  5. Jul 07, 2010
    • Duncan Sands's avatar
      Rename "Release" builds as "Release+Asserts"; rename "Release-Asserts" · 408bb192
      Duncan Sands authored
      builds to "Release".  The default build is unchanged (optimization on,
      assertions on), however it is now called Release+Asserts.  The intent
      is that future LLVM releases released via llvm.org will be Release builds
      in the new sense, i.e. will have assertions disabled (currently they have
      assertions enabled, for a more than 20% slowdown).  This will bring them
      in line with MacOS releases, which ship with assertions disabled.  It also
      means that "Release" now means the same things in make and cmake builds:
      cmake already disables assertions for "Release" builds AFAICS.
      
      llvm-svn: 107758
      408bb192
  6. Jul 06, 2010
  7. Jul 02, 2010
  8. Jul 01, 2010
  9. Jun 30, 2010
Loading