[Mlir-commits] [mlir] 2b35b37 - [mlir][linalg] Tune getTiedIndexingMap method (NFC).
Tobias Gysi
llvmlistbot at llvm.org
Wed Aug 25 12:05:41 PDT 2021
Author: Tobias Gysi
Date: 2021-08-25T18:44:01Z
New Revision: 2b35b372fde9a3504b1bbc17ea0a1aa1f02aa5e9
URL: https://github.com/llvm/llvm-project/commit/2b35b372fde9a3504b1bbc17ea0a1aa1f02aa5e9
DIFF: https://github.com/llvm/llvm-project/commit/2b35b372fde9a3504b1bbc17ea0a1aa1f02aa5e9.diff
LOG: [mlir][linalg] Tune getTiedIndexingMap method (NFC).
Optimize the performance by using the range directly.
Reviewed By: benvanik
Differential Revision: https://reviews.llvm.org/D108715
Added:
Modified:
mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
index 5f90045cdeaf7..a276e7b321293 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
@@ -589,7 +589,9 @@ def LinalgStructuredInterface : OpInterface<"LinalgOp"> {
/*methodBody=*/"",
/*defaultImplementation=*/[{
assert(opOperand->getOwner() == this->getOperation());
- return getIndexingMaps()[opOperand->getOperandNumber()];
+ auto indexingMaps =
+ $_op.indexing_maps().template getAsValueRange<AffineMapAttr>();
+ return *(indexingMaps.begin() + opOperand->getOperandNumber());
}]
>,
InterfaceMethod<
More information about the Mlir-commits
mailing list