[Mlir-commits] [mlir] 5d04f0c - [mlir][bufferize] Update remaining getMemorySpaceAsInt API uses
Matthias Springer
llvmlistbot at llvm.org
Wed Dec 7 03:28:21 PST 2022
Author: Matthias Springer
Date: 2022-12-07T12:28:14+01:00
New Revision: 5d04f0c937582357dc51230e17aef398e0e48cd6
URL: https://github.com/llvm/llvm-project/commit/5d04f0c937582357dc51230e17aef398e0e48cd6
DIFF: https://github.com/llvm/llvm-project/commit/5d04f0c937582357dc51230e17aef398e0e48cd6.diff
LOG: [mlir][bufferize] Update remaining getMemorySpaceAsInt API uses
D138330 updated the deprecated `getMemorySpaceAsInt` uses to `getMemorySpace`. There are few uses that were missed.
Differential Revision: https://reviews.llvm.org/D139526
Added:
Modified:
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
index da1e69b04d4b7..432705dce8893 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
@@ -31,7 +31,7 @@ mlir::bufferization::castOrReallocMemRefValue(OpBuilder &b, Value value,
// Element type, rank and memory space must match.
if (srcType.getElementType() != destType.getElementType())
return failure();
- if (srcType.getMemorySpaceAsInt() != destType.getMemorySpaceAsInt())
+ if (srcType.getMemorySpace() != destType.getMemorySpace())
return failure();
if (srcType.getRank() != destType.getRank())
return failure();
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
index f7430d2b99de4..7b63335d43fb6 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
@@ -154,7 +154,7 @@ updateCalls(ModuleOp module,
auto memrefType = memref.getType().cast<MemRefType>();
auto allocType =
MemRefType::get(memrefType.getShape(), memrefType.getElementType(),
- AffineMap(), memrefType.getMemorySpaceAsInt());
+ AffineMap(), memrefType.getMemorySpace());
Value outParam = builder.create<memref::AllocOp>(op.getLoc(), allocType);
if (!hasStaticIdentityLayout(memrefType)) {
// Layout maps are already checked in `updateFuncOp`.
More information about the Mlir-commits
mailing list