[Mlir-commits] [mlir] [mlir][affine] Add affine-super-vectorize docs (PR #204603)
Federico Bruzzone
llvmlistbot at llvm.org
Thu Jun 18 07:07:57 PDT 2026
https://github.com/FedericoBruzzone created https://github.com/llvm/llvm-project/pull/204603
This pull request is simply to add documentation to the `affine-super-vectorizer`.
Also, I'm open to adding more information if anyone already has any specific aspects that should be added :D
>From 5e87dda2cf1e0f4598d17afe1c082a32d236e69a Mon Sep 17 00:00:00 2001
From: Federico Bruzzone <federico.bruzzone.i at gmail.com>
Date: Thu, 18 Jun 2026 16:03:33 +0200
Subject: [PATCH] [mlir][affine] Add affine-super-vectorize docs
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
---
.../include/mlir/Dialect/Affine/Transforms/Passes.td | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/mlir/include/mlir/Dialect/Affine/Transforms/Passes.td b/mlir/include/mlir/Dialect/Affine/Transforms/Passes.td
index 7cecbcac5b932..11085a865de6f 100644
--- a/mlir/include/mlir/Dialect/Affine/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/Affine/Transforms/Passes.td
@@ -345,6 +345,18 @@ def AffineScalarReplacement : Pass<"affine-scalrep", "func::FuncOp"> {
def AffineVectorize : Pass<"affine-super-vectorize", "func::FuncOp"> {
let summary = "Vectorize to a target independent n-D vector abstraction";
+ let description = [{
+ Transforms affine loops into vector operations (transfer_read/write,
+ load/store, gather/scatter, etc.) using a virtual target-independent
+ n-D vector size. The resulting IR uses vector ops instead of scalar
+ affine loads/stores.
+
+ When accesses are provably within bounds (all dimensions statically known
+ and access patterns fit the memref layout), the generated vector operations
+ carry `in_bounds = [true, ...]` attributes asserting that masking is not
+ needed. These properties enable downstream optimizations in vectorization-aware
+ lowering passes (e.g., LLVM code generation).
+ }];
let dependentDialects = ["vector::VectorDialect"];
let options = [
ListOption<"vectorSizes", "virtual-vector-size", "int64_t",
More information about the Mlir-commits
mailing list