Skip to content

[MLIR] Document the need for updating the cached symbol tables during bufferization #141594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

mscuttari
Copy link
Member

No description provided.

@llvmbot llvmbot added mlir mlir:bufferization Bufferization infrastructure labels May 27, 2025
@llvmbot
Copy link
Member

llvmbot commented May 27, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-bufferization

Author: Michele Scuttari (mscuttari)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/141594.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td (+5)
diff --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
index b599a9f053215..72974a8c808fd 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
@@ -416,6 +416,11 @@ def BufferizableOpInterface : OpInterface<"BufferizableOpInterface"> {
           expected to survive bufferization, `success` should be returned
           (together with `allow-unknown-ops` enabled).
 
+          If the bufferized operation has symbol semantics (i.e., it defines a
+          symbol or a symbol table), the implementation is expected to update
+          the cached symbol tables -- within the bufferization state -- to keep
+          them in a consistent state.
+
           Note: If this op supports unstructured control flow in its regions,
           then this function should also bufferize all block signatures that
           belong to this op. Branch ops (that branch to a block) are typically

@mscuttari mscuttari merged commit 042912f into llvm:main May 28, 2025
14 checks passed
@mscuttari mscuttari deleted the bufferization-state-doc branch May 28, 2025 06:58
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:bufferization Bufferization infrastructure mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants