[Mlir-commits] [mlir] [mlir][affine] Add affine-super-vectorize docs (PR #204603)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jun 18 07:08:57 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Federico Bruzzone (FedericoBruzzone)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/204603.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/Affine/Transforms/Passes.td (+12)
``````````diff
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",
``````````
</details>
https://github.com/llvm/llvm-project/pull/204603
More information about the Mlir-commits
mailing list