Skip to content
  1. Oct 14, 2007
  2. Oct 13, 2007
    • Duncan Sands's avatar
      Clarify that fastcc has a problem with nested function · 29af26f1
      Duncan Sands authored
      trampolines, rather than with nested functions themselves.
      
      llvm-svn: 42955
      29af26f1
    • Chris Lattner's avatar
      Enhance the truncstore optimization code to handle shifted · f47e3062
      Chris Lattner authored
      values and propagate demanded bits through them in simple cases.
      
      This allows this code:
      void foo(char *P) {
         strcpy(P, "abc");
      }
      to compile to:
      
      _foo:
              ldrb r3, [r1]
              ldrb r2, [r1, #+1]
              ldrb r12, [r1, #+2]!
              ldrb r1, [r1, #+1]
              strb r1, [r0, #+3]
              strb r2, [r0, #+1]
              strb r12, [r0, #+2]
              strb r3, [r0]
              bx lr
      
      instead of:
      
      _foo:
              ldrb r3, [r1, #+3]
              ldrb r2, [r1, #+2]
              orr r3, r2, r3, lsl #8
              ldrb r2, [r1, #+1]
              ldrb r1, [r1]
              orr r2, r1, r2, lsl #8
              orr r3, r2, r3, lsl #16
              strb r3, [r0]
              mov r2, r3, lsr #24
              strb r2, [r0, #+3]
              mov r2, r3, lsr #16
              strb r2, [r0, #+2]
              mov r3, r3, lsr #8
              strb r3, [r0, #+1]
              bx lr
      
      testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll
      
      This also helps occasionally for X86 and other cases not involving 
      unaligned load/stores.
      
      llvm-svn: 42954
      f47e3062
    • Chris Lattner's avatar
      Add a simple optimization to simplify the input to · 5e6fe054
      Chris Lattner authored
      truncate and truncstore instructions, based on the 
      knowledge that they don't demand the top bits.
      
      llvm-svn: 42952
      5e6fe054
    • Neil Booth's avatar
      If the power of 5 is exact, and the reciprocal exact, the error is zero not... · c799fe9e
      Neil Booth authored
      If the power of 5 is exact, and the reciprocal exact, the error is zero not one half-ulps.  This prevents an infinite loop in rare cases.
      
      llvm-svn: 42950
      c799fe9e
    • Evan Cheng's avatar
      Local spiller optimization: · b6307650
      Evan Cheng authored
      Turn this:
      movswl  %ax, %eax
      movl    %eax, -36(%ebp)
      xorl    %edi, -36(%ebp)
      into
      movswl  %ax, %eax
      xorl    %edi, %eax
      movl    %eax, -36(%ebp)
      by unfolding the load / store xorl into an xorl and a store when we know the
      value in the spill slot is available in a register. This doesn't change the
      number of instructions but reduce the number of times memory is accessed.
      
      Also unfold some load folding instructions and reuse the value when similar
      situation presents itself.
      
      llvm-svn: 42947
      b6307650
    • Evan Cheng's avatar
      Change unfoldMemoryOperand(). User is now responsible for passing in the · 7082dcf6
      Evan Cheng authored
      register used by the unfolded instructions. User can also specify whether to
      unfold the load, the store, or both.
      
      llvm-svn: 42946
      7082dcf6
    • Evan Cheng's avatar
      Optionally create a MachineInstr without default implicit operands. · 9490e0d0
      Evan Cheng authored
      llvm-svn: 42945
      9490e0d0
  3. Oct 12, 2007
Loading