This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix getCommonBlock utility in affine analysis
ClosedPublic

Authored by bondhugula on Jul 29 2022, 1:17 AM.

Details

Summary

Fix the hardcoded check for FuncOp in getCommonBlock utility: the
check should have been for an op that starts an affine scope. The
incorrect block returned in turn causes dependence analysis to function
incorrectly.

This change allows affine store-load forwarding to work correctly inside
any ops that start an affine scope.

Diff Detail

Event Timeline

bondhugula created this revision.Jul 29 2022, 1:17 AM
bondhugula requested review of this revision.Jul 29 2022, 1:17 AM

Trim the test case a bit.

ftynse accepted this revision.Jul 29 2022, 4:47 AM
This revision is now accepted and ready to land.Jul 29 2022, 4:47 AM
dcaballe accepted this revision.Jul 29 2022, 9:25 AM

Thanks!

This revision was automatically updated to reflect the committed changes.