- Jan 06, 2011
-
-
Chris Lattner authored
llvm-svn: 122978
-
Benjamin Kramer authored
llvm-svn: 122966
-
Benjamin Kramer authored
llvm-svn: 122960
-
Benjamin Kramer authored
InstCombine: If we call llvm.objectsize on a malloc call we can replace it with the size passed to malloc. llvm-svn: 122959
-
Chris Lattner authored
llvm-svn: 122954
-
Chris Lattner authored
llvm-svn: 122953
-
- Jan 02, 2011
-
-
Chris Lattner authored
llvm-svn: 122700
-
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
-
- Jan 01, 2011
-
-
Chris Lattner authored
llvm-svn: 122676
-
Chris Lattner authored
llvm-svn: 122675
-
Duncan Sands authored
is the wrong hammer for this nail, and is probably right. llvm-svn: 122661
-
Duncan Sands authored
numbering, in which it considers (for example) "%a = add i32 %x, %y" and "%b = add i32 %x, %y" to be equal because the operands are equal and the result of the instructions only depends on the values of the operands. This has almost no effect (it removes 4 instructions from gcc-as-one-file), and perhaps slows down compilation: I measured a 0.4% slowdown on the large gcc-as-one-file testcase, but it wasn't statistically significant. llvm-svn: 122654
-
- Dec 28, 2010
-
-
Chris Lattner authored
llvm-svn: 122603
-
- Dec 23, 2010
-
-
Benjamin Kramer authored
Remove/fix invalid README entries. The well thought out strcpy function doesn't return a pointer to the end of the string. llvm-svn: 122496
-
- Dec 19, 2010
-
-
Chris Lattner authored
This resolves a README entry and technically resolves PR4916, but we still get poor code for the testcase in that PR because GVN isn't CSE'ing uadd with add, filed as PR8817. Previously we got: _test7: ## @test7 addq %rsi, %rdi cmpq %rdi, %rsi movl $42, %eax cmovaq %rsi, %rax ret Now we get: _test7: ## @test7 addq %rsi, %rdi movl $42, %eax cmovbq %rsi, %rax ret llvm-svn: 122182
-
- Dec 15, 2010
-
-
Chris Lattner authored
llvm-svn: 121854
-
Chris Lattner authored
llvm-svn: 121853
-
Chris Lattner authored
llvm-svn: 121850
-
Chris Lattner authored
llvm-svn: 121849
-
- Dec 13, 2010
-
-
Chris Lattner authored
llvm-svn: 121656
-
- Dec 11, 2010
-
-
Benjamin Kramer authored
(x & 2^n) ? 2^m+C : C we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the select to a shift and apply the offset afterwards. llvm-svn: 121609
-
- Nov 23, 2010
-
-
Benjamin Kramer authored
E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. llvm-svn: 120049
-
Benjamin Kramer authored
This allows to transform the rem in "1 << ((int)x % 8);" to an and. llvm-svn: 120028
-
- Nov 22, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119984
-
Benjamin Kramer authored
This currently only catches the most basic case, a two-case switch, but can be extended later. llvm-svn: 119964
-
- Nov 21, 2010
-
-
Chris Lattner authored
llvm-svn: 119925
-
Chris Lattner authored
void a(int x) { if (((1<<x)&8)==0) b(); } into "x != 3", which occurs over 100 times in 403.gcc but in no other program in llvm-test. llvm-svn: 119922
-
Chris Lattner authored
llvm-svn: 119920
-
- Nov 11, 2010
-
-
Chris Lattner authored
llvm-svn: 118806
-
Chris Lattner authored
llvm-svn: 118797
-
- Nov 09, 2010
-
-
Chris Lattner authored
llvm-svn: 118608
-
- Nov 07, 2010
-
-
Duncan Sands authored
of a select instruction, see if doing the compare with the true and false values of the select gives the same result. If so, that can be used as the value of the comparison. llvm-svn: 118378
-
- Nov 06, 2010
-
-
Benjamin Kramer authored
llvm-svn: 118337
-
- Sep 30, 2010
-
-
Benjamin Kramer authored
llvm-svn: 115116
-
- Sep 19, 2010
-
-
Chris Lattner authored
llvm-svn: 114304
-
- Aug 08, 2010
-
-
Nick Lewycky authored
llvm-svn: 110543
-
- Jul 08, 2010
-
-
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
-
- Jul 03, 2010
-
-
Eli Friedman authored
llvm-svn: 107569
-
Eli Friedman authored
llvm-svn: 107565
-
- Jun 30, 2010
-
-
Eric Christopher authored
llvm-svn: 107213
-