DFS'ing DominatorTree

I’m looking for something like GCC’s domwalk: https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/domwalk.c?view=markup.

Just in case I am not missing anything, do we have a library function to walk a DominatorTree in the DFS order instead of writing that from scratch?

Jingyue

I found DepthFirstIterator is what I need.

Jingyue