Benjamin Kramer
12ea727553
Add a note.
...
llvm-svn: 128286
2011-03-25 17:32:40 +00:00
Eli Friedman
f9d5010081
A bit more analysis of a memset-related README entry.
...
llvm-svn: 128107
2011-03-22 20:49:53 +00:00
Eli Friedman
0da0b4aed0
This README entry was fixed recently.
...
llvm-svn: 127982
2011-03-21 01:33:03 +00:00
Chris Lattner
871d62dc5b
add a note
...
llvm-svn: 126719
2011-03-01 00:24:51 +00:00
Benjamin Kramer
412ffed4f0
Add some DAGCombines for (adde 0, 0, glue), which are useful to optimize legalized code for large integer arithmetic.
...
1. Inform users of ADDEs with two 0 operands that it never sets carry
2. Fold other ADDs or ADDCs into the ADDE if possible
It would be neat if we could do the same thing for SETCC+ADD eventually, but we can't do that in target independent code.
llvm-svn: 126557
2011-02-26 22:48:07 +00:00
Chris Lattner
c373140c8b
add a missed loop deletion case.
...
llvm-svn: 126103
2011-02-21 02:13:39 +00:00
Chris Lattner
8760c28fe1
add an idiom that loop idiom could theoretically catch.
...
llvm-svn: 126101
2011-02-21 01:33:38 +00:00
Duncan Sands
e0ece264ba
This has been implemented.
...
llvm-svn: 125738
2011-02-17 08:16:56 +00:00
Chris Lattner
035876162f
add some notes on compares + binops. Remove redundant entries.
...
llvm-svn: 125702
2011-02-17 01:43:46 +00:00
Chris Lattner
9f4e529571
Add a few missed xforms from GCC PR14753
...
llvm-svn: 125681
2011-02-16 19:16:34 +00:00
Eli Friedman
b409f8da64
Remove outdated README entry.
...
llvm-svn: 125660
2011-02-16 07:41:19 +00:00
Eli Friedman
5f848d70fa
Remove outdated README entry.
...
llvm-svn: 125659
2011-02-16 07:18:18 +00:00
Eli Friedman
30a64ae1b9
Update README entry.
...
llvm-svn: 125658
2011-02-16 07:17:44 +00:00
Anders Carlsson
61f2126479
Remove a virtual inheritance case that clang can devirtualize fully now.
...
llvm-svn: 124989
2011-02-06 20:16:49 +00:00
Benjamin Kramer
b739613711
SimplifyCFG: Turn switches into sub+icmp+branch if possible.
...
This makes the job of the later optzn passes easier, allowing the vast amount of
icmp transforms to chew on it.
We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting
binary on i386-linux.
The testcase from README.txt now compiles into
decl %edi
cmpl $3, %edi
sbbl %eax, %eax
andl $1, %eax
ret
llvm-svn: 124724
2011-02-02 15:56:22 +00:00
Chris Lattner
1d534245fc
add a note, progress unblocked by PR8575 being fixed.
...
llvm-svn: 124599
2011-01-31 20:23:28 +00:00
Benjamin Kramer
6b3c3de09a
Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, c1+c2) when c1 equals the amount of bits that are truncated off.
...
This happens all the time when a smul is promoted to a larger type.
On x86-64 we now compile "int test(int x) { return x/10; }" into
movslq %edi, %rax
imulq $1717986919, %rax, %rax
movq %rax, %rcx
shrq $63, %rcx
sarq $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax"
addl %ecx, %eax
This fires 96 times in gcc.c on x86-64.
llvm-svn: 124559
2011-01-30 16:38:43 +00:00
Chris Lattner
c025bec9e1
this isn't a memset, we do convert dest[i] to one though :)
...
llvm-svn: 124097
2011-01-24 02:32:00 +00:00
Chris Lattner
1f9ed3b437
with recent work, we now optimize this into:
...
define i32 @foo(i32 %x) nounwind readnone ssp {
entry:
%tobool = icmp eq i32 %x, 0
%tmp5 = select i1 %tobool, i32 2, i32 1
ret i32 %tmp5
}
llvm-svn: 124091
2011-01-24 01:12:18 +00:00
Anders Carlsson
ba7114ef4c
Add a memset loop that LoopIdiomRecognize doesn't recognize.
...
llvm-svn: 124082
2011-01-23 20:31:00 +00:00
Chris Lattner
08e1bf567f
add a note
...
llvm-svn: 123752
2011-01-18 07:47:48 +00:00
Anders Carlsson
d0103ebf92
Update README.txt to remove the DAE enhancement.
...
llvm-svn: 123597
2011-01-16 21:26:15 +00:00
Chris Lattner
91f1b21cf1
add some commentary
...
llvm-svn: 123572
2011-01-16 06:39:44 +00:00
Chandler Carruth
a3261fcca5
Simplify a README.txt entry significantly to expose the core issue.
...
llvm-svn: 123556
2011-01-16 01:40:23 +00:00
Chris Lattner
d2d217dc46
typo
...
llvm-svn: 123406
2011-01-13 22:11:56 +00:00
Chris Lattner
6745cd150c
memcpy + metadata = bliss :)
...
llvm-svn: 123405
2011-01-13 22:08:15 +00:00
Chandler Carruth
250dce460c
Teach constant folding to perform conversions from constant floating
...
point values to their integer representation through the SSE intrinsic
calls. This is the last part of a README.txt entry for which I have real
world examples.
llvm-svn: 123206
2011-01-11 01:07:24 +00:00
Owen Anderson
4479341626
Fix a random missed optimization by making InstCombine more aggressive when determining which bits are demanded by
...
a comparison against a constant.
llvm-svn: 123203
2011-01-11 00:36:45 +00:00
Chris Lattner
c46188944e
+0.0 vs -0.0 differences can be handled by looking at the user of the
...
operation in some cases.
llvm-svn: 123190
2011-01-10 21:01:17 +00:00
Chris Lattner
2bd48ecd43
expand on a note
...
llvm-svn: 123145
2011-01-10 00:33:01 +00:00
Chris Lattner
7926b7035f
typo
...
llvm-svn: 123142
2011-01-09 23:48:41 +00:00
Chris Lattner
fc6d425076
xref a PR #
...
llvm-svn: 123141
2011-01-09 23:42:22 +00:00
Chandler Carruth
a4d454ae5e
Add a note about the inability to model FP -> int conversions which
...
perform rounding other than truncation in the IR. Common C code for this
turns into really an LLVM intrinsic call that blocks a lot of further
optimizations.
llvm-svn: 123135
2011-01-09 22:36:18 +00:00
Chandler Carruth
2a30077fed
Add a note about a missed FP optimization.
...
llvm-svn: 123126
2011-01-09 21:00:19 +00:00
Chandler Carruth
17c1672ea9
Another missed memset in std::vector initialization.
...
llvm-svn: 123116
2011-01-09 11:29:57 +00:00
Chandler Carruth
dcbd7b6eaa
Fix a cut-paste-o so that the sample code is correct for my last note.
...
Also, switch to a more clear 'sink' function with its declaration to
avoid any confusion about 'g'. Thanks for the suggestion Frits.
llvm-svn: 123113
2011-01-09 10:10:59 +00:00
Chandler Carruth
3de0da8801
Another missed optimization of trivial vector code.
...
llvm-svn: 123112
2011-01-09 09:58:36 +00:00
Chandler Carruth
9220d9fa48
Add a note about vector's size-constructor producing dead stores.
...
llvm-svn: 123111
2011-01-09 09:58:33 +00:00
Chandler Carruth
815cbfb43c
Add a note about a missed memset optimization from std::fill.
...
llvm-svn: 123103
2011-01-09 01:32:55 +00:00
Benjamin Kramer
62b5a4d14c
Revert 122959, it needs more thought. Add it back to README.txt with additional notes.
...
llvm-svn: 123030
2011-01-07 20:42:20 +00:00
Chris Lattner
2fd8a095b1
With Benjamin's recent amazing patches, we should be able to do even better things :)
...
llvm-svn: 122978
2011-01-06 22:25:00 +00:00
Benjamin Kramer
4e31a65344
Add a note from llvmdev, this time with more info.
...
llvm-svn: 122966
2011-01-06 17:35:50 +00:00
Benjamin Kramer
33e41f4986
EarlyCSE does this now (and GVN always did it).
...
llvm-svn: 122960
2011-01-06 13:19:46 +00:00
Benjamin Kramer
5834b2bab8
InstCombine: If we call llvm.objectsize on a malloc call we can replace it with the size passed to malloc.
...
llvm-svn: 122959
2011-01-06 13:11:05 +00:00
Chris Lattner
40973baa5f
add a note about object size from drystone, add a poorly optimized loop from 179.art.
...
llvm-svn: 122954
2011-01-06 07:41:22 +00:00
Chris Lattner
69ff12968c
add a trivial instcombine missed in Dhrystone
...
llvm-svn: 122953
2011-01-06 07:09:23 +00:00
Chris Lattner
222b24e2de
update a bunch of entries.
...
llvm-svn: 122700
2011-01-02 18:31:38 +00:00
Chris Lattner
f669d6a901
Allow loop-idiom to run on multiple BB loops, but still only scan the loop
...
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
2011-01-02 07:58:36 +00:00
Chris Lattner
9dadac901f
a missed __builtin_object_size case.
...
llvm-svn: 122676
2011-01-01 22:57:31 +00:00
Chris Lattner
e3e3cb83a5
various updates.
...
llvm-svn: 122675
2011-01-01 22:52:11 +00:00