[Mlir-commits] [mlir] [mlir][bufferize] Use resolveCallableInTable to cleanup getCalledFunction (NFC) (PR #165658)
    lonely eagle 
    llvmlistbot at llvm.org
       
    Wed Oct 29 23:01:07 PDT 2025
    
    
  
https://github.com/linuxlonelyeagle created https://github.com/llvm/llvm-project/pull/165658
None
>From e74e7bd9f7432e6fe2fd60bc539d0fe1276628bc Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Thu, 30 Oct 2025 05:59:16 +0000
Subject: [PATCH] Use resolveCallableInTable to cleanup getCalledFunction
---
 .../Transforms/FuncBufferizableOpInterfaceImpl.cpp         | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
index d9d69342e42a8..8655ed3005a93 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.cpp
@@ -95,12 +95,7 @@ getBufferizedFunctionArgType(FuncOp funcOp, int64_t index,
 /// Return the FuncOp called by `callOp`.
 static FuncOp getCalledFunction(CallOpInterface callOp,
                                 SymbolTableCollection &symbolTables) {
-  SymbolRefAttr sym =
-      llvm::dyn_cast_if_present<SymbolRefAttr>(callOp.getCallableForCallee());
-  if (!sym)
-    return nullptr;
-  return dyn_cast_or_null<FuncOp>(
-      symbolTables.lookupNearestSymbolFrom(callOp, sym));
+  return dyn_cast_or_null<FuncOp>(callOp.resolveCallableInTable(&symbolTables));
 }
 
 /// Return the FuncOp called by `callOp`.
    
    
More information about the Mlir-commits
mailing list