aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/Syntax/TreeTest.cpp
diff options
context:
space:
mode:
authoryijiagu <yijiagu@google.com>2022-11-07 09:47:53 -0800
committerEugene Zhulenev <ezhulenev@google.com>2022-11-07 09:53:58 -0800
commitf81f880871e04ef0284af14a141a58905e81cdd9 (patch)
tree8422afbcfe87c362de9d662ce6e6f39324150fc1 /clang/unittests/Tooling/Syntax/TreeTest.cpp
parentb8651a171733f86074767d6240c4fc694cdff7ad (diff)
downloadllvm-f81f880871e04ef0284af14a141a58905e81cdd9.zip
llvm-f81f880871e04ef0284af14a141a58905e81cdd9.tar.gz
llvm-f81f880871e04ef0284af14a141a58905e81cdd9.tar.bz2
[mlir] Lower async.func with async.coro and async.runtime operations
Lower async.func with async.coro and async.runtime operations - This patch modifies AsyncToAsyncRuntime pass to add lowering async.func ops with coroutine cfg. Example: ``` async.func @foo() -> !async.value<f32> { %cst = arith.constant 42.0 : f32 return %cst: f32 } ``` After lowering: ``` func.func @foo() -> !async.value<f32> attributes {passthrough = ["presplitcoroutine"]} { %0 = async.runtime.create : !async.value<f32> %1 = async.coro.id %2 = async.coro.begin %1 cf.br ^bb1 ^bb1: // pred: ^bb0 %cst = arith.constant 4.200000e+01 : f32 async.runtime.store %cst, %0 : <f32> async.runtime.set_available %0 : !async.value<f32> cf.br ^bb2 ^bb2: // pred: ^bb1 async.coro.free %1, %2 cf.br ^bb3 ^bb3: // pred: ^bb2 async.coro.end %2 return %0 : !async.value<f32> } ``` Reviewed By: ezhulenev Differential Revision: https://reviews.llvm.org/D137462
Diffstat (limited to 'clang/unittests/Tooling/Syntax/TreeTest.cpp')
0 files changed, 0 insertions, 0 deletions