This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] AffineStructures::removeIdRange: support specifying a range within an IdKind
ClosedPublic

Authored by arjunp on Sep 16 2021, 8:55 AM.

Diff Detail

Event Timeline

arjunp created this revision.Sep 16 2021, 8:55 AM
arjunp requested review of this revision.Sep 16 2021, 8:55 AM

Added some comments.

mlir/include/mlir/Analysis/AffineStructures.h
285–287

Please use triple / docs comments here.

mlir/lib/Analysis/AffineStructures.cpp
347

nit: You could use getNumDimAndSymbolds() here for more readability.

386

An assert message here would be useful.

arjunp updated this revision to Diff 373030.Sep 16 2021, 12:24 PM
arjunp marked 3 inline comments as done.

Address Kunwar's comments.

Thanks for the review!

mlir/include/mlir/Analysis/AffineStructures.h
285–287

Thanks. I wish this was checked by the linter.

mlir/lib/Analysis/AffineStructures.cpp
386

I took a look at the existing removeIdRange behaviour again and it seems to support idStart >= idLimit cases, it just returns without doing anything. So I'm removing the assert.

This revision is now accepted and ready to land.Sep 17 2021, 12:18 AM
grosser accepted this revision.Sep 17 2021, 12:26 AM

This looks good from my side as well. Given that these are rather straightforward extensions to the API as well as much appreciated polishing of some simple functions, you can probably go ahead with committing them.