LLVM code that converts Digraph to DAG through SCC collapsing.

Hi Fellows,

I am looking for an example implementation in the LLVM source that involves collapsing SCCs into one node so as to convert the original directional cyclic graph to a DAG? I need to do the same to some control dependence graphs, and would like to see what is the best way to take advantage of the current LLVM APIs for that purpose. Thanks a lot in advance.

Best Regards,
Paul