[llvm] [DAGCombine] Add all users of the instruction recursively into worklist when an instruction is simplified (PR #91772)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 18:53:40 PDT 2024


https://github.com/nikic requested changes to this pull request.

> > This is trying to achieve the same thing as the topological dag patches (https://github.com/RKSimon/llvm-project/tree/perf/topological-dag / #77475)
> 
> Question: what's the motivation of https://github.com/RKSimon/llvm-project/tree/perf/topological-dag / #77475 ? To reduce the compile time?

Not primarily at least. The motivation for that change is the same motivation as for this pull request, just implemented properly. If we visit nodes in the correct order, then there is no need to requeue them recursively.

(I tried to measure the compile-time impact of this patch, but it's not even possible because this basically makes time to compile stage2 clang infinite.)

https://github.com/llvm/llvm-project/pull/91772


More information about the llvm-commits mailing list