summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/ADCE.cpp
Commit message (Collapse)AuthorAge
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-05
| | | | | | | non-zero trip count. Use SmallVector's pop_back_val(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92734 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80766 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow readonly functions to unwind exceptions. TeachDuncan Sands2009-05-06
| | | | | | | | | the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71071 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit 65975 and a fix for the problem thatDale Johannesen2009-03-04
| | | | | | | | | was causing llvm-gcc to fail to build. I've verified it bootstraps now; good enough for me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66073 91177308-0d34-0410-b5e6-96231b3b80d8
* Let instcombiner remove redundant dbg intrinsics.Devang Patel2008-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59658 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup debug info. assocated with deleted instructions.Devang Patel2008-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59012 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the ability for ADCE to remove unreachable blocks in loop nests, ↵Owen Anderson2008-07-03
| | | | | | because, as Eli pointed out, SimplifyCFG already does this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53104 91177308-0d34-0410-b5e6-96231b3b80d8
* Use df_ext_iterator to capture the reachable set without allocating an extra ↵Owen Anderson2008-07-02
| | | | | | | | | | set. Also, move large sets and vectors out of instance variables and onto the stack, and give them more reasonable sizes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53044 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to ADCE for pruning unreachable blocks. This addresses the finalOwen Anderson2008-07-02
| | | | | | | part of PR2509. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53038 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSetOwen Anderson2008-07-02
| | | | | | | with a huge "size" parameter is actually quite inefficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53034 91177308-0d34-0410-b5e6-96231b3b80d8
* At Chris' suggestion, move the liveness and worklist datastructures intoOwen Anderson2008-06-23
| | | | | | | | instance variables so they can be allocated just once, and reuse the worklist as the dead list as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52618 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a newline at the end of this file.Duncan Sands2008-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51680 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the old ADCE implementation with a new one that more simply solvesOwen Anderson2008-05-29
| | | | | | | | | | the one case that ADCE catches that normal DCE doesn't: non-induction variable loop computations. This implementation handles this problem without using postdominators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51668 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ADCE's ability to delete loops. This ability is now implemented in aOwen Anderson2008-05-16
| | | | | | | safer manner by loop deletion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51182 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-13
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Integrate the readonly/readnone logic more deeplyDuncan Sands2007-12-01
| | | | | | | | | | | | | | | | into alias analysis. This meant updating the API which now has versions of the getModRefBehavior, doesNotAccessMemory and onlyReadsMemory methods which take a callsite parameter. These should be used unless the callsite is not known, since in general they can do a better job than the versions that take a function. Also, users should no longer call the version of getModRefBehavior that takes both a function and a callsite. To reduce the chance of misuse it is now protected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44487 91177308-0d34-0410-b5e6-96231b3b80d8
* Readonly/readnone functions are allowed to throwDuncan Sands2007-11-22
| | | | | | | | exceptions, so don't turn invokes of them into calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44278 91177308-0d34-0410-b5e6-96231b3b80d8
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-01
| | | | | | | | | indexing an empty std::vector. Updates to all clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
* s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/gDevang Patel2007-06-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37407 91177308-0d34-0410-b5e6-96231b3b80d8
* s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/gDevang Patel2007-06-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37403 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert changes that caused breakage.Owen Anderson2007-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36255 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ETForest instead of DominatorTree.Owen Anderson2007-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36249 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate use of ctors that take vectors.Chris Lattner2007-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34219 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code by using value::takenameChris Lattner2007-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34176 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-05
| | | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch over Transforms/Scalar to use the STATISTIC macro. For each statisticChris Lattner2006-12-19
| | | | | | | | converted, we lose a static initializer. This also allows GCC to emit warnings about unused statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-06
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed #include <iostream> and replaced with llvm_* streams.Bill Wendling2006-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31923 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded hook. Patch by Anton K. Thanks!Chris Lattner2006-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28664 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a -pedantic warning.Chris Lattner2006-06-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28632 91177308-0d34-0410-b5e6-96231b3b80d8
* Make iostream #inclusion explicitChris Lattner2006-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodesChris Lattner2005-10-24
| | | | | | | code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23931 91177308-0d34-0410-b5e6-96231b3b80d8
* preserve calling conventions when hacking on codeChris Lattner2005-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22024 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate tabs and trailing spacesJeff Cohen2005-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of bind_objChris Lattner2005-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20276 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not mark obviously unreachable blocks live when processing PHI nodes,Chris Lattner2005-02-17
| | | | | | | | | | | | | and handle incomplete control dependences correctly. This fixes: Regression/Transforms/ADCE/dead-phi-edge.ll -> a missed optimization Regression/Transforms/ADCE/dead-phi-edge.ll -> a compiler crash distilled from QT4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20227 91177308-0d34-0410-b5e6-96231b3b80d8
* Change indentation of a whole bunch of code, no real changes here.Chris Lattner2004-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18843 91177308-0d34-0410-b5e6-96231b3b80d8
* More substantial simplifications and speedups. This makes ADCE about 20% fasterChris Lattner2004-12-12
| | | | | | | in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18842 91177308-0d34-0410-b5e6-96231b3b80d8
* More minor microoptimizationsChris Lattner2004-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18841 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some more set operationsChris Lattner2004-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18840 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce number of set operations.Chris Lattner2004-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18839 91177308-0d34-0410-b5e6-96231b3b80d8