[Mlir-commits] [mlir] [MLIR] Make `OneShotModuleBufferize` use `OpInterface` (PR #110322)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Sep 27 13:20:26 PDT 2024


================
@@ -308,6 +311,9 @@ getFuncOpsOrderedByCalls(ModuleOp moduleOp,
     // Collect function calls and populate the caller map.
     numberCallOpsContainedInFuncOp[funcOp] = 0;
     return funcOp.walk([&](CallOpInterface callOp) -> WalkResult {
+      if (isa<func::CallIndirectOp>(callOp))
+        return WalkResult::skip();
+
       FunctionOpInterface calledFunction = getCalledFunction(callOp);
       assert(calledFunction &&
              "could not retrieved called FunctionOpInterface");
----------------
erick-xanadu wrote:

```suggestion
      FunctionOpInterface calledFunction = getCalledFunction(callOp);
      if (!calledFunction)
        return WalkResult::skip();
```

https://github.com/llvm/llvm-project/pull/110322


More information about the Mlir-commits mailing list