[PATCH] D22603: [coroutines] Part 1 of N: Documentation

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 23:24:44 PDT 2016


majnemer added a comment.

In https://reviews.llvm.org/D22603#490753, @GorNishanov wrote:

> In https://reviews.llvm.org/D22603#490604, @majnemer wrote:
>
> > Out of curiosity, what lead you to use tokens for `coro.save` and `coro.suspend`?
>
>
> I was looking for other examples where two intrinsics or instructions are linked together. They used tokens as  means to link them, so I chose this model.
>
> For example, catchpad - catchret pair, or gc_statepoint - gc_result.
>
> Besides, the only purpose of return value of coro.save is to give it to matching coro.suspend. It does not have any other meaning, besides providing a facility of linking those two intrinsics together.


OK, so it is critical that you be able to find the coro.suspend with its associated coro.save?


https://reviews.llvm.org/D22603





More information about the llvm-commits mailing list