mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 23:16:05 +00:00

Fixes: https://github.com/llvm/llvm-project/issues/61820 Fix affine fusion in the presence of cyclic deps in the source nest. In such cases, the nest being fused can't be executed multiple times. Add a utility to check for dependence cycles and use it in fusion. This fixes both sibling as well as producer consumer fusion where nests with cyclic dependences (typically reductions) were being in some cases incorrectly fused in. The test case also exercises/required a fix to the check for the redundant computation being within the specified threshold.