search for: make_context

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

2016 Jun 13
3
[RFC] LLVM Coroutines
...s it might help to explain the behavior a little better. >> The thought experiment relevant here is that **could** you implement >> your semantics with reasonable 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...
2016 Jun 15
2
[RFC] LLVM Coroutines
...; > Ok. > >>>> The thought experiment relevant here is that **could** you implement >>>> your semantics with reasonable 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 >>...
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