[Mlir-commits] [mlir] 06a119a - Update docs for mergeLocalIds

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 2 13:59:02 PST 2021


Author: Groverkss
Date: 2021-12-03T03:23:17+05:30
New Revision: 06a119a3bd54a3b8bdaa6bd4f6270fa353b436e2

URL: https://github.com/llvm/llvm-project/commit/06a119a3bd54a3b8bdaa6bd4f6270fa353b436e2
DIFF: https://github.com/llvm/llvm-project/commit/06a119a3bd54a3b8bdaa6bd4f6270fa353b436e2.diff

LOG: Update docs for mergeLocalIds

Added: 
    

Modified: 
    mlir/include/mlir/Analysis/AffineStructures.h
    mlir/lib/Analysis/AffineStructures.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Analysis/AffineStructures.h b/mlir/include/mlir/Analysis/AffineStructures.h
index 4db03582b80c..4a52971186c6 100644
--- a/mlir/include/mlir/Analysis/AffineStructures.h
+++ b/mlir/include/mlir/Analysis/AffineStructures.h
@@ -441,10 +441,11 @@ class FlatAffineConstraints {
   /// variables.
   void convertDimToLocal(unsigned dimStart, unsigned dimLimit);
 
-  /// Merge local ids of `this` and `other`. This is done by appending local ids
-  /// of `other` to `this` and inserting local ids of `this` to `other` at start
-  /// of its local ids. Number of dimension and symbol ids should match in
-  /// `this` and `other`.
+  /// Merge and align local ids of `this` and `other`. Any local identifiers
+  /// which can be represented as divisions in terms of dimension and symbol
+  /// ids with constant denominator are extracted and local ids with same
+  /// division representation are merged. Number of dimension and symbol ids
+  /// should match in `this` and `other`.
   void mergeLocalIds(FlatAffineConstraints &other);
 
   /// Removes all equalities and inequalities.

diff  --git a/mlir/lib/Analysis/AffineStructures.cpp b/mlir/lib/Analysis/AffineStructures.cpp
index 30c8e0936d21..c361f11e2b98 100644
--- a/mlir/lib/Analysis/AffineStructures.cpp
+++ b/mlir/lib/Analysis/AffineStructures.cpp
@@ -1960,10 +1960,11 @@ static void mergeDivision(FlatAffineConstraints &fac, unsigned pos1,
   fac.removeId(pos2);
 }
 
-/// Merge local ids of `this` and `other`. This is done by appending local ids
-/// of `other` to `this` and inserting local ids of `this` to `other` at start
-/// of its local ids. Number of dimension and symbol ids should match in
-/// `this` and `other`.
+/// Merge and align local ids of `this` and `other`. Any local identifiers
+/// which can be represented as divisions in terms of dimension and symbol
+/// ids with constant denominator are extracted and local ids with same
+/// division representation are merged. Number of dimension and symbol ids
+/// should match in `this` and `other`.
 void FlatAffineConstraints::mergeLocalIds(FlatAffineConstraints &other) {
   assert(getNumDimIds() == other.getNumDimIds() &&
          "Number of dimension ids should match");


        


More information about the Mlir-commits mailing list