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 --------------------------===// //