Commit Graph

132 Commits

Author SHA1 Message Date
Dan Gohman d76d71a291 Factor the code for collecting IV users out of LSR into an IVUsers class,
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.

This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.

Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.

llvm-svn: 71535
2009-05-12 02:17:14 +00:00
Dan Gohman 1dbb40f481 Fix two wording errors that Duncan spotted.
llvm-svn: 71459
2009-05-11 18:51:16 +00:00
Dan Gohman b0ddbbe7c4 LLVM has unaligned loads and stores now.
llvm-svn: 71449
2009-05-11 18:06:05 +00:00
Dan Gohman 7ee3a4371f Upgrade this example to new-style syntax.
llvm-svn: 71447
2009-05-11 18:04:52 +00:00
Chris Lattner 17a999efac remove some done things: we have nocapture and SROA is smarter.
llvm-svn: 71443
2009-05-11 17:41:40 +00:00
Chris Lattner 183a7ec027 add a note
llvm-svn: 71442
2009-05-11 17:36:33 +00:00
Eli Friedman f2d589fe24 Remove a completed optimization. Add a potential optimization I ran
into.

llvm-svn: 71352
2009-05-09 08:40:15 +00:00
Chris Lattner 356d974a93 add a note
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Nick Lewycky 5c10a3aa7f Add a totally synthetic situation I came up with while looking at a bug in
related code.

llvm-svn: 65437
2009-02-25 06:52:48 +00:00
Torok Edwin 87d5ca083b add note about sin
llvm-svn: 65137
2009-02-20 18:42:06 +00:00
Torok Edwin 3cedd4dc64 add note about possible GEP improvement with fields of size 0.
llvm-svn: 62925
2009-01-24 19:30:25 +00:00
Chris Lattner 705ac7082b add a note
llvm-svn: 62760
2009-01-22 07:16:03 +00:00
Dan Gohman 83d2e066c1 Add a README entry noticed while investigating PR3216.
llvm-svn: 62558
2009-01-20 01:07:33 +00:00
Chris Lattner 6c2ee50e28 add some more crazy strlen and memcpy stuff I noticed in spec.
llvm-svn: 61918
2009-01-08 07:34:55 +00:00
Chris Lattner 7cb3ae0505 add some notes about strlen craziness in eon.
llvm-svn: 61917
2009-01-08 06:52:57 +00:00
Chris Lattner a41422566b add a note
llvm-svn: 61513
2008-12-31 00:54:13 +00:00
Chris Lattner 8a35adf3a5 add some notes for simplifylibcalls optimizations
llvm-svn: 61385
2008-12-23 20:52:52 +00:00
Chris Lattner 5d196e64f1 add some more notes.
llvm-svn: 61033
2008-12-15 08:32:28 +00:00
Chris Lattner 81ee731852 Add a testcase for GCC PR 23455, which lpre handles now. Add some
comments about why we're not getting other cases.

llvm-svn: 61032
2008-12-15 07:49:24 +00:00
Chris Lattner 3c2c36b590 gvn now hoists this load out of the hot non-call path.
llvm-svn: 61028
2008-12-15 06:34:48 +00:00
Chris Lattner 56fe52e287 move an entry, add some notes, remove a completed item (IMPLICIT_DEF)
llvm-svn: 60821
2008-12-10 01:30:48 +00:00
Chris Lattner a163568c03 improve a note.
llvm-svn: 60636
2008-12-07 00:15:10 +00:00
Chris Lattner da93063acc some more PRE/GVN/DSE related notes.
llvm-svn: 60633
2008-12-06 22:52:12 +00:00
Chris Lattner 543d6c65fa some random notes.
llvm-svn: 60624
2008-12-06 19:28:22 +00:00
Chris Lattner 0cdc0bbb8a add a note
llvm-svn: 60404
2008-12-02 06:32:34 +00:00
Bill Wendling 85de4b35ca - Remove the buggy -X/C -> X/-C transform. This isn't valid when X isn't a
constant. If X is a constant, then this is folded elsewhere.

- Added a note to Target/README.txt to indicate that we'd like to implement
  this when we're able.

llvm-svn: 60399
2008-12-02 05:12:47 +00:00
Bill Wendling 5b902c5b1e Implement ((A|B)&1)|(B&-2) -> (A&1) | B transformation. This also takes care of
permutations of this pattern.

llvm-svn: 60312
2008-12-01 01:07:11 +00:00
Bill Wendling de89bc275c Add instruction combining for ((A&~B)|(~A&B)) -> A^B and all permutations.
llvm-svn: 60291
2008-11-30 13:52:49 +00:00
Bill Wendling 9eef421e12 Implement (A&((~A)|B)) -> A&B transformation in the instruction combiner. This
takes care of all permutations of this pattern.

llvm-svn: 60290
2008-11-30 13:08:13 +00:00
Eli Friedman e16c0ff1d3 Moving potential optimizations out of PR2330 into lib/Target/README.txt.
Hopefully this isn't too much stuff to dump into this file.

llvm-svn: 60285
2008-11-30 07:36:04 +00:00
Nick Lewycky edd5d3e4e9 Also update the README.
llvm-svn: 60188
2008-11-27 22:41:45 +00:00
Nick Lewycky b3dc4ad5b4 Add a synthetic missed optimization.
llvm-svn: 60186
2008-11-27 22:12:22 +00:00
Torok Edwin 33986d8f17 move the note to the correct README
llvm-svn: 58104
2008-10-24 19:23:07 +00:00
Torok Edwin fcaae54669 add note about va_arg code on x86 and x86-64
llvm-svn: 58103
2008-10-24 19:20:05 +00:00
Dan Gohman 209fc26462 This is now partly done.
llvm-svn: 57734
2008-10-17 21:39:27 +00:00
Chris Lattner 9b83197b76 move PR1941 here.
llvm-svn: 57586
2008-10-15 16:33:52 +00:00
Chris Lattner 6d275fd6e1 move PR1604 here.
llvm-svn: 57582
2008-10-15 16:06:03 +00:00
Chris Lattner 843dacc937 move PR1488 into this file.
llvm-svn: 57579
2008-10-15 16:02:15 +00:00
Chris Lattner 117792afec add a note
llvm-svn: 57557
2008-10-15 05:53:25 +00:00
Chris Lattner f9325e5f67 this case is matched now.
llvm-svn: 57096
2008-10-05 02:16:12 +00:00
Chris Lattner d7dd8b8aeb add a note
llvm-svn: 54985
2008-08-19 06:22:16 +00:00
Chris Lattner 113b336caa move some more stuff out of my email into readme.txt
llvm-svn: 54603
2008-08-10 01:14:08 +00:00
Chris Lattner 4afb010309 add a note
llvm-svn: 54602
2008-08-10 00:47:21 +00:00
Chris Lattner 8377c02308 Add a note.
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Nick Lewycky 035fe6f716 Peer through sext/zext when looking for not(cmp).
llvm-svn: 51819
2008-05-31 19:01:33 +00:00
Nick Lewycky 69a51cbd6d Yay us! Every one of these examples turns into icmp/zext/ret.
llvm-svn: 51818
2008-05-31 18:20:26 +00:00
Chris Lattner 1bafa6c886 trip count computation deficiency
llvm-svn: 51222
2008-05-17 15:37:38 +00:00
Nick Lewycky 9fb8908457 Moved from PR1570.
llvm-svn: 48965
2008-03-30 19:07:11 +00:00
Chris Lattner fd5fe2a83d add a note.
llvm-svn: 48583
2008-03-20 04:46:13 +00:00
Chris Lattner af8d3c6699 various rotate fun.
llvm-svn: 48438
2008-03-17 01:47:51 +00:00