This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] FlatAffineConstraints: Allow extraction of explicit representation of local variables
ClosedPublic

Authored by Groverkss on Nov 12 2021, 4:05 PM.

Details

Summary

This patch extends the existing functionality of computing an explicit
representation for local variables, to also get the explicit representation,
instead of only the inequality pairs.

This is required for a future patch to remove redundant local ids based on
their explicit representation.

Diff Detail

Event Timeline

Groverkss created this revision.Nov 12 2021, 4:05 PM
Groverkss requested review of this revision.Nov 12 2021, 4:05 PM
Groverkss retitled this revision from [MLIR] FlatAffineConstraints: Allow extraction of explicit representation of local variables This patch extends existing functionality of computing an explicit representation for local variables, to also get the explicit representation, instead... to [MLIR] FlatAffineConstraints: Allow extraction of explicit representation of local variables.Nov 12 2021, 4:07 PM
Groverkss edited the summary of this revision. (Show Details)
Groverkss added a subscriber: grosser.
arjunp accepted this revision.Nov 15 2021, 11:28 AM

Seems good to me. Minor comments below.

mlir/include/mlir/Analysis/AffineStructures.h
165–166

I think the other way is easier to read: if no explicit representation could be found for the i^th local identifier, denominators[i] is set to 0.

mlir/lib/Analysis/AffineStructures.cpp
1430–1431

Returns the upper-lower bound inequality pair using which the floordiv can be computed.

Might be clearer to say that it "returns the upper and lower bound inequalities from which constrain the local variable to be a floordiv.

1432

If the representation could be computed, dividend and
/// denominator.

Incomplete sentence.

This revision is now accepted and ready to land.Nov 15 2021, 11:28 AM
Groverkss marked 3 inline comments as done.
  • Address Arjun's comments