summaryrefslogtreecommitdiff
path: root/lib/Transforms
Commit message (Collapse)AuthorAge
...
* completely remove a transformation that is unsafe in the face ofChris Lattner2007-07-23
| | | | | | | undefs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40439 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply temporary work around to fix llvm mis-compilationDevang Patel2007-07-21
| | | | | | | reported in PR 1556. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40133 91177308-0d34-0410-b5e6-96231b3b80d8
* this xform is already done by the constant folder.Chris Lattner2007-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40124 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize alignment of loads and stores.Dan Gohman2007-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40102 91177308-0d34-0410-b5e6-96231b3b80d8
* Place SCCPSolver also in the anonymous namespace. ThisDuncan Sands2007-07-20
| | | | | | | pacifies g++-4.2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40089 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug where we were marking GEP expressions with the wrong opcode.Owen Anderson2007-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40085 91177308-0d34-0410-b5e6-96231b3b80d8
* Make val_replace fail early, which reduces the time to optimize 403.gcc to ↵Owen Anderson2007-07-19
| | | | | | 14.8s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40064 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify loop info.Devang Patel2007-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40062 91177308-0d34-0410-b5e6-96231b3b80d8
* Use SmallVector and DenseMap in even more places.Owen Anderson2007-07-19
| | | | | | | With this, the time to optimize 403.gcc is down to 15.1s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40042 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ValueTable to use a DenseMap for mapping expressions to value numbers.Owen Anderson2007-07-19
| | | | | | | This results in a slight speedup for 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40040 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some sets and maps to SmallPtrSet and DenseMap respectively. This Owen Anderson2007-07-19
| | | | | | | reduces the time to optimize 403.gcc from 17.6s to 16.4s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40036 91177308-0d34-0410-b5e6-96231b3b80d8
* After a basic block is split into two parts,Devang Patel2007-07-19
| | | | | | | | | | second part dominates all the blocks dominated by original basic block. And first part dominates second part. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40035 91177308-0d34-0410-b5e6-96231b3b80d8
* Now this temp. fix is not required.Devang Patel2007-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40034 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Devang Patel2007-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40025 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dominator info update to accommodate CFG changes.Devang Patel2007-07-18
| | | | | | | This fixes PR1559. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40024 91177308-0d34-0410-b5e6-96231b3b80d8
* Take advantage of undefined behavior if the source program tries to GEPOwen Anderson2007-07-16
| | | | | | | beyond the end of an alloca to make FastDSE faster and more aggressive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39945 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for walking up memory def chains, which enables finding many moreOwen Anderson2007-07-16
| | | | | | | dead stores on 400.perlbench. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39929 91177308-0d34-0410-b5e6-96231b3b80d8
* Return Undef if the block has no dominator. This was required to allowReid Spencer2007-07-16
| | | | | | | | | llvm-gcc build to succeed. Without this change it fails in libstdc++ compilation. This causes no regressions in dejagnu tests. However, someone who knows this code better might want to review it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39924 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments about vectors to use the current wording.Dan Gohman2007-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39921 91177308-0d34-0410-b5e6-96231b3b80d8
* Repair a regression in Transforms/InstCombine/mul.ll that Reid noticed.Chris Lattner2007-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39896 91177308-0d34-0410-b5e6-96231b3b80d8
* Start adding and cleaning up comments.Nick Lewycky2007-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39894 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement shift-simplify.ll:test[45].Chris Lattner2007-07-15
| | | | | | | | | | | | | First teach instcombine that sign bit checks only demand the sign bit, this allows simplify demanded bits to hack on expressions better. Second, teach instcombine that ashr is useless if only the sign bit is demanded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39880 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement shift-simplify.ll:test3, turning:Chris Lattner2007-07-15
| | | | | | | | | (X << 31) <s 0 --> (X&1) != 0 This happens dozens of times in the CFE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39879 91177308-0d34-0410-b5e6-96231b3b80d8
* Use maximal intersection algorithm exclusively. Fixes miscompile bug.Nick Lewycky2007-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39852 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LCSSA a loop pass.Devang Patel2007-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39844 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle GEPs with all-zero indices in the same way we handle pointer-pointer ↵Owen Anderson2007-07-13
| | | | | | | | | bitcasts. Also, fix a potentia infinite loop. This brings FastDSE to parity with old DSE on 175.vpr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39839 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable claims to preserve analysis until open issues are resolved.Devang Patel2007-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39834 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more aggressive in removing dead stores, and in removing instructions ↵Owen Anderson2007-07-13
| | | | | | | | | trivially dead after DSE. This drastically improves the effect of FastDSE on kimwitu++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39819 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement removing stores to allocas at the end of a function. This ↵Owen Anderson2007-07-12
| | | | | | should be safe now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39790 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the condition-checking for free with non-trivial dependencies more correct.Owen Anderson2007-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39789 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the end-block handling code. It was unsafe, and making it safe would ↵Owen Anderson2007-07-12
| | | | | | have resulted in falling back to the slow DSE case. I need to think some more about the right way to handle this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39788 91177308-0d34-0410-b5e6-96231b3b80d8
* checked in as obvious,Gabor Greif2007-07-12
| | | | | | | thanks Benoit Boissinot! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39774 91177308-0d34-0410-b5e6-96231b3b80d8
* Let MemoryDependenceAnalysis take care of updating AliasAnalysis.Owen Anderson2007-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39769 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve analysis info.Devang Patel2007-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39767 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle the case where an entire structure is freed, and its dependency is a ↵Owen Anderson2007-07-11
| | | | | | | | | | | store to a field within that structure. Also, refactor the runOnBasicBlock() function, splitting some of the special cases into separate functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39762 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for eliminate stores to stack-allocated memory locations at the endOwen Anderson2007-07-11
| | | | | | | of a function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39754 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle eliminating stores that occur right before a free.Owen Anderson2007-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39753 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up a few things based on Chris' feedback.Owen Anderson2007-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39747 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding ability to demote phi to stack. Tanya Lattner2007-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39744 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FastDSE, a new algorithm for doing dead store elimination. This ↵Owen Anderson2007-07-11
| | | | | | | | | | | | algorithm is not as accurate as the current DSE, but it only a linear scan over each block, rather than quadratic. Eventually (once it has been improved somewhat), this will replace the current DSE. NOTE: This has not yet been extensively tested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38517 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the pass registration static.Owen Anderson2007-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38508 91177308-0d34-0410-b5e6-96231b3b80d8
* During module cloning copy aliases too. This fixes PR1544Anton Korobeynikov2007-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38505 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the ValueRanges interface to use value numbers instead of Value*s.Nick Lewycky2007-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38483 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some key maps from std::map to DenseMap. This improves the time to ↵Owen Anderson2007-07-10
| | | | | | | | | optimize Anton's testcase from 17.5s to 15.7s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38480 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a cheaper test, delaying calling find_leader() until we know that it's ↵Owen Anderson2007-07-10
| | | | | | | | | necessary. This improves the time to optimize Anton's testcase from 21.1s to 17.6s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38479 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion if find_leader fails.Owen Anderson2007-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38477 91177308-0d34-0410-b5e6-96231b3b80d8
* Take advantage of the new fast SmallPtrSet assignment operator when ↵Owen Anderson2007-07-09
| | | | | | | | | propagating AVAIL_OUT sets. This reduces the time to optimize Anton's testcase from 31.2s to 21.s! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38475 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose struct size threhold to allow users to tweak their own setting.Devang Patel2007-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38472 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment.Owen Anderson2007-07-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38459 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve a hotspot that was making build_sets() slower by calling lookup() tooOwen Anderson2007-07-09
| | | | | | | often. This improves Anton's testcase from 36s to 32s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38441 91177308-0d34-0410-b5e6-96231b3b80d8