Skip to content

Commit 8d78000

Browse files
committed
Skip function call analysis for CallIndirectOp
1 parent 73f7e86 commit 8d78000

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ static void equivalenceAnalysis(FunctionOpInterface funcOp,
255255
OneShotAnalysisState &state,
256256
FuncAnalysisState &funcState) {
257257
funcOp->walk([&](CallOpInterface callOp) {
258+
if (isa<func::CallIndirectOp>(callOp))
259+
return WalkResult::skip();
260+
258261
FunctionOpInterface calledFunction = getCalledFunction(callOp);
259262
assert(calledFunction && "could not retrieved called FunctionOpInterface");
260263

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

0 commit comments

Comments
 (0)