Owen Anderson
35bd70c07a
Add a test for my previous PRE fix.
...
llvm-svn: 60394
2008-12-02 04:25:42 +00:00
Chris Lattner
8facc59e72
testcase for my previous commit.
...
llvm-svn: 60315
2008-12-01 01:42:03 +00:00
Chris Lattner
c40039c736
don't require GVN to work on dead values, just make the
...
test return the loaded value.
llvm-svn: 60252
2008-11-29 21:21:48 +00:00
Owen Anderson
b22a640fe4
A better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable blocks.
...
llvm-svn: 53032
2008-07-02 17:20:16 +00:00
Owen Anderson
1fb47ad928
Use the -enable-pre flag so this test doesn't fail.
...
llvm-svn: 52784
2008-06-26 17:03:28 +00:00
Owen Anderson
6a903bc601
Add local PRE to GVN. This only operates in cases where it would not increase code size, namely when the instantiated expression
...
would only need to be created in one predecessor.
llvm-svn: 52471
2008-06-18 21:41:49 +00:00
Gabor Greif
1e427c3264
sabre brings to my attention that the 'tr' suffix is also obsolete
...
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif
f45ff35bfe
Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
...
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Owen Anderson
525aa89356
Add a testcase for non-local CSE of read-only calls.
...
llvm-svn: 51025
2008-05-13 08:17:44 +00:00
Owen Anderson
90bde997b3
Add testcase for PR2213.
...
llvm-svn: 49517
2008-04-11 05:13:32 +00:00
Owen Anderson
ef9a6fd5c2
Factor a bunch of functionality related to memcpy and memset transforms out of
...
GVN and into its own pass.
llvm-svn: 49419
2008-04-09 08:23:16 +00:00
Chris Lattner
28e7b57605
add a testcase for forming memset from noncontiguous stores.
...
llvm-svn: 48938
2008-03-29 04:51:35 +00:00
Chris Lattner
c2c0c8303c
apparently tclsh doesn't lex like bash. Weird.
...
llvm-svn: 48732
2008-03-24 17:41:57 +00:00
Chris Lattner
9ca6bb4f16
pass the option so this test tests the right thing.
...
llvm-svn: 48731
2008-03-24 17:36:38 +00:00
Owen Anderson
e3605ac108
Use normal naming convention for test.
...
llvm-svn: 48693
2008-03-22 21:08:33 +00:00
Chris Lattner
53ccb62712
implement an initial hack at a straight-line store -> memset optimization.
...
This fires dozens of times across spec and multisource, but I don't know
if it actually speeds stuff up. Hopefully the testers will show something
nice :)
llvm-svn: 48680
2008-03-22 05:37:16 +00:00
Owen Anderson
7a69e3aef3
Fix a bug in GVN that Duncan noticed, where we potentially need to insert a
...
pointer bitcast when performing return slot optimization.
llvm-svn: 48343
2008-03-13 22:07:10 +00:00
Owen Anderson
6ff0b822b4
Improve the return slot optimization to be both more aggressive (not limited to sret parameters), and
...
safer (when the passed pointer might be invalid). Thanks to Duncan and Chris for the idea behind this,
and extra thanks to Duncan for helping me work out the trap-safety.
llvm-svn: 48280
2008-03-12 07:37:44 +00:00
Owen Anderson
e41c19c987
Add PR number to testcase.
...
llvm-svn: 47640
2008-02-26 23:16:11 +00:00
Owen Anderson
d29ed0b122
Fix an issue where GVN had the sizes of the two memcpy's reverse, resulting
...
in an invalid transformation.
llvm-svn: 47639
2008-02-26 23:06:17 +00:00
Owen Anderson
df1d2b02f9
Fix an issue where GVN was performing the return slot optimization when it was
...
not safe. This is fixed by more aggressively checking that the return slot is
not used elsewhere in the function.
llvm-svn: 47544
2008-02-25 04:08:09 +00:00
Owen Anderson
40dca46ddb
Fix an issue where GVN would try to use an instruction before its definition when performing return slot optimization.
...
llvm-svn: 47541
2008-02-25 00:40:41 +00:00
Chris Lattner
23fe6630e3
make this just a bit more strict.
...
llvm-svn: 47274
2008-02-18 17:33:10 +00:00
Owen Anderson
3549553262
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.
llvm-svn: 47265
2008-02-18 09:24:53 +00:00
Nick Lewycky
9592bb0390
Testcase for PR2032.
...
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Eli Friedman
460648abde
Add a note pointing to PR1996.
...
llvm-svn: 47055
2008-02-13 07:56:04 +00:00
Eli Friedman
03ec63f29d
Add test for PR1996. (This is my first time adding a test for a
...
transform, so please review.)
llvm-svn: 47050
2008-02-13 06:55:57 +00:00
Owen Anderson
00dba4f734
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Bill Wendling
c676a0329c
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.
llvm-svn: 46822
2008-02-06 20:03:07 +00:00
Owen Anderson
1a78ae76e4
Make this test more aggressive, to cover recent improvements.
...
llvm-svn: 46695
2008-02-04 04:55:24 +00:00
Owen Anderson
c4a7c41869
Allow GVN to hack on memcpy's, making them open to further optimization.
...
llvm-svn: 46693
2008-02-04 02:59:58 +00:00
Dan Gohman
f9dd170e36
Convert tests using "| wc -l | grep ..." to use the count script.
...
llvm-svn: 41097
2007-08-15 13:36:28 +00:00
Owen Anderson
2464f4f048
Fix a failure I accidentally caused in my last commit by mishandling the
...
removal of redundant phis.
llvm-svn: 40650
2007-07-31 20:18:28 +00:00
Owen Anderson
d58fa6b09f
Fix a misoptimization in aha.
...
llvm-svn: 40642
2007-07-31 17:43:14 +00:00
Owen Anderson
d66e285b2e
Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.
...
llvm-svn: 40595
2007-07-30 16:57:08 +00:00
Owen Anderson
0f692f27a3
Fix a bug introduced in my last commit.
...
llvm-svn: 40542
2007-07-26 18:57:04 +00:00
Owen Anderson
dbf23ccaa0
Fix a couple more bugs in the phi construction by pulling in code that does
...
almost the same things from LCSSA.
llvm-svn: 40540
2007-07-26 18:26:51 +00:00
Owen Anderson
3b8cc30a61
Fix what is _hopefully_ the last corner case for loops.
...
llvm-svn: 40503
2007-07-25 23:54:42 +00:00
Owen Anderson
8707412593
My last commit was not correct for nested loops. Fix it, and add a testcase for it.
...
llvm-svn: 40498
2007-07-25 22:19:40 +00:00
Owen Anderson
3c67004d47
Fix an infinite loop on 300.twolf.
...
llvm-svn: 40497
2007-07-25 22:03:06 +00:00
Owen Anderson
9b796348bd
Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr.
...
llvm-svn: 40495
2007-07-25 21:26:36 +00:00
Owen Anderson
7bf26ee444
Fix a bug that was causing GVN to crash on 252.eon.
...
llvm-svn: 40494
2007-07-25 21:13:41 +00:00
Owen Anderson
5e5599b7ce
Add basic support for performing whole-function RLE.
...
Note: This has not yet been thoroughly tested. Use at your own risk.
llvm-svn: 40489
2007-07-25 19:57:03 +00:00
Owen Anderson
ab6ec2eac2
Add a GVN pass, using the value numbering code I developed for GVNPRE and the
...
load elimination code from RedundantLoadElimination.
llvm-svn: 40469
2007-07-24 17:55:58 +00:00