Commit Graph

22 Commits

Author SHA1 Message Date
Chris Lattner
ea0415957d make this just a bit more strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18 17:33:10 +00:00
Owen Anderson
5aa4f2a085 Add support to GVN for performing sret return slot optimization. This means that, if an sret function tail calls
another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct
return value.  llvm-gcc does not emit this by default.  Instead, it allocates space in the caller for the sret of
the tail call and then uses memcpy to copy the result into the caller's sret parameter.  This optimization detects
and optimizes that case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18 09:24:53 +00:00
Nick Lewycky
c91b49b890 Testcase for PR2032.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 07:15:11 +00:00
Eli Friedman
35327b3e57 Add a note pointing to PR1996.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47055 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13 07:56:04 +00:00
Eli Friedman
261c704da1 Add test for PR1996. (This is my first time adding a test for a
transform, so please review.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13 06:55:57 +00:00
Owen Anderson
30b4bd4d10 Re-apply the patch to improve the optimizations of memcpy's, with several
bugs fixed.  This now passes PPC bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47026 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12 21:15:18 +00:00
Bill Wendling
e00fec554b Temporarily reverting:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080128/057882.html

This is causing a miscompilation on PPC G5 and just now seeing it on iMac x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-06 20:03:07 +00:00
Owen Anderson
d02c0bc984 Make this test more aggressive, to cover recent improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46695 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 04:55:24 +00:00
Owen Anderson
6f7a52d300 Allow GVN to hack on memcpy's, making them open to further optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04 02:59:58 +00:00
Dan Gohman
28beeeac4d Convert tests using "| wc -l | grep ..." to use the count script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41097 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-15 13:36:28 +00:00
Owen Anderson
b95f9d565f Fix a failure I accidentally caused in my last commit by mishandling the
removal of redundant phis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:18:28 +00:00
Owen Anderson
054ab94bff Fix a misoptimization in aha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 17:43:14 +00:00
Owen Anderson
4f9ba7c40c Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40595 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 16:57:08 +00:00
Owen Anderson
a377a24771 Fix a bug introduced in my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 18:57:04 +00:00
Owen Anderson
45537917ee Fix a couple more bugs in the phi construction by pulling in code that does
almost the same things from LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 18:26:51 +00:00
Owen Anderson
febc7e3613 Fix what is _hopefully_ the last corner case for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 23:54:42 +00:00
Owen Anderson
9f435740b1 My last commit was not correct for nested loops. Fix it, and add a testcase for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:19:40 +00:00
Owen Anderson
0d16988690 Fix an infinite loop on 300.twolf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:03:06 +00:00
Owen Anderson
3dfcf33cf8 Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 21:26:36 +00:00
Owen Anderson
2e3d6b4a27 Fix a bug that was causing GVN to crash on 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 21:13:41 +00:00
Owen Anderson
0cd320362e Add basic support for performing whole-function RLE.
Note: This has not yet been thoroughly tested.  Use at your own risk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 19:57:03 +00:00
Owen Anderson
1ad2cb7555 Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 17:55:58 +00:00