This is an archive of the discontinued LLVM Phabricator instance.

[Affine-fusion] Fix a bug in mod detection
ClosedPublic

Authored by vinayaka-bandishti on Jun 3 2023, 1:04 AM.

Details

Summary

Fix a bug in detecting unknown ids as mods of known ids that was
preventing certain fusions.

While at this, fix the function signature of detectAsMod function to
have output as the last argument.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2023, 1:04 AM
vinayaka-bandishti requested review of this revision.Jun 3 2023, 1:04 AM
bondhugula accepted this revision.Jun 3 2023, 1:19 AM

LGTM - thanks.

This revision is now accepted and ready to land.Jun 3 2023, 1:19 AM
bondhugula added inline comments.Jun 3 2023, 1:20 AM
mlir/lib/Analysis/FlatLinearValueConstraints.cpp
234–236

Missing update to the doc comment -- this one is pretty important. It's unclear what offset and num are otherwise.

324–327

Please use the ternary operator.

Address comments

vinayaka-bandishti marked 2 inline comments as done.Jun 3 2023, 4:22 AM
bondhugula accepted this revision.Jun 4 2023, 10:17 PM
This revision was automatically updated to reflect the committed changes.