[all-commits] [llvm/llvm-project] b73568: [mlirbc] Add AffineMap serialization support (#19...
Jacques Pienaar via All-commits
all-commits at lists.llvm.org
Fri Jun 5 01:02:44 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b73568035408a139e26a8d51635afe0bfc0c9044
https://github.com/llvm/llvm-project/commit/b73568035408a139e26a8d51635afe0bfc0c9044
Author: Jacques Pienaar <jacques+gh at japienaar.info>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M mlir/include/mlir/IR/BuiltinDialectBytecode.td
M mlir/lib/IR/BuiltinDialectBytecode.cpp
M mlir/test/Dialect/Builtin/Bytecode/attrs.mlir
M mlir/test/Dialect/Builtin/Bytecode/builtin_fixed_0.mlirbc
Log Message:
-----------
[mlirbc] Add AffineMap serialization support (#191970)
Add binary bytecode encoding for AffineMapAttr, replacing the textual fallback.
AffineMap is encoded as numDims, numSymbols, numResults, followed by the result
expressions. Where each expression, AffineExpr, is encoded in the general case
as a recursive/prefix tree with a VarInt kind tag followed by kind-specific
data. To guard a bit more against malformed bytecode it uses an iterative
parser for these.
Special case encoding for common case AffineMap's (required less space & easy
to create without much higher maintenance needs). The ordering of the enum
serialized differs from AffineExprKind as the latter has an expansion point in
the middle (new kinds can be added there) while the serialized encoding needs
to remain stable.
Updated the checked in mlirbc file as memref has a default affinemap, so
updating it pre snap.
Assisted-by: Antigravity : Gemini
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list