Skip to content

Commit 2f3c151

Browse files
committed
made isZeroDrop pass-by-reference
1 parent f74d2f0 commit 2f3c151

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mlir/include/mlir/Interfaces/SideEffectInterfaces.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ bool wouldOpBeTriviallyDead(Operation *op);
468468
/// Can only infer if loop is dead if it has constant loop bounds/steps.
469469
/// Otherwise we assume that it's dead to be conservative.
470470
///
471-
std::optional<bool> isZeroTrip(mlir::LoopLikeOpInterface loop);
471+
std::optional<bool> isZeroTrip(mlir::LoopLikeOpInterface &loop);
472472

473473
/// Returns true if the given operation is allowed to be moved under the
474474
/// memory effects interface.

mlir/lib/Interfaces/SideEffectInterfaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ bool mlir::wouldOpBeTriviallyDead(Operation *op) {
319319
return wouldOpBeTriviallyDeadImpl(op);
320320
}
321321

322-
std::optional<bool> mlir::isZeroTrip(mlir::LoopLikeOpInterface loop) {
322+
std::optional<bool> mlir::isZeroTrip(mlir::LoopLikeOpInterface &loop) {
323323
auto lbs = loop.getLoopLowerBounds();
324324
auto ubs = loop.getLoopUpperBounds();
325325
auto steps = loop.getLoopSteps();

0 commit comments

Comments
 (0)