[Mlir-commits] [mlir] d08522f - [MLIR][Preburger] fix typo covertVarKind -> convertVarKind

Arjun P llvmlistbot at llvm.org
Wed Jun 29 05:08:32 PDT 2022


Author: Arjun P
Date: 2022-06-29T13:08:20+01:00
New Revision: d08522f5bcae5d27c6e2c431fe7ee2d69127edfe

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

LOG: [MLIR][Preburger] fix typo covertVarKind -> convertVarKind

Also update parameter names in the implementation file to match the header.

Added: 
    

Modified: 
    mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
    mlir/lib/Analysis/Presburger/IntegerRelation.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
index 1ef0dadd38a78..58ac2a5c440b2 100644
--- a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+++ b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
@@ -481,11 +481,12 @@ class IntegerRelation {
   /// position `pos` of dstKind, otherwise they are placed after all the other
   /// variables of kind dstKind. The internal ordering among the moved variables
   /// is preserved.
-  void covertVarKind(VarKind srcKind, unsigned varStart, unsigned varLimit,
-                     VarKind dstKind, unsigned pos);
+  void convertVarKind(VarKind srcKind, unsigned varStart, unsigned varLimit,
+                      VarKind dstKind, unsigned pos);
   void convertVarKind(VarKind srcKind, unsigned varStart, unsigned varLimit,
                       VarKind dstKind) {
-    covertVarKind(srcKind, varStart, varLimit, dstKind, getNumVarKind(dstKind));
+    convertVarKind(srcKind, varStart, varLimit, dstKind,
+                   getNumVarKind(dstKind));
   }
   void convertToLocal(VarKind kind, unsigned varStart, unsigned varLimit) {
     convertVarKind(kind, varStart, varLimit, VarKind::Local);

diff  --git a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
index b630db8c0f703..d7c70a4353bc3 100644
--- a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
+++ b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp
@@ -1262,16 +1262,16 @@ void IntegerRelation::removeRedundantLocalVars() {
   }
 }
 
-void IntegerRelation::covertVarKind(VarKind srcKind, unsigned idStart,
-                                    unsigned idLimit, VarKind dstKind,
-                                    unsigned pos) {
-  assert(idLimit <= getNumVarKind(srcKind) && "Invalid id range");
+void IntegerRelation::convertVarKind(VarKind srcKind, unsigned varStart,
+                                     unsigned varLimit, VarKind dstKind,
+                                     unsigned pos) {
+  assert(varLimit <= getNumVarKind(srcKind) && "Invalid id range");
 
-  if (idStart >= idLimit)
+  if (varStart >= varLimit)
     return;
 
   // Append new local variables corresponding to the dimensions to be converted.
-  unsigned convertCount = idLimit - idStart;
+  unsigned convertCount = varLimit - varStart;
   unsigned newVarsBegin = insertVar(dstKind, pos, convertCount);
 
   // Swap the new local variables with dimensions.
@@ -1283,10 +1283,10 @@ void IntegerRelation::covertVarKind(VarKind srcKind, unsigned idStart,
   // created ids we're swapping with were zero-initialized).
   unsigned offset = getVarKindOffset(srcKind);
   for (unsigned i = 0; i < convertCount; ++i)
-    swapVar(offset + idStart + i, newVarsBegin + i);
+    swapVar(offset + varStart + i, newVarsBegin + i);
 
   // Complete the move by deleting the initially occupied columns.
-  removeVarRange(srcKind, idStart, idLimit);
+  removeVarRange(srcKind, varStart, varLimit);
 }
 
 void IntegerRelation::addBound(BoundType type, unsigned pos, int64_t value) {
@@ -2225,7 +2225,7 @@ void IntegerRelation::compose(const IntegerRelation &rel) {
   appendVar(VarKind::Range, copyRel.getNumRangeVars());
 
   // Convert R2 to B X C.
-  copyRel.covertVarKind(VarKind::Domain, 0, numBVars, VarKind::Range, 0);
+  copyRel.convertVarKind(VarKind::Domain, 0, numBVars, VarKind::Range, 0);
 
   // Intersect R2 to range of R1.
   intersectRange(IntegerPolyhedron(copyRel));


        


More information about the Mlir-commits mailing list