search for: fiber_end

Displaying 3 results from an estimated 3 matches for "fiber_end".

2016 Jun 13
3
[RFC] LLVM Coroutines
...suspend() - suspends current fiber, switches back to thread stores the fiber context to be able to resume later void fiber_join(i8* %mem i1 %val) - switches to fiber stack identified by %mem, fiber_suspend will return %val when resumed void fiber_end() noreturn - switches back to a thread, does not remember fiber context and does not touch %mem. (Thus you can use this after %mem is freed) Detail: fiber_fork(i8* %mem) ---------------------------- * Prepares fcontext...
2016 Jun 15
2
[RFC] LLVM Coroutines
...mal function call, except that the "return" may > be arbitrarily spaced out from the call? > >> void fiber_join(i8* %mem i1 %val) - switches to fiber stack identified by %mem, >> fiber_suspend will return %val when resumed >> >> void fiber_end() noreturn >> - switches back to a thread, does not remember fiber >> context and does not touch %mem. >> (Thus you can use this after %mem is freed) >> >> >> Detail: fiber_fork(i8* %mem)...
2016 Jun 12
2
[RFC] LLVM Coroutines
I think I got it. Original model (with coro.fork and two-way coro.suspend) will work with a tiny tweak. In the original model, I was replacing coro.suspend with br %return in original function. The problem was coming from potential phi-nodes introduces into return block during optimizations. Let's make sure that there is only entry into the return block. In the original model, ReturnBB had