forked from OSchip/llvm-project
[mlir] AsynToLLVM: do no use op->getOperands() in conversion patterns
Differential Revision: https://reviews.llvm.org/D91910
This commit is contained in:
parent
d4f1a3c6e2
commit
13ab072b25
|
@ -592,7 +592,7 @@ public:
|
||||||
|
|
||||||
CallOp call = cast<CallOp>(op);
|
CallOp call = cast<CallOp>(op);
|
||||||
rewriter.replaceOpWithNewOp<CallOp>(op, resultTypes, call.callee(),
|
rewriter.replaceOpWithNewOp<CallOp>(op, resultTypes, call.callee(),
|
||||||
call.getOperands());
|
operands);
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
@ -733,7 +733,7 @@ public:
|
||||||
// async API await function call.
|
// async API await function call.
|
||||||
if (!isInCoroutine)
|
if (!isInCoroutine)
|
||||||
rewriter.create<CallOp>(loc, TypeRange(), blockingAwaitFuncName,
|
rewriter.create<CallOp>(loc, TypeRange(), blockingAwaitFuncName,
|
||||||
ValueRange(op->getOperand(0)));
|
ValueRange(operands[0]));
|
||||||
|
|
||||||
// Inside the coroutine we convert await operation into coroutine suspension
|
// Inside the coroutine we convert await operation into coroutine suspension
|
||||||
// point, and resume execution asynchronously.
|
// point, and resume execution asynchronously.
|
||||||
|
@ -755,8 +755,8 @@ public:
|
||||||
|
|
||||||
// Call async runtime API to resume a coroutine in the managed thread when
|
// Call async runtime API to resume a coroutine in the managed thread when
|
||||||
// the async await argument becomes ready.
|
// the async await argument becomes ready.
|
||||||
SmallVector<Value, 3> awaitAndExecuteArgs = {
|
SmallVector<Value, 3> awaitAndExecuteArgs = {operands[0], coro.coroHandle,
|
||||||
await.getOperand(), coro.coroHandle, resumePtr.res()};
|
resumePtr.res()};
|
||||||
builder.create<CallOp>(loc, TypeRange(), coroAwaitFuncName,
|
builder.create<CallOp>(loc, TypeRange(), coroAwaitFuncName,
|
||||||
awaitAndExecuteArgs);
|
awaitAndExecuteArgs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue