[Mlir-commits] [mlir] [mlir] Return vectorized values instead of replacing (PR #144158)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jun 23 06:52:24 PDT 2025


================
@@ -771,17 +771,24 @@ LogicalResult deallocateGPUPrivateMemory(OpBuilder &, Value /*buffer*/);
 /// to work (these are checked by the vectorizer itself).
 bool hasVectorizationImpl(Operation *);
 
+/// Transformation information returned after vectorizing.
+struct VectorizationResult {
+  /// Results of the vectorization transform to replace the original operation.
+  SmallVector<Value> replacements;
+};
----------------
Max191 wrote:

You make some good points. I was trying to follow the naming of other similar structs (`SCFTilingResult`, `DropUnitDimsResult`, `ElementwiseOpFusionResult`), but I think it is a little bit weird in this case, because we are only returning the results. I like staying consistent with the other transform names, though. Perhaps we can come up with a better name for `VectorizationHookResult` instead? I can try to think of something that is less similar to VectorizationResult.

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


More information about the Mlir-commits mailing list