search for: fiber_fork

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

2016 Jun 13
3
[RFC] LLVM Coroutines
...nable bodies for the llvm.coro intrinsics? I can emulate **control flow** very closely with user mode thread switching APIs like make_context, jump_context. Memory behavior not so much. Library emulation ================= Let's build a fiber abstraction out of make_context, jump_context. i1 fiber_fork(i8* %mem) - clones this function into a fiber returns 0 - in a fiber returns 1 - in a thread uses %mem to store fiber context + fiber stack i1 fiber_suspend() - suspends current fiber, switches back to thread...
2016 Jun 15
2
[RFC] LLVM Coroutines
Hi Sanjoy, >> I'm not familiar with fiber-type APIs, but I assume fiber_fork is like >> setjmp, in that it can "return twice"? Yes, user-mode stack switching API are somewhat similar to setjmp. Here are links to a doc page and implementation, just in case you are curious: http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/context/context.html http:...
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