Allow for customized graph edge pruning in PostOrderIterator.h
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 17 Jul 2012 15:35:40 +0000 (15:35 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 17 Jul 2012 15:35:40 +0000 (15:35 +0000)
commit31f18eeb2bff53ce48c9c980f0b0676401d593c8
tree2c14394011c8fb010cb7871545e2650ef35f77be
parent9d26b0ba06479d9debadebce19344169f72407dd
Allow for customized graph edge pruning in PostOrderIterator.h

Make it possible to prune individual graph edges from a post-order
traversal by specializing the po_iterator_storage template. Previously,
it was only possible to prune full graph nodes. Edge pruning makes it
possible to remove loop back-edges, for example.

Also replace the existing DFSetTraits customization hook with a
po_iterator_storage method for observing the post-order. DFSetTraits was
only used by LoopIterator.h which now provides a po_iterator_storage
specialization.

Thanks to Sean and Chandler for reviewing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160366 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/PostOrderIterator.h
include/llvm/Analysis/LoopIterator.h