summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CFG.h
Commit message (Collapse)AuthorAge
* Fix size_t -> uint warnings with MSVC 64-bit buildMatt Arsenault2013-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186736 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable pod-like optimizations for pred and succ iterators.Benjamin Kramer2013-05-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182257 91177308-0d34-0410-b5e6-96231b3b80d8
* Seciton 24.2.2 of the C++ standard, [iterator.iterators], Table 106Howard Hinnant2013-03-28
| | | | | | | | | | | | | | | | | | | | | requires that the return type of *r for all iterators r be reference, where reference is defined in [iterator.requirements.general]/p11 as iterator_traits<X>::reference, and X is the type of r. But in CFG.h, the dereference operator of PredIterator and SuccIterator return pointer, not reference. Furthermore the nested type reference is value_type&, which is not the type returned from operator*(). This patch simply makes the iterator::reference type value_type*, which is what the operator*() returns, and then re-lables the return type as reference. From a functionality point of view, the only difference is that the nested reference type is now value_type* instead of value_type&. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178240 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Calls and invokes with the new clang.arc.no_objc_arc_exceptionsDan Gohman2012-02-17
| | | | | | | | | metadata may still unwind, but only in ways that the ARC optimizer doesn't need to consider. This permits more aggressive optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150829 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the Dominators recalculate() function to only rely on GraphTraitsAnna Zaks2011-12-05
| | | | | | | | | | | This is a patch by Guoping Long! As part of utilizing LLVM Dominator computation in Clang, made two changes to LLVM dominators tree implementation: - (1) Change the recalculate() template function to only rely on GraphTraits. - (2) Add a size() method to GraphTraits template class to query the number of nodes in the graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145837 91177308-0d34-0410-b5e6-96231b3b80d8
* SuccIterator on bbs without terminator instsTobias Grosser2011-07-04
| | | | | | | | | Remove the assert that triggers if SuccIterator is constructed for a basic block without a terminator instruction. Instead of triggering an assert a succ_end() iterator is returned. This models a basic block with zero successors and allows us to use F->viewCFG() on incompletely constructed functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134398 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-23
| | | | | | | -Wshorten-64-to-32 warning in Instructions.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133708 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r133513:Eric Christopher2011-06-23
| | | | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133700 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate r133435 and r133449 (reverted in r133499) now that the clangJay Foad2011-06-21
| | | | | | self-hosted build failure has been fixed (r133512). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133513 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r133435 and r133449 to appease buildbots.Chad Rosier2011-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133499 91177308-0d34-0410-b5e6-96231b3b80d8
* Change how PHINodes store their operands.Jay Foad2011-06-20
| | | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133435 91177308-0d34-0410-b5e6-96231b3b80d8
* Make pred_iterator DefaultConstructible, and add an accessor toDan Gohman2011-03-02
| | | | | | | retrieve the underlying getOperandNo() value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126804 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unneeded parensGabor Greif2010-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107881 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace, comments.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101247 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101246 91177308-0d34-0410-b5e6-96231b3b80d8
* Use C++, not C++-standard-library-internals-ese.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101245 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SuccIterator's private parts private too.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101244 91177308-0d34-0410-b5e6-96231b3b80d8
* Make helper utility members private.Dan Gohman2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101243 91177308-0d34-0410-b5e6-96231b3b80d8
* rename pred_const_iterator to const_pred_iterator for consistency's sakeGabor Greif2010-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99567 91177308-0d34-0410-b5e6-96231b3b80d8
* rename use_const_iterator to const_use_iterator for consistency's sakeGabor Greif2010-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99564 91177308-0d34-0410-b5e6-96231b3b80d8
* Revive dead assert.Benjamin Kramer2010-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93638 91177308-0d34-0410-b5e6-96231b3b80d8
* Add getSource() to SuccIteratorTobias Grosser2010-01-13
| | | | | | Get the source BB of an iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93364 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend SuccIteratorTobias Grosser2010-01-13
| | | | | | | Implement most of the missing methods to make SuccIterator random access. operator[] is still missing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93363 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate all 80-col violations that I have introduced in my recent checkins ↵Gabor Greif2009-08-27
| | | | | | (and some others more) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80304 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the minor mess I caused with removing iterator.h. I shall take care ↵Gabor Greif2009-08-27
| | | | | | of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80224 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"Anton Korobeynikov2008-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51687 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-25
| | | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50265 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoops! Undo r50087, unbreak the build.Nick Lewycky2008-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50088 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse r47989. Part of removing 'unwinds to' support.Nick Lewycky2008-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50087 91177308-0d34-0410-b5e6-96231b3b80d8
* Workaround for PR2207, in which pred_iterator assert gets triggered due to aScott Michel2008-04-16
| | | | | | | wee problem in Xcode 2.[45]/gcc 4.0.1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49831 91177308-0d34-0410-b5e6-96231b3b80d8
* Treat BBs that use BBs as proper predecessors and successors in the CFG.Nick Lewycky2008-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47989 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-29
| | | | | | | | discussion of this change. Boy are my fingers tired. ;-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new use_iterator::atEnd() method, which allows us to shrinkChris Lattner2007-10-11
| | | | | | | pred_iterator down to a single ivar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42859 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21411 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch from using an ilist for uses to using a custom doubly linked list.Chris Lattner2005-02-01
| | | | | | | | | | | | | | | | | | | | | This list does not provide the ability to go backwards in the list (its more of an unordered collection, stored in the shape of a list). This change means that use iterators are now only forward iterators, not bidirectional. This improves the memory usage of use lists from '5 + 4*#use' per value to '1 + 4*#use'. While it would be better to reduce the multiplied factor, I'm not smart enough to do so. This list also has slightly more efficient operators for manipulating list nodes (a few less loads/stores), due to not needing to be able to iterate backwards through the list. This change reduces the memory footprint required to hold 176.gcc from 66.025M -> 57.687M, a 14% reduction. It also speeds up the compiler, 7.73% in the case of bytecode loading alone (release build loading 176.gcc). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19956 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Starting an identifier with an _ is not legal C/C++ code.Chris Lattner2004-05-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13620 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the GraphTraits for MachineBasicBlocks to the MachineBasicBlock file.Chris Lattner2004-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13299 91177308-0d34-0410-b5e6-96231b3b80d8
* Add machine-CFG graph traits specializations.Brian Gaeke2004-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13288 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* No really, I'm not on crackChris Lattner2003-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9855 91177308-0d34-0410-b5e6-96231b3b80d8
* Helper methodChris Lattner2003-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9854 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM copyright header (for lack of a better term).John Criswell2003-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
* Standardize header file commentsChris Lattner2003-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Function::getEntryNode -> getEntryBlockChris Lattner2003-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8625 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a ton of extraneous #includesChris Lattner2003-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
* Included assert.h so that the code compiles under newer versions of GCC.John Criswell2003-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert last checkin. Note that PHI nodes can use basic blocks also!Chris Lattner2003-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5956 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove long-dead obsolete cruftChris Lattner2003-04-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5955 91177308-0d34-0410-b5e6-96231b3b80d8