function pass to visit BB bottom-up order

Hello llvmdevs,

In a function pass, I need to visit all the basic blocks in bottom-up order (the exact opposite of ReversePostOrderTraversal). I noticed some APIs like po_iterator but wasn’t able to figure out an example usage for this on web. Any pointers/suggestions are highly appreciated.

Thanks,
Ananth

Already found an answer - there’s an example usage for po_iterator in llvm/lib/Analysis/BranchProbabilityInfo.cpp and that works for me.

thanks,
Ananth