This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] AffineStructures: support removing a range of constraints at once
ClosedPublic

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

Diff Detail

Event Timeline

arjunp created this revision.Sep 16 2021, 8:33 AM
arjunp requested review of this revision.Sep 16 2021, 8:33 AM
arjunp updated this revision to Diff 372970.Sep 16 2021, 8:57 AM

Add a comment.

Added some comments.

mlir/include/mlir/Analysis/AffineStructures.h
297

Please use triple / doc comments here.

mlir/lib/Analysis/AffineStructures.cpp
2338–2339

An assert would be useful here as end - begin could overflow if not checked and could cause problems.

2342–2343

Assert here, same reason as previous comment.

arjunp updated this revision to Diff 373023.Sep 16 2021, 11:53 AM
arjunp marked 3 inline comments as done.

Address Kunwar's comments.

arjunp updated this revision to Diff 373031.Sep 16 2021, 12:28 PM

If begin >= end just return, in line with the behaviour of removeIdRange.

Groverkss accepted this revision.Sep 17 2021, 12:01 AM
Groverkss added a reviewer: Groverkss.

LGTM

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

This looks also good from my side. Given that this is a very simple and non-algorithmic change you can probably go ahead with committing this.