[PATCH] D127115: [RFC][DAGCombine] Make sure combined nodes are added back to the worklist in topological order.

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 23 15:48:44 PDT 2022


barannikov88 added a comment.

In D127115#3674151 <https://reviews.llvm.org/D127115#3674151>, @deadalnix wrote:

> In D127115#3674147 <https://reviews.llvm.org/D127115#3674147>, @barannikov88 wrote:
>
>> @deadalnix 
>> Could you please answer this question? https://reviews.llvm.org/D127115/new/#3668015
>>
>>> Does the topological order here mean that the DAG will be traversed from the root to leaves (RPO) or from the leaves to the root (PO)?
>
>
>
> - The code answer that question.
> - The diff's description answer that question.
> - Several comments in the thread already answer that question.
>
> It'll visit arguments before the node that use arguments. It's the whole point.

That is great, thank you! I couldn't figure this out from the sources you mentioned. Just that "topological sorting" sounds ambiguous to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127115/new/

https://reviews.llvm.org/D127115



More information about the llvm-commits mailing list