[LLVMdev] SCCIterator and unconnected graphs

Chris Lattner clattner at apple.com
Mon Sep 14 23:54:25 PDT 2009


On Sep 3, 2009, at 4:15 AM, Hans Vandierendonck wrote:
Hi,
>
> I am using the scc_iterator class in my code on a CallGraph, where  
> some
> functions are not called from within the module. It seems that
> scc_iterator does not list all SCCs if the graph is not connected;  
> only
> those nodes connected to the node pointed to by
> GraphTraits<...>::getEntryNode() are returned.
>
> Can someone verify this behavior?
> Any tips on how I should go about extending the class in order to  
> visit
> all SCCs?
> Is it desirable to augment the scc_iterator class itself, or should I
> construct another one? The change in behavior may impact things such  
> as
> CallGraphSCCPass, GlobalsModRef, etc. and I don't know if it is
> desirable to have that change there.

This definitely sounds bad, but doesn't match what I'm seeing with the  
callgraphscc passmanager.  How are you using SCCIterator?

-Chris



More information about the llvm-dev mailing list