[LLVMdev] [PATCH] Add functionality to scc_iterator
Patrick Alexander Simmons
simmon12 at cs.uiuc.edu
Thu Aug 6 16:19:53 PDT 2009
Chris Lattner wrote:
> On Aug 4, 2009, at 3:48 PM, Patrick Alexander Simmons wrote:
>
>
>> Hi,
>>
>> I've been using scc_iterator, and I added the templates necessary to
>> make it work with inverse graphs. I also added a "bb_reachable"
>> function to tell whether an arbitrary graph node is part of cycle.
>> Might this be useful to others?
>>
>
> Hi Patrick,
>
> The scc_begin/end specializations look fine. The "bb_reachable" name
> is not a good one though, it doesn't give any hint about what the
> function actually does. I don't think it is really generally useful
> enough to include in scciterator.h
>
> -Chris
>
I agree that bb_reachable is not the best name. How about "is_in_cycle"
instead? I think a function to tell whether an arbitrary graph node is
part of a cycle could be useful in a variety of circumstances; is there
another header file where it would be more appropriate?
--Patrick
More information about the llvm-dev
mailing list