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

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 17:01:51 PDT 2022


deadalnix added a comment.

In D127115#3656305 <https://reviews.llvm.org/D127115#3656305>, @barannikov88 wrote:

> If C precedes A in the visit order, this is just fine. However, if A is visited first and then C -> D is combined into E, then A will not be revisited (because it is not immediate successor or predecessor of C), and the pattern A -> B -> E will not be matched.
> For this reason I have to match both A -> B -> C -> D and A -> B -> E. Will your patch help with this issue or is it something unrelated?

This patch enforces the order for a subset of scenarii. The goal is to indeed enforce proper order in all cases. As you can see, this is not so easy to move forward with this, as it tends to have a "shotgun" impact on all kind of parts of the codegen, but we'll get there eventually.


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