Skip to content
  1. Jan 02, 2011
    • Chris Lattner's avatar
      Allow loop-idiom to run on multiple BB loops, but still only scan the loop · ddf58010
      Chris Lattner authored
      header for now for memset/memcpy opportunities.  It turns out that loop-rotate
      is successfully rotating loops, but *DOESN'T MERGE THE BLOCKS*, turning "for 
      loops" into 2 basic block loops that loop-idiom was ignoring.
      
      With this fix, we form many *many* more memcpy and memsets than before, including
      on the "history" loops in the viterbi benchmark, which look like this:
      
              for (j=0; j<MAX_history; ++j) {
                history_new[i][j+1] = history[2*i][j];
              }
      
      Transforming these loops into memcpy's speeds up the viterbi benchmark from
      11.98s to 3.55s on my machine.  Woo.
      
      llvm-svn: 122685
      ddf58010
  2. Jan 01, 2011
  3. Dec 31, 2010
  4. Dec 30, 2010
  5. Dec 29, 2010
  6. Dec 28, 2010
  7. Dec 27, 2010
  8. Dec 26, 2010
  9. Dec 24, 2010
  10. Dec 23, 2010
  11. Dec 22, 2010
  12. Dec 21, 2010
    • Benjamin Kramer's avatar
      Add some x86 specific dagcombines for conditional increments. · f6ddc4a1
      Benjamin Kramer authored
      (add Y, (sete  X, 0)) -> cmp X, 1; adc  0, Y
      (add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y
      (sub (sete  X, 0), Y) -> cmp X, 1; sbb  0, Y
      (sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y
      
      for
        unsigned foo(unsigned a, unsigned b) {
          if (a == 0) b++;
          return b;
        }
      we now get:
        foo:
          cmpl  $1, %edi
          movl  %esi, %eax
          adcl  $0, %eax
          ret
      instead of:
        foo:
          testl %edi, %edi
          sete  %al
          movzbl  %al, %eax
          addl  %esi, %eax
          ret
      
      llvm-svn: 122364
      f6ddc4a1
Loading