[MLIR][Presburger] Remove inheritance from PresburgerSpace in IntegerRelation, Presbu...
authorGroverkss <groverkss@gmail.com>
Tue, 12 Apr 2022 17:14:25 +0000 (22:44 +0530)
committerGroverkss <groverkss@gmail.com>
Tue, 12 Apr 2022 17:18:52 +0000 (22:48 +0530)
commit20aedb148b85c6f44a86081b9d737444ede5cda3
tree076b01080a62936a2ce0125ac90f3aae4be59b54
parente08c435401bc335c687b693591feafd7dbca1455
[MLIR][Presburger] Remove inheritance from PresburgerSpace in IntegerRelation, PresburgerRelation and PWMAFunction

This patch removes inheritence from PresburgerSpace in IntegerRelation and
instead makes it a member of these classes.

This is required for three reasons:
  - It prevents implicit casting to PresburgerSpace.
  - Not all functions of PresburgerSpace need to be exposed by the deriving classes.
  - IntegerRelation and IntegerPolyhedron are defined in a PresburgerSpace. It
    makes more sense for the space to be a member instead of them inheriting from
    a space.

Reviewed By: arjunp, ftynse

Differential Revision: https://reviews.llvm.org/D123585
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
mlir/include/mlir/Analysis/Presburger/PWMAFunction.h
mlir/include/mlir/Analysis/Presburger/PresburgerRelation.h
mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
mlir/include/mlir/Dialect/Affine/Analysis/AffineStructures.h
mlir/lib/Analysis/Presburger/IntegerRelation.cpp
mlir/lib/Analysis/Presburger/PWMAFunction.cpp
mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
mlir/lib/Analysis/Presburger/PresburgerSpace.cpp