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

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 24 23:12:59 PDT 2016


GorNishanov removed rL LLVM as the repository for this revision.
GorNishanov updated this revision to Diff 65301.
GorNishanov marked 11 inline comments as done.
GorNishanov added a comment.

Relaxed memory access attributes on coro.begin, coro.free, coro.done and coro.subfn.addr intrinsics.


https://reviews.llvm.org/D22659

Files:
  include/llvm/IR/Intrinsics.td

Index: include/llvm/IR/Intrinsics.td
===================================================================
--- include/llvm/IR/Intrinsics.td
+++ include/llvm/IR/Intrinsics.td
@@ -604,9 +604,12 @@
 
 def int_coro_alloc : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>;
 def int_coro_begin : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i32_ty,
-                                llvm_ptr_ty, llvm_ptr_ty], []>;
+                                llvm_ptr_ty, llvm_ptr_ty],
+                               [ReadNone<0>, ReadNone<2>, ReadOnly<3>,
+                                NoCapture<0>, NoCapture<2>, NoCapture<3>]>;
 
-def int_coro_free : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty], [IntrNoMem]>;
+def int_coro_free : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty],
+                              [IntrArgMemOnly, ReadOnly<0>, NoCapture<0>]>;
 def int_coro_end : Intrinsic<[], [llvm_ptr_ty, llvm_i1_ty], []>;
 
 def int_coro_frame : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>;
@@ -616,22 +619,23 @@
 def int_coro_suspend : Intrinsic<[llvm_i8_ty], [llvm_token_ty, llvm_i1_ty], []>;
 
 def int_coro_param : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty, llvm_ptr_ty],
-                               [IntrReadMem, ReadNone<0>, NoCapture<0>,
-                                ReadNone<1>,NoCapture<1>]>;
+                               [IntrNoMem, ReadNone<0>, NoCapture<0>,
+                                ReadNone<1>, NoCapture<1>]>;
 
 // Coroutine Manipulation Intrinsics.
 
 def int_coro_resume : Intrinsic<[], [llvm_ptr_ty], [Throws]>;
 def int_coro_destroy : Intrinsic<[], [llvm_ptr_ty], [Throws]>;
-def int_coro_done : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty], [IntrReadMem]>;
+def int_coro_done : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty],
+                              [IntrArgMemOnly, ReadOnly<0>, NoCapture<0>]>;
 def int_coro_promise : Intrinsic<[llvm_ptr_ty],
                                  [llvm_ptr_ty, llvm_i32_ty, llvm_i1_ty],
-                                 [IntrNoMem]>;
+                                 [IntrNoMem, NoCapture<0>]>;
 
 // Coroutine Lowering Intrinsics. Used internally by coroutine passes.
 
 def int_coro_subfn_addr : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_i8_ty],
-                                    [IntrReadMem]>;
+                                    [IntrArgMemOnly, ReadOnly<0>,NoCapture<0>]>;
 
 ///===-------------------------- Other Intrinsics --------------------------===//
 //


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22659.65301.patch
Type: text/x-patch
Size: 2399 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160725/550aa85c/attachment.bin>


More information about the llvm-commits mailing list