[all-commits] [llvm/llvm-project] 0bda49: [MLIR] Cache symbol tables during OneShotBufferiza...
Michele Scuttari via All-commits
all-commits at lists.llvm.org
Wed May 14 00:39:32 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0bda492ba12c391dff99b15cd4d0149049413ebf
https://github.com/llvm/llvm-project/commit/0bda492ba12c391dff99b15cd4d0149049413ebf
Author: Michele Scuttari <michele.scuttari at outlook.com>
Date: 2025-05-14 (Wed, 14 May 2025)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.h
M mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
M mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp
Log Message:
-----------
[MLIR] Cache symbol tables during OneShotBufferization analyses (#138125)
During bufferization, the callee of each `func::CallOp` / `CallableOpInterface` operation is retrieved by means of a symbol table that is temporarily built for the lookup purpose. The creation of the symbol table requires a linear scan of the operation body (e.g., a linear scan of the `ModuleOp` body). Considering that functions are typically called at least once, this leads to a scaling behavior that is quadratic with respect to the number of symbols. The problem is described in the following Discourse topic: https://discourse.llvm.org/t/quadratic-scaling-of-bufferization/86122/
This patch aims to partially address this scaling issue by leveraging the `SymbolTableCollection` class, whose instance is added to the `FuncAnalysisState` extension. Later modifications are also expected to address the problem in other methods required by `BufferizableOpInterface` (e.g., `bufferize` and `getBufferType`), which suffer of the same problem but do not provide access to any bufferization state.
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