Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | We don't want to find dependencies within the same block in this case. It ↵ | Owen Anderson | 2008-06-17 | 1 | -1/+1 | |
| | | | | | | | | leads to incorrect results because we're detecting something at or after the call we're querying on. llvm-svn: 52433 | |||||
* | Switch GVN to use ScopedHashTable. | Owen Anderson | 2008-06-12 | 1 | -134/+64 | |
| | | | | llvm-svn: 52242 | |||||
* | Update comments and documentation to reflect that GCSE and ValueNumbering are | Matthijs Kooijman | 2008-06-05 | 1 | -0/+3 | |
| | | | | | | deprecated by the GVN and GVNPRE passes. llvm-svn: 51983 | |||||
* | Remove unneeded #include. | Owen Anderson | 2008-06-04 | 1 | -1/+0 | |
| | | | | llvm-svn: 51955 | |||||
* | Teach GVN to not assert on vector comparisons | Nate Begeman | 2008-05-18 | 1 | -2/+2 | |
| | | | | llvm-svn: 51230 | |||||
* | Fix Analysis/BasicAA/pure-const-dce.ll. This turned out to be a correctness | Owen Anderson | 2008-05-13 | 1 | -1/+38 | |
| | | | | | | | | bug as well as a missed optimization. We weren't properly checking for local dependencies before moving on to non-local ones when doing non-local read-only call CSE. llvm-svn: 51082 | |||||
* | Make the non-local CSE safety checks slightly more thorough. | Owen Anderson | 2008-05-13 | 1 | -6/+8 | |
| | | | | llvm-svn: 51035 | |||||
* | Add support for non-local CSE of read-only calls. | Owen Anderson | 2008-05-13 | 1 | -12/+45 | |
| | | | | llvm-svn: 51024 | |||||
* | Go back to passing the analyses around as parameters. | Owen Anderson | 2008-05-12 | 1 | -21/+33 | |
| | | | | llvm-svn: 50995 | |||||
* | Move the various analyses used by GVN into static variables so we don't have ↵ | Owen Anderson | 2008-05-12 | 1 | -30/+21 | |
| | | | | | | to keep passing them around or refetching them. llvm-svn: 50963 | |||||
* | Remove unneeded #include's. | Owen Anderson | 2008-04-21 | 1 | -7/+0 | |
| | | | | llvm-svn: 50035 | |||||
* | Make GVN able to remove unnecessary calls to read-only functions again. | Owen Anderson | 2008-04-17 | 1 | -16/+30 | |
| | | | | llvm-svn: 49842 | |||||
* | Fix PR2213 by simultaneously making GVN more aggressive with the return values | Owen Anderson | 2008-04-11 | 1 | -29/+20 | |
| | | | | | | of calls and less aggressive with non-readnone calls. llvm-svn: 49516 | |||||
* | Factor a bunch of functionality related to memcpy and memset transforms out of | Owen Anderson | 2008-04-09 | 1 | -620/+0 | |
| | | | | | | GVN and into its own pass. llvm-svn: 49419 | |||||
* | Remove accidentally duplicated code. | Owen Anderson | 2008-04-09 | 1 | -4/+0 | |
| | | | | llvm-svn: 49418 | |||||
* | Add operator= implementations to SparseBitVector, allowing it to be used in ↵ | Owen Anderson | 2008-04-07 | 1 | -16/+8 | |
| | | | | | | | | | GVN. This results in both time and memory savings for GVN. For example, one testcase went from 10.5s to 6s with this patch. llvm-svn: 49345 | |||||
* | Make GVN more memory efficient, particularly on code that contains a large ↵ | Owen Anderson | 2008-04-07 | 1 | -1/+15 | |
| | | | | | | | | number of allocations, which GVN can't optimize anyways. llvm-svn: 49329 | |||||
* | API changes for class Use size reduction, wave 1. | Gabor Greif | 2008-04-06 | 1 | -4/+4 | |
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277 | |||||
* | change iterator invalidation avoidance to just move the iterator backward | Chris Lattner | 2008-03-29 | 1 | -18/+25 | |
| | | | | | | | | | | | | | | | | | | | | | when something changes, instead of moving forward. This allows us to simplify memset lowering, inserting the memset at the end of the range of stuff we're touching instead of at the start. This, in turn, allows us to make use of the addressing instructions already used in the function instead of inserting our own. For example, we now codegen: %tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 ) instead of: %tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] %ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1] call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 ) llvm-svn: 48940 | |||||
* | make the common case of a single store (which clearly shouldn't be turned | Chris Lattner | 2008-03-29 | 1 | -3/+12 | |
| | | | | | | into a memset!) faster by avoiding an allocation of an std::list node. llvm-svn: 48939 | |||||
* | give form-memset a significantly more sane heuristic, enable it by default. | Chris Lattner | 2008-03-29 | 1 | -7/+49 | |
| | | | | llvm-svn: 48937 | |||||
* | make memset inference significantly more powerful: it can now handle | Chris Lattner | 2008-03-28 | 1 | -82/+184 | |
| | | | | | | | | | | memsets that initialize "structs of arrays" and other store sequences that are not sequential. This is still only enabled if you pass -form-memset-from-stores. The flag is not heavily tested and I haven't analyzed the perf regressions when -form-memset-from-stores is passed either, but this causes no make check regressions. llvm-svn: 48909 | |||||
* | Temporarily disabling memset forming optimization. Add an option. | Evan Cheng | 2008-03-24 | 1 | -0/+8 | |
| | | | | llvm-svn: 48720 | |||||
* | implement an initial hack at a straight-line store -> memset optimization. | Chris Lattner | 2008-03-22 | 1 | -6/+59 | |
| | | | | | | | | 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 | |||||
* | implement the logic for memset insertion and store deletion. | Chris Lattner | 2008-03-22 | 1 | -11/+49 | |
| | | | | llvm-svn: 48679 | |||||
* | This is a partially implemented and currently disabled start of a store | Chris Lattner | 2008-03-22 | 1 | -0/+159 | |
| | | | | | | merging optimization. Nothing to see here, hopefully more later :) llvm-svn: 48670 | |||||
* | the size of a smallvector shouldn't be part of the interface to these methods. | Chris Lattner | 2008-03-21 | 1 | -20/+18 | |
| | | | | llvm-svn: 48662 | |||||
* | make gvn marginally faster by reallocating the lastSeenLoad map for | Chris Lattner | 2008-03-21 | 1 | -3/+4 | |
| | | | | | | each basic block. llvm-svn: 48660 | |||||
* | Minor cleanups and shrinkification. | Chris Lattner | 2008-03-21 | 1 | -186/+114 | |
| | | | | llvm-svn: 48658 | |||||
* | Fix a bug in GVN that Duncan noticed, where we potentially need to insert a | Owen Anderson | 2008-03-13 | 1 | -1/+5 | |
| | | | | | | pointer bitcast when performing return slot optimization. llvm-svn: 48343 | |||||
* | Improve the return slot optimization to be both more aggressive (not limited ↵ | Owen Anderson | 2008-03-12 | 1 | -93/+109 | |
| | | | | | | | | | 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 | |||||
* | Fix an issue where GVN had the sizes of the two memcpy's reverse, resulting | Owen Anderson | 2008-02-26 | 1 | -2/+2 | |
| | | | | | | in an invalid transformation. llvm-svn: 47639 | |||||
* | Fix an issue where GVN was performing the return slot optimization when it was | Owen Anderson | 2008-02-25 | 1 | -8/+26 | |
| | | | | | | | not safe. This is fixed by more aggressively checking that the return slot is not used elsewhere in the function. llvm-svn: 47544 | |||||
* | Fix an issue where GVN would try to use an instruction before its definition ↵ | Owen Anderson | 2008-02-25 | 1 | -0/+7 | |
| | | | | | | when performing return slot optimization. llvm-svn: 47541 | |||||
* | Make Transforms to be 4.3 warnings-clean | Anton Korobeynikov | 2008-02-20 | 1 | -6/+6 | |
| | | | | llvm-svn: 47371 | |||||
* | When performing return slot optimization, remember to inform memdep when ↵ | Owen Anderson | 2008-02-20 | 1 | -0/+1 | |
| | | | | | | we're removing the memcpy. llvm-svn: 47364 | |||||
* | Refactor this method a bit, and correct a test that was completely wrong but ↵ | Owen Anderson | 2008-02-19 | 1 | -7/+11 | |
| | | | | | | happened to work out anyways. :-) llvm-svn: 47321 | |||||
* | isa+cast -> dyncast. | Chris Lattner | 2008-02-19 | 1 | -2/+2 | |
| | | | | llvm-svn: 47320 | |||||
* | simplify this code again, try 2 :) | Chris Lattner | 2008-02-19 | 1 | -7/+5 | |
| | | | | llvm-svn: 47319 | |||||
* | Fix a comment. | Owen Anderson | 2008-02-19 | 1 | -1/+1 | |
| | | | | llvm-svn: 47318 | |||||
* | Major improvements to yesterday's return slot optimization. Remove some ↵ | Owen Anderson | 2008-02-19 | 1 | -14/+39 | |
| | | | | | | | | unneccessary constraints, and add some others that should have been in from the first place. Document the whole thing better. llvm-svn: 47315 | |||||
* | Factor the profitability check for return slot optimization out into a ↵ | Owen Anderson | 2008-02-19 | 1 | -14/+26 | |
| | | | | | | | | static function. At some point in the future, this check will become smarter. llvm-svn: 47310 | |||||
* | An sret parameter is required to be the first parameter, so there's no need ↵ | Owen Anderson | 2008-02-19 | 1 | -8/+3 | |
| | | | | | | | | to loop over all the parameters of the callee looking for it. llvm-svn: 47309 | |||||
* | Cleanup some of my patches from yesterday. Refactor the check for which xform | Owen Anderson | 2008-02-19 | 1 | -22/+23 | |
| | | | | | | | to apply to a memcpy into processInstruction. Also, fix a bug in the check due to missing braces. llvm-svn: 47307 | |||||
* | Fix Transforms/GVN/memcpy.ll, which Chris broke in r47275 by reordering the ↵ | Owen Anderson | 2008-02-19 | 1 | -1/+2 | |
| | | | | | | branches. memcpy's are a kind of CallInst. llvm-svn: 47305 | |||||
* | minor code simplification, no functionality change. | Chris Lattner | 2008-02-18 | 1 | -8/+6 | |
| | | | | llvm-svn: 47275 | |||||
* | Add support to GVN for performing sret return slot optimization. This means ↵ | Owen Anderson | 2008-02-18 | 1 | -2/+66 | |
| | | | | | | | | | | | 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 | |||||
* | Fix PR2032. Inform the alias analysis of changes to the underlying program. | Nick Lewycky | 2008-02-14 | 1 | -0/+2 | |
| | | | | llvm-svn: 47111 | |||||
* | Re-apply the patch to improve the optimizations of memcpy's, with several | Owen Anderson | 2008-02-12 | 1 | -1/+79 | |
| | | | | | | bugs fixed. This now passes PPC bootstrap. llvm-svn: 47026 | |||||
* | Fix for bug 1996: optimize out loads of undef. This code basically just | Eli Friedman | 2008-02-12 | 1 | -1/+28 | |
| | | | | | | checks for a malloc/alloca immediately followed by a load. llvm-svn: 47006 |