Skip to content

Commit 03f4fe1

Browse files
authored
[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.
1 parent 3d6f698 commit 03f4fe1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ struct CallOpInterface
265265
// bufferized callee.
266266
SmallVector<Value> newOperands;
267267

268-
// TODO Avoid recomputing the symbol tables every time.
269-
SymbolTableCollection symbolTable;
270-
271-
FuncOp funcOp = getCalledFunction(callOp, symbolTable);
268+
FuncOp funcOp = getCalledFunction(callOp, state.getSymbolTables());
272269
assert(funcOp && "expected CallOp to a FuncOp");
273270
FunctionType funcType = funcOp.getFunctionType();
274271

0 commit comments

Comments
 (0)