Files
clang-p2996/mlir/lib/Dialect/Affine/Transforms/LoopFusion.cpp
Uday Bondhugula 4b9e2f8fe0 [MLIR][Affine] Make fusion helper check method significantly more efficient
The `hasDependencePath` method in affine fusion is quite inefficient as
it does a DFS on the complete graph for what is a small part of the
checks before fusion can be performed. Make this efficient by using the
fact that the nodes involved are all at the top-level of the same block.
With this change, for large graphs with about 10,000 nodes, the check
runs in a few seconds instead of not terminating even in a few hours.

This is NFC from a functionality standpoint; it only leads to an
improvement in pass running time on large IR.

Differential Revision: https://reviews.llvm.org/D140522
2022-12-29 01:50:29 +05:30

84 KiB