[llvm-branch-commits] [mlir] 13ab072 - [mlir] AsynToLLVM: do no use op->getOperands() in conversion patterns

Eugene Zhulenev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 21 05:02:04 PST 2020


Author: Eugene Zhulenev
Date: 2020-11-21T04:57:26-08:00
New Revision: 13ab072b25b062d9510ebc9a7d0e1d2e619e4a34

URL: https://github.com/llvm/llvm-project/commit/13ab072b25b062d9510ebc9a7d0e1d2e619e4a34
DIFF: https://github.com/llvm/llvm-project/commit/13ab072b25b062d9510ebc9a7d0e1d2e619e4a34.diff

LOG: [mlir] AsynToLLVM: do no use op->getOperands() in conversion patterns

Differential Revision: https://reviews.llvm.org/D91910

Added: 
    

Modified: 
    mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp

Removed: 
    


################################################################################
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 @@ class CallOpOpConversion : public ConversionPattern {
 
     CallOp call = cast<CallOp>(op);
     rewriter.replaceOpWithNewOp<CallOp>(op, resultTypes, call.callee(),
-                                        call.getOperands());
+                                        operands);
 
     return success();
   }
@@ -733,7 +733,7 @@ class AwaitOpLoweringBase : public ConversionPattern {
     // async API await function call.
     if (!isInCoroutine)
       rewriter.create<CallOp>(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 @@ class AwaitOpLoweringBase : public ConversionPattern {
 
       // Call async runtime API to resume a coroutine in the managed thread when
       // the async await argument becomes ready.
-      SmallVector<Value, 3> awaitAndExecuteArgs = {
-          await.getOperand(), coro.coroHandle, resumePtr.res()};
+      SmallVector<Value, 3> awaitAndExecuteArgs = {operands[0], coro.coroHandle,
+                                                   resumePtr.res()};
       builder.create<CallOp>(loc, TypeRange(), coroAwaitFuncName,
                              awaitAndExecuteArgs);
 


        


More information about the llvm-branch-commits mailing list