Skip to content

Conversation

@bondhugula
Copy link
Contributor

Use const ref. NFC otherwise.

@llvmbot
Copy link
Member

llvmbot commented Mar 2, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-presburger

Author: Uday Bondhugula (bondhugula)

Changes

Use const ref. NFC otherwise.


Full diff: https://github.com/llvm/llvm-project/pull/129446.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Analysis/Presburger/IntegerRelation.h (+2-2)
diff --git a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
index fa29ac23af607..626b6fcae2f0c 100644
--- a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
+++ b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
@@ -917,7 +917,7 @@ class IntegerPolyhedron : public IntegerRelation {
   /// Constructs a relation with the specified number of dimensions and symbols
   /// and adds the given inequalities.
   explicit IntegerPolyhedron(const PresburgerSpace &space,
-                             IntMatrix inequalities)
+                             const IntMatrix &inequalities)
       : IntegerPolyhedron(space) {
     for (unsigned i = 0, e = inequalities.getNumRows(); i < e; i++)
       addInequality(inequalities.getRow(i));
@@ -927,7 +927,7 @@ class IntegerPolyhedron : public IntegerRelation {
   /// and adds the given inequalities, after normalizing row-wise to integer
   /// values.
   explicit IntegerPolyhedron(const PresburgerSpace &space,
-                             FracMatrix inequalities)
+                             const FracMatrix &inequalities)
       : IntegerPolyhedron(space) {
     IntMatrix ineqsNormalized = inequalities.normalizeRows();
     for (unsigned i = 0, e = inequalities.getNumRows(); i < e; i++)

@bondhugula bondhugula merged commit 8d1e260 into llvm:main Mar 3, 2025
14 checks passed
@Superty
Copy link
Member

Superty commented Mar 3, 2025

Thanks for this fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants