This is an archive of the discontinued LLVM Phabricator instance.

[mlir][affine] fix loop fusion not fusing loops with non-constant loop bounds
Needs ReviewPublic

Authored by anoopjs on Apr 17 2023, 12:14 PM.

Details

Summary

Loop fusion fails for loops with non-constant bounds. Addresses the issue mentioned here https://github.com/llvm/llvm-project/issues/61784

Diff Detail

Event Timeline

anoopjs created this revision.Apr 17 2023, 12:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 12:14 PM
anoopjs requested review of this revision.Apr 17 2023, 12:14 PM
anoopjs updated this revision to Diff 514359.Apr 17 2023, 12:20 PM

fix indentation

Can you edit the commit summary to include the link to the github issue that this is fixing? https://github.com/llvm/llvm-project/issues/61784

anoopjs edited the summary of this revision. (Show Details)Apr 24 2023, 2:16 AM

Can you edit the commit summary to include the link to the github issue that this is fixing? https://github.com/llvm/llvm-project/issues/61784

Done

Sorry for the delayed response; some comments/questions below.

mlir/lib/Dialect/Affine/Analysis/Utils.cpp
710

The set difference utility can now handle this? Can you expand the commit summary?

732

Need a code comment.

mlir/test/Transforms/loop-fusion-4.mlir
203–212

A single test case here is insufficient. Can you add one where the bounds don't match, i.e., different symbols, or a symbol which is effectively the other symbol + 1.