[Mlir-commits] [mlir] 152e501 - [MLIR][Presburger] Carry IdKind information in LinearTransform::applyTo

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Mar 31 08:13:00 PDT 2022


Author: Groverkss
Date: 2022-03-31T20:42:50+05:30
New Revision: 152e501d871f653b2513d1958d431a2e5b05d5b0

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

LOG: [MLIR][Presburger] Carry IdKind information in LinearTransform::applyTo

This patch fixes a bug in LinearTransform::applyTo where it did not carry the
IdKind information, and instead treated every id as IdKind::Domain.

Reviewed By: arjunp

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

Added: 
    

Modified: 
    mlir/lib/Analysis/Presburger/LinearTransform.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Analysis/Presburger/LinearTransform.cpp b/mlir/lib/Analysis/Presburger/LinearTransform.cpp
index af65f23461db8..6c399fe4f4923 100644
--- a/mlir/lib/Analysis/Presburger/LinearTransform.cpp
+++ b/mlir/lib/Analysis/Presburger/LinearTransform.cpp
@@ -113,7 +113,8 @@ LinearTransform::makeTransformToColumnEchelon(Matrix m) {
 }
 
 IntegerRelation LinearTransform::applyTo(const IntegerRelation &rel) const {
-  IntegerRelation result(rel.getNumIds());
+  IntegerRelation result(rel.getNumDomainIds(), rel.getNumRangeIds(),
+                         rel.getNumSymbolIds(), rel.getNumLocalIds());
 
   for (unsigned i = 0, e = rel.getNumEqualities(); i < e; ++i) {
     ArrayRef<int64_t> eq = rel.getEquality(i);


        


More information about the Mlir-commits mailing list