search for: resume1

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

Did you mean: resume
2016 Jun 12
2
[RFC] LLVM Coroutines
...Q1: Do we have to have a load here? =================================== >> block1: >> %first_time = load... <--- What are we loading here? >> br i1 %first_time, label return, label suspend1 >> >> supend1: >> %0 = coro.suspend() >> switch %0 (resume1, destroy1) Can we use three way coro.suspend instead? Block1: %0 = call i8 coro.suspend() switch i8 %0, label suspend1 [i8 0 %return] ; or icmp + br i1 Suspend1: switch i8 %0, label %resume1 [i8 1 %destroy1] ; or icmp + br i1 One problem I can see is that someone can write a pass...
2016 Jun 11
4
[RFC] LLVM Coroutines
On Fri, Jun 10, 2016 at 5:25 PM, Gor Nishanov <gornishanov at gmail.com> wrote: > Hi Eli: > > >> Naively, you would expect that it would be legal to hoist the store... > >> but that breaks your coroutine semantics because the global could be > mutated > >> between the first return and the resume. > > Hmmm... I don't see the problem. I think
2016 Jun 12
2
[RFC] LLVM Coroutines
Hi Eli: >> Block1: >> %0 = call i8 coro.suspend() >> switch i8 %0, label suspend1 [i8 0 %return] ; or icmp + br i1 >> Suspend1: >> switch i8 %0, label %resume1 [i8 1 %destroy1] ; or icmp + br i1 >> >> This doesn't look right: intuitively the suspend happens after the return >> block runs. Perhaps, but, that is not the intended semantics. The following two things are distinct concepts: * Coroutine is considered suspended * Cor...
2017 Apr 17
9
[RFC] Adding CPS call support
Summary ======= There is a need for dedicated continuation-passing style (CPS) calls in LLVM to support functional languages. Herein I describe the problem and propose a solution. Feedback and/or tips are greatly appreciated, as our goal is to implement these changes so they can be merged into LLVM trunk. Problem ======= Implementations of functional languages like Haskell and ML (e.g., GHC