summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ADCE.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ADCE] Don't indent inside an anonymous namespaceHal Finkel2015-02-161-11/+10
| | | | | | | To be consistent with what clang-format does, don't add extra indentation inside an anonymous namespace. NFC. llvm-svn: 229412
* [ADCE] Convert another loop for a range-based forHal Finkel2015-02-151-2/+2
| | | | | | We can use a range-based for for the operands loop too; NFC. llvm-svn: 229319
* [ADCE] Use inst_range and range-based forsHal Finkel2015-02-151-14/+13
| | | | | | Convert a few loops to range-based fors; NFC. llvm-svn: 229318
* [ADCE] Fix formatting of pointer typesHal Finkel2015-02-151-2/+2
| | | | | | We prefer to put the * with the variable, not with the type; NFC. llvm-svn: 229317
* [ADCE] Fix capitalization of another local variableHal Finkel2015-02-151-2/+2
| | | | | | Bring another local variable in compliance with our naming conventions, NFC. llvm-svn: 229316
* [ADCE] Fix capitalization of some local variablesHal Finkel2015-02-151-14/+14
| | | | | | Bring some local variables in compliance with our naming conventions, NFC. llvm-svn: 229315
* Update SetVector to rely on the underlying set's insert to return a ↵David Blaikie2014-11-191-1/+1
| | | | | | | | | | | | | pair<iterator, bool> This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions... llvm-svn: 222334
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | | | | | | | | definition below all of the header #include lines, lib/Transforms/... edition. This one is tricky for two reasons. We again have a couple of passes that define something else before the includes as well. I've sunk their name macros with the DEBUG_TYPE. Also, InstCombine contains headers that need DEBUG_TYPE, so now those headers #define and #undef DEBUG_TYPE around their code, leaving them well formed modular headers. Fixing these headers was a large motivation for all of these changes, as "leaky" macros of this form are hard on the modules implementation. llvm-svn: 206844
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-051-2/+2
| | | | | | class. llvm-svn: 202953
* [Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth2014-03-041-1/+1
| | | | | | IR types. llvm-svn: 202827
* [Modules] Move InstIterator out of the Support library, where it had noChandler Carruth2014-03-041-1/+1
| | | | | | | | | | | | | business. This header includes Function and BasicBlock and directly uses the interfaces of both classes. It has to do with the IR, it even has that in the name. =] Put it in the library it belongs to. This is one step toward making LLVM's Support library survive a C++ modules bootstrap. llvm-svn: 202814
* Disable most IR-level transform passes on functions marked 'optnone'.Paul Robinson2014-02-061-0/+3
| | | | | | | | | Ideally only those transform passes that run at -O0 remain enabled, in reality we get as close as we reasonably can. Passes are responsible for disabling themselves, it's not the job of the pass manager to do it for them. llvm-svn: 200892
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-041-1/+1
| | | | | | specifying the vector size. llvm-svn: 185606
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-3/+3
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-4/+4
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Clean whitespaces.Nadav Rotem2012-07-241-8/+8
| | | | llvm-svn: 160668
* The landingpad instruction isn't dead simply because it's value isn't used.Bill Wendling2011-08-191-1/+1
| | | | llvm-svn: 138102
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-1/+1
| | | | llvm-svn: 109045
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-1/+1
| | | | llvm-svn: 106542
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-051-2/+1
| | | | | | non-zero trip count. Use SmallVector's pop_back_val(). llvm-svn: 92734
* eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861Chris Lattner2009-09-021-3/+1
| | | | llvm-svn: 80766
* Allow readonly functions to unwind exceptions. TeachDuncan Sands2009-05-061-1/+1
| | | | | | | | the optimizers about this. For example, a readonly function with no uses cannot be removed unless it is also marked nounwind. llvm-svn: 71071
* Re-commit 65975 and a fix for the problem thatDale Johannesen2009-03-041-0/+2
| | | | | | | was causing llvm-gcc to fail to build. I've verified it bootstraps now; good enough for me. llvm-svn: 66073
* Let instcombiner remove redundant dbg intrinsics.Devang Patel2008-11-191-7/+1
| | | | llvm-svn: 59658
* Cleanup debug info. assocated with deleted instructions.Devang Patel2008-11-111-2/+7
| | | | llvm-svn: 59012
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Remove the ability for ADCE to remove unreachable blocks in loop nests, ↵Owen Anderson2008-07-031-38/+0
| | | | | | because, as Eli pointed out, SimplifyCFG already does this. llvm-svn: 53104
* Use df_ext_iterator to capture the reachable set without allocating an extra ↵Owen Anderson2008-07-021-17/+14
| | | | | | | | | set. Also, move large sets and vectors out of instance variables and onto the stack, and give them more reasonable sizes. llvm-svn: 53044
* Add support to ADCE for pruning unreachable blocks. This addresses the finalOwen Anderson2008-07-021-1/+43
| | | | | | part of PR2509. llvm-svn: 53038
* Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSetOwen Anderson2008-07-021-2/+2
| | | | | | with a huge "size" parameter is actually quite inefficient. llvm-svn: 53034
* At Chris' suggestion, move the liveness and worklist datastructures intoOwen Anderson2008-06-231-7/+11
| | | | | | | instance variables so they can be allocated just once, and reuse the worklist as the dead list as well. llvm-svn: 52618
* Add a newline at the end of this file.Duncan Sands2008-05-291-1/+1
| | | | llvm-svn: 51680
* Replace the old ADCE implementation with a new one that more simply solvesOwen Anderson2008-05-291-457/+62
| | | | | | | | | the one case that ADCE catches that normal DCE doesn't: non-induction variable loop computations. This implementation handles this problem without using postdominators. llvm-svn: 51668
* Remove ADCE's ability to delete loops. This ability is now implemented in aOwen Anderson2008-05-161-4/+21
| | | | | | safer manner by loop deletion. llvm-svn: 51182
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+3
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-3/+3
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Integrate the readonly/readnone logic more deeplyDuncan Sands2007-12-011-2/+1
| | | | | | | | | | | | | | | 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. llvm-svn: 44487
* Readonly/readnone functions are allowed to throwDuncan Sands2007-11-221-27/+1
| | | | | | | exceptions, so don't turn invokes of them into calls. llvm-svn: 44278
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-1/+1
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/gDevang Patel2007-06-041-2/+2
| | | | llvm-svn: 37407
* s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/gDevang Patel2007-06-031-2/+2
| | | | llvm-svn: 37403
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
OpenPOWER on IntegriCloud