This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Analysis] Add alignAffineMapWithValues
ClosedPublic

Authored by springerm on Aug 8 2021, 11:03 PM.

Details

Summary

This function aligns an affine map (and operands) with given dims and syms SSA values.

This is useful in conjunction with FlatAffineConstraints::addLowerOrUpperBound, which requires the boundMap to be aligned with the constraint set's dims and syms.

Depends On D107726

Diff Detail

Event Timeline

springerm created this revision.Aug 8 2021, 11:03 PM
springerm requested review of this revision.Aug 8 2021, 11:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2021, 11:03 PM
ftynse accepted this revision.Aug 9 2021, 8:25 AM
ftynse added inline comments.
mlir/include/mlir/Analysis/AffineStructures.h
700–703

Nit: consider documenting the behavior of dims or syms contain duplicate entries or overlap (or specifying that it is undefined).

mlir/lib/Analysis/AffineStructures.cpp
3281

Nit: assert(... && "message") plz

3283

Nit: just Builder should suffice here, we are not creating operations.

3298

Nit: std::distance(dims.begin(), dimIt) looks more idiomatic

3302–3303
This revision is now accepted and ready to land.Aug 9 2021, 8:25 AM
springerm updated this revision to Diff 365420.Aug 10 2021, 4:21 AM
springerm marked 5 inline comments as done.

rebase

springerm edited the summary of this revision. (Show Details)Aug 10 2021, 4:21 AM
This revision was landed with ongoing or failed builds.Aug 10 2021, 11:06 PM
This revision was automatically updated to reflect the committed changes.