[Mlir-commits] [mlir] 3e82663 - [Dialect] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Thu Jan 11 12:18:15 PST 2024
Author: Kazu Hirata
Date: 2024-01-11T12:18:09-08:00
New Revision: 3e82663b05cb4d90ded9b8c0b47b2217789b15ee
URL: https://github.com/llvm/llvm-project/commit/3e82663b05cb4d90ded9b8c0b47b2217789b15ee
DIFF: https://github.com/llvm/llvm-project/commit/3e82663b05cb4d90ded9b8c0b47b2217789b15ee.diff
LOG: [Dialect] Fix a warning
This patch fixes:
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp:3154:8: error: unused
variable 'rank' [-Werror,-Wunused-variable]
Added:
Modified:
mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
index b6c53838e615fd..394640f9ebac89 100644
--- a/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
+++ b/mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
@@ -3151,10 +3151,9 @@ void TransposeOp::getAsmResultNames(
/// Build a strided memref type by applying `permutationMap` to `memRefType`.
static MemRefType inferTransposeResultType(MemRefType memRefType,
AffineMap permutationMap) {
- auto rank = memRefType.getRank();
auto originalSizes = memRefType.getShape();
auto [originalStrides, offset] = getStridesAndOffset(memRefType);
- assert(originalStrides.size() == static_cast<unsigned>(rank));
+ assert(originalStrides.size() == static_cast<unsigned>(memRefType.getRank()));
// Compute permuted sizes and strides.
auto sizes = applyPermutationMap<int64_t>(permutationMap, originalSizes);
More information about the Mlir-commits
mailing list