[PATCH] D22659: [coroutines] Part 2 of N: Adding Coroutine Intrinsics

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 23:21:20 PDT 2016


majnemer added a comment.

In https://reviews.llvm.org/D22659#495738, @GorNishanov wrote:

> coro.begin is now capturing the promise parameter, otherwise, GVN won't recognize operations that may write to the promise.


coro.begin semantically stores the promise parameter somewhere? The semantics portion of the coro.begin intrinsic doesn't describe what happens when the promise parameter is provided.


================
Comment at: include/llvm/IR/Intrinsics.td:605
@@ +604,3 @@
+
+def int_coro_alloc : Intrinsic<[llvm_ptr_ty], [], []>;
+def int_coro_begin : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty,
----------------
Each coro.alloc is neither a distinct alloca or null right? I think we can mark the function return with `noalias`.


https://reviews.llvm.org/D22659





More information about the llvm-commits mailing list