[Mlir-commits] [mlir] 8d1e260 - [MLIR] Fix IntegerPolyhedron ctors to avoid copy (#129446)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Mar 3 00:12:11 PST 2025
Author: Uday Bondhugula
Date: 2025-03-03T13:42:07+05:30
New Revision: 8d1e260fc419e31bb11cb5a2f1f872a2b679d217
URL: https://github.com/llvm/llvm-project/commit/8d1e260fc419e31bb11cb5a2f1f872a2b679d217
DIFF: https://github.com/llvm/llvm-project/commit/8d1e260fc419e31bb11cb5a2f1f872a2b679d217.diff
LOG: [MLIR] Fix IntegerPolyhedron ctors to avoid copy (#129446)
Use const ref. NFC otherwise.
Added:
Modified:
mlir/include/mlir/Analysis/Presburger/IntegerRelation.h
Removed:
################################################################################
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++)
More information about the Mlir-commits
mailing list