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
  10. Jun 29, 2010
    • Bill Wendling's avatar
      Introducing the "linker_weak" linkage type. This will be used for Objective-C · 1767723d
      Bill Wendling authored
      metadata types which should be marked as "weak", but which the linker will
      remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
      defined like this:
      
             .globl l_objc_msgSend_fixup_alloc
             .weak_definition l_objc_msgSend_fixup_alloc
             .section __DATA, __objc_msgrefs, coalesced
             .align 3
      l_objc_msgSend_fixup_alloc:
              .quad   _objc_msgSend_fixup
              .quad   L_OBJC_METH_VAR_NAME_1
      
      This is different from the "linker_private" linkage type, because it can't have
      the metadata defined with ".weak_definition".
      
      llvm-svn: 107205
      1767723d
    • Duncan Sands's avatar
      Return Changed. This required setting Changed if dbg metadata · 17f1ca87
      Duncan Sands authored
      is stripped off.  Currently set unconditionally, since the API
      does not provide a way of working out if anything was actually
      stripped off.
      
      llvm-svn: 107142
      17f1ca87
Loading