From 13ab072b25b062d9510ebc9a7d0e1d2e619e4a34 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Sat, 21 Nov 2020 03:50:05 -0800 Subject: [PATCH] [mlir] AsynToLLVM: do no use op->getOperands() in conversion patterns Differential Revision: https://reviews.llvm.org/D91910 --- mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp index b08f7e4c45b7..c36cde1054ed 100644 --- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp +++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp @@ -592,7 +592,7 @@ public: CallOp call = cast(op); rewriter.replaceOpWithNewOp(op, resultTypes, call.callee(), - call.getOperands()); + operands); return success(); } @@ -733,7 +733,7 @@ public: // async API await function call. if (!isInCoroutine) rewriter.create(loc, TypeRange(), blockingAwaitFuncName, - ValueRange(op->getOperand(0))); + ValueRange(operands[0])); // Inside the coroutine we convert await operation into coroutine suspension // point, and resume execution asynchronously. @@ -755,8 +755,8 @@ public: // Call async runtime API to resume a coroutine in the managed thread when // the async await argument becomes ready. - SmallVector awaitAndExecuteArgs = { - await.getOperand(), coro.coroHandle, resumePtr.res()}; + SmallVector awaitAndExecuteArgs = {operands[0], coro.coroHandle, + resumePtr.res()}; builder.create(loc, TypeRange(), coroAwaitFuncName, awaitAndExecuteArgs);