[Mlir-commits] [mlir] 1483fb3 - [MLIR][Presburger][NFC] Rename getCompatibleSpace to getSpaceWithoutLocals

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Apr 2 11:17:55 PDT 2022


Author: Groverkss
Date: 2022-04-02T23:39:57+05:30
New Revision: 1483fb33b314ae02ec96b735c5ff15ce595322bf

URL: https://github.com/llvm/llvm-project/commit/1483fb33b314ae02ec96b735c5ff15ce595322bf
DIFF: https://github.com/llvm/llvm-project/commit/1483fb33b314ae02ec96b735c5ff15ce595322bf.diff

LOG: [MLIR][Presburger][NFC] Rename getCompatibleSpace to getSpaceWithoutLocals

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D122973

Added: 
    

Modified: 
    mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
    mlir/lib/Analysis/Presburger/PresburgerRelation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h b/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
index 936151908419e..c6b3df44f4d68 100644
--- a/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
+++ b/mlir/include/mlir/Analysis/Presburger/PresburgerSpace.h
@@ -78,8 +78,13 @@ class PresburgerSpace {
                            numLocals);
   }
 
+  /// Returns the space. This function is primarily intended to be used from
+  /// derived classes.
   PresburgerSpace getSpace() const { return *this; }
-  PresburgerSpace getCompatibleSpace() const {
+
+  /// Returns the space without locals. This function is primarily intended to
+  /// be used from derived classes.
+  PresburgerSpace getSpaceWithoutLocals() const {
     return PresburgerSpace(numDomain, numRange, numSymbols);
   }
 

diff  --git a/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
index e917907f1770d..62768c6eb4e40 100644
--- a/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
+++ b/mlir/lib/Analysis/Presburger/PresburgerRelation.cpp
@@ -17,7 +17,7 @@ using namespace mlir;
 using namespace presburger;
 
 PresburgerRelation::PresburgerRelation(const IntegerRelation &disjunct)
-    : PresburgerSpace(disjunct.getCompatibleSpace()) {
+    : PresburgerSpace(disjunct.getSpaceWithoutLocals()) {
   unionInPlace(disjunct);
 }
 
@@ -286,14 +286,14 @@ static PresburgerRelation getSetDifference(IntegerRelation disjunct,
                                            const PresburgerRelation &set) {
   assert(disjunct.isSpaceCompatible(set) && "Spaces should match");
   if (disjunct.isEmptyByGCDTest())
-    return PresburgerRelation::getEmpty(disjunct.getCompatibleSpace());
+    return PresburgerRelation::getEmpty(disjunct.getSpaceWithoutLocals());
 
   // Remove duplicate divs up front here as subtractRecursively does not support
   // this set having duplicate divs.
   disjunct.removeDuplicateDivs();
 
   PresburgerRelation result =
-      PresburgerRelation::getEmpty(disjunct.getCompatibleSpace());
+      PresburgerRelation::getEmpty(disjunct.getSpaceWithoutLocals());
   Simplex simplex(disjunct);
   subtractRecursively(disjunct, simplex, set, 0, result);
   return result;


        


More information about the Mlir-commits mailing list