This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Enhance getLargestKnownDivisor for AffineExpr floordiv/ceildiv
ClosedPublic

Authored by bondhugula on Dec 15 2022, 6:44 PM.

Details

Summary

The largest known divisor for expressions like (32 * d0 + 32, 128)
ceildiv 8 wasn't being computed tightly; a conservative value of 1 was
being returned. Address this. This leads to a broad improvement for
several affine analyses and rewrites that depend on knowing whether
something is a multiple of a specific constant or such largest known
constant.

Diff Detail

Event Timeline

bondhugula created this revision.Dec 15 2022, 6:44 PM
Herald added a project: Restricted Project. · View Herald Transcript
bondhugula requested review of this revision.Dec 15 2022, 6:44 PM
springerm accepted this revision.Dec 16 2022, 7:40 AM
This revision is now accepted and ready to land.Dec 16 2022, 7:40 AM
dcaballe accepted this revision.Dec 16 2022, 10:33 AM