Page MenuHomePhabricator

[MLIR] Bug fix for simplifyAffineMap
AbandonedPublic

Authored by jbruestle on Apr 14 2020, 1:04 PM.

Details

Summary

When simplifying a 0-dimensional affine map (i.e. when map.getNumResults() == 0), AffineMap::get needs to have access to a valid context.

Diff Detail

Event Timeline

jbruestle created this revision.Apr 14 2020, 1:04 PM
Herald added a project: Restricted Project. · View Herald Transcript
flaub accepted this revision.Apr 14 2020, 1:05 PM
flaub added a subscriber: flaub.

LGTM

rriddle requested changes to this revision.Apr 14 2020, 1:36 PM
rriddle added inline comments.
mlir/lib/IR/AffineMap.cpp
326

This diff looks backwards

This revision now requires changes to proceed.Apr 14 2020, 1:36 PM
bondhugula added inline comments.Apr 14 2020, 1:39 PM
mlir/lib/IR/AffineMap.cpp
325

Is there an issue with the way this revision was created? The left/right panes are switched for me (the right one has the old version), and the context isn't available as well.

bondhugula requested changes to this revision.Apr 14 2020, 1:40 PM

Could you add a test case please? It could be added to test/Dialect/Affine/simplify-affine-structures.mlir (the simplification is called on the map attribute of any op there).

jbruestle abandoned this revision.Apr 15 2020, 11:36 AM

Preparing more more comprehensive diff as per discussion in the mailing list.