df_iterator is intended for directed acyclic graphs, and as such keeps a list of visited nodes to not reenter. There is no need for that complexity when visiting a tree, such as DominatorTree. This reduces the amount of work done for each dominated node.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
Event Timeline
Comment Actions
IMO you could introduce df_iterator_tree_storage by a slight modification to the default one:
// df_iterator_storage - A private class which is used to figure out where to // store the visited set. template<class SetType, bool External> // Non-external set class df_iterator_storage { public: SetType Visited; };
Where your custom SetType does nothing on insertion and always returns that count is 0. Then you could potentially give it an alias like df_tree_iterator, or some better name.