[Mlir-commits] [mlir] [mlir][affine] implement inferType for delinearize (PR #74644)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu Dec 7 11:18:16 PST 2023


================
@@ -4474,6 +4474,17 @@ LogicalResult AffineVectorStoreOp::verify() {
 // DelinearizeIndexOp
 //===----------------------------------------------------------------------===//
 
+LogicalResult AffineDelinearizeIndexOp::inferReturnTypes(
+    MLIRContext *context, std::optional<::mlir::Location> location,
+    ValueRange operands, DictionaryAttr attributes, OpaqueProperties properties,
+    RegionRange regions, SmallVectorImpl<Type> &inferredReturnTypes) {
+  AffineDelinearizeIndexOpAdaptor adaptor(operands, attributes, properties,
+                                          regions);
+  inferredReturnTypes =
----------------
ftynse wrote:

Nit: I think you can do `inferredReturnTypes.assign(...)` to avoid relying on the compiler to figure out constructor/copy elision here.

https://github.com/llvm/llvm-project/pull/74644


More information about the Mlir-commits mailing list