This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Factor out constraint set creation from hoist padding.
ClosedPublic

Authored by nicolasvasilache on Sep 24 2021, 9:44 AM.

Details

Summary

This revision adds a

FlatAffineValueConstraints(ValueRange ivs, ValueRange lbs, ValueRange ubs)

method and use it in hoist padding.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Sep 24 2021, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2021, 9:44 AM
ftynse added inline comments.Sep 24 2021, 9:52 AM
mlir/include/mlir/Analysis/AffineStructures.h
586

I wouldn't drop these, somebody may be using them.

604

I'd consider a named static constructor instead, something like FlatAffineValueConstraints::getHyperrectangular that makes the intent clear.

635

Is this reflow necessary?

springerm accepted this revision.Sep 26 2021, 5:46 PM
springerm added inline comments.
mlir/lib/Analysis/AffineStructures.cpp
213–215

can use appendDimId instead of insertDimId

214

maybe write: unsigned lbsStart = appendDimId(lbs)

Then you can reference it in the loop via AffineMap lb = ... getAffineDimExpr(lbsStart + ivIdx, ctx) ...

221

nit: /*dimCount=*/3 * nIvs, /*symbolCount=*/0

This revision is now accepted and ready to land.Sep 26 2021, 5:46 PM
nicolasvasilache marked 6 inline comments as done.

Address comments.

Fix stale commit.

This revision was landed with ongoing or failed builds.Sep 27 2021, 3:11 AM
This revision was automatically updated to reflect the committed changes.