Skip to content

Commit 8d1e260

Browse files
authored
[MLIR] Fix IntegerPolyhedron ctors to avoid copy (#129446)
Use const ref. NFC otherwise.
1 parent 3f48d34 commit 8d1e260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/include/mlir/Analysis/Presburger/IntegerRelation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ class IntegerPolyhedron : public IntegerRelation {
917917
/// Constructs a relation with the specified number of dimensions and symbols
918918
/// and adds the given inequalities.
919919
explicit IntegerPolyhedron(const PresburgerSpace &space,
920-
IntMatrix inequalities)
920+
const IntMatrix &inequalities)
921921
: IntegerPolyhedron(space) {
922922
for (unsigned i = 0, e = inequalities.getNumRows(); i < e; i++)
923923
addInequality(inequalities.getRow(i));
@@ -927,7 +927,7 @@ class IntegerPolyhedron : public IntegerRelation {
927927
/// and adds the given inequalities, after normalizing row-wise to integer
928928
/// values.
929929
explicit IntegerPolyhedron(const PresburgerSpace &space,
930-
FracMatrix inequalities)
930+
const FracMatrix &inequalities)
931931
: IntegerPolyhedron(space) {
932932
IntMatrix ineqsNormalized = inequalities.normalizeRows();
933933
for (unsigned i = 0, e = inequalities.getNumRows(); i < e; i++)

0 commit comments

Comments
 (0)