summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/DepthFirstIteratorTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Modify df_iterator to support post-order actionsDavid Callahan2016-10-051-0/+2
| | | | | | | | | | | | Summary: This makes a change to the state used to maintain visited information for depth first iterator. We know assume a method "completed(...)" which is called after all children of a node have been visited. In all existing cases, this method does nothing so this patch has no functional changes. It will however allow a client to distinguish back from cross edges in a DFS tree. Reviewers: nadav, mehdi_amini, dberlin Subscribers: MatzeB, mzolotukhin, twoh, freik, llvm-commits Differential Revision: https://reviews.llvm.org/D25191 llvm-svn: 283391
* [ADT] Actually mutate the iterator VisitStack.back().second, not its copy.Tim Shen2016-08-221-0/+52
Summary: Before the change, *Opt never actually gets updated by the end of toNext(), so for every next time the loop has to start over from child_begin(). This bug doesn't affect the correctness, since Visited prevents it from re-entering the same node again; but it's slow. Reviewers: dberris, dblaikie, dannyb Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23649 llvm-svn: 279482
OpenPOWER on IntegriCloud