[Mlir-commits] [mlir] 03f4fe1 - [MLIR] Use cached symbol tables to get the called function during bufferization (#141341)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun May 25 23:57:46 PDT 2025
Author: Michele Scuttari
Date: 2025-05-26T08:57:43+02:00
New Revision: 03f4fe139700d47adceb47f94fbe5fe3fab1d7b6
URL: https://github.com/llvm/llvm-project/commit/03f4fe139700d47adceb47f94fbe5fe3fab1d7b6
DIFF: https://github.com/llvm/llvm-project/commit/03f4fe139700d47adceb47f94fbe5fe3fab1d7b6.diff
LOG: [MLIR] Use cached symbol tables to get the called function during bufferization (#141341)
Avoid recomputing the symbol tables by using the `BufferizationState` class introduced in #141019.
There is also one similar TODO remaining within the `getBufferType` function, but that requires more reasoning and one more API change.
Added:
Modified:
mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
index 080796208bfc1..6210f1d787bf4 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
@@ -265,10 +265,7 @@ struct CallOpInterface
// bufferized callee.
SmallVector<Value> newOperands;
- // TODO Avoid recomputing the symbol tables every time.
- SymbolTableCollection symbolTable;
-
- FuncOp funcOp = getCalledFunction(callOp, symbolTable);
+ FuncOp funcOp = getCalledFunction(callOp, state.getSymbolTables());
assert(funcOp && "expected CallOp to a FuncOp");
FunctionType funcType = funcOp.getFunctionType();
More information about the Mlir-commits
mailing list