diff --git a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h index 772bcea6187cb..349c05e20a87f 100644 --- a/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h +++ b/mlir/include/mlir/Analysis/Presburger/IntegerRelation.h @@ -493,7 +493,7 @@ class IntegerRelation { *ub = getInt64Vec(ubMPInt); if (boundFloorDivisor) *boundFloorDivisor = int64_t(boundFloorDivisorMPInt); - return result.transform(int64FromMPInt); + return llvm::transformOptional(result, int64FromMPInt); } /// Returns the constant bound for the pos^th variable if there is one; @@ -502,7 +502,7 @@ class IntegerRelation { /// The same, but casts to int64_t. This is unsafe and will assert-fail if the /// value does not fit in an int64_t. Optional getConstantBound64(BoundType type, unsigned pos) const { - return getConstantBound(type, pos).transform(int64FromMPInt); + return llvm::transformOptional(getConstantBound(type, pos), int64FromMPInt); } /// Removes constraints that are independent of (i.e., do not have a diff --git a/mlir/unittests/Analysis/Presburger/Utils.h b/mlir/unittests/Analysis/Presburger/Utils.h index b100771021814..70ccb484bb427 100644 --- a/mlir/unittests/Analysis/Presburger/Utils.h +++ b/mlir/unittests/Analysis/Presburger/Utils.h @@ -67,9 +67,9 @@ inline void expectComputedVolumeIsValidOverapprox(const Optional &computedVolume, Optional trueVolume, Optional resultBound) { - expectComputedVolumeIsValidOverapprox(computedVolume, - trueVolume.transform(mpintFromInt64), - resultBound.transform(mpintFromInt64)); + expectComputedVolumeIsValidOverapprox( + computedVolume, llvm::transformOptional(trueVolume, mpintFromInt64), + llvm::transformOptional(resultBound, mpintFromInt64)); } } // namespace presburger