[PATCH] D25191: Modify df_iterator to support post-order actions

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 11:48:26 PDT 2016


(and if you want to differentiate back and cross edges, you either need to
track the DFS numbers to see if they are ancestors or walk the entire
visitstack)

On Mon, Oct 3, 2016 at 11:34 AM, Daniel Berlin <dberlin at dberlin.org> wrote:

> It's not strictly necessary if you restructured the storage  a bit (you
> can do it with just insert, because any element you go to insert and it
> already exists means you hit a backedge).  If the insert call took the
> "from" node as well, you could just mark from->to as a backedge anytime you
> go to insert it and it's already there.
>
> If you keep the iterator structured as is, the backedges are the nodes
> that are visited but not completed when you hit them again (IE i can't see
> how to do this without modifying insert there too).
>
> But you have the same problem in keeping track of the from node.
>
>
>
>
>
> On Mon, Oct 3, 2016, 11:23 AM Mehdi AMINI <mehdi.amini at apple.com> wrote:
>
>> mehdi_amini added a comment.
>>
>> This looks fine to me as well.
>> (I don't know how you'll figure back-edge with it, but I'll see in the
>> next patch)
>>
>>
>> https://reviews.llvm.org/D25191
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/a94276dc/attachment.html>


More information about the llvm-commits mailing list