search for: corosuspend

Displaying 4 results from an estimated 4 matches for "corosuspend".

2016 Jun 09
2
Fwd: [RFC] LLVM Coroutines
...ffort to maintain compatibility with the previous version. Only add an instruction if it is absolutely necessary. Having coro.fork and coro.suspend to be proper terminators (as they are) will be much cleaner. Something like: corobegin to label %start suspend label %retblock corosuspend [final] [save %token] resume label %resume cleanup label %cleanup I did consider "repurposing" 'invoke', but felt it is too much of an abuse. If there is a support for making corobegin/corosuspend instructions, I would love to do it. Also, if there is a sup...
2016 Jun 09
2
[RFC] LLVM Coroutines
...ering of coro.suspend number X: 1) split block at coro.suspend, new block becomes jump point for resumption X 2) RAUW coro.suspend with i1 true in resume clone i1 false in destroy clone 3) replace coro.suspend with br %return.block in 'f', 'ret void' in clones Scratch the proposed corosuspend instruction. I think the intrinsic will work just fine! Gor
2016 Jun 10
2
[RFC] LLVM Coroutines
...ro.suspend, new block becomes jump point for >> resumption X >> 2) RAUW coro.suspend with i1 true in resume clone i1 false in destroy >> clone >> 3) replace coro.suspend with br %return.block in 'f', 'ret void' in clones >> >> Scratch the proposed corosuspend instruction. I think the intrinsic will >> work >> just fine! > > > That sounds right. > > > If you're going down that route, that still leaves the question of the > semantics of the fork intrinsic... thinking about it a bit more, I think > you're going t...
2016 Jun 09
6
Fwd: [RFC] LLVM Coroutines
Hi all: Below is a proposal to add experimental coroutine support to LLVM. Though this proposal is motivated primarily by the desire to support C++ Coroutines [1], the llvm representation is language neutral and can be used to support coroutines in other languages as well. Clang + llvm coroutines allows you to take this code: generator<int> range(int from, int to) { for(int i =