Displaying 11 results from an estimated 11 matches for "gornishanov".
2016 Jul 21
2
RFC: LLVM Coroutine Representation, Round 2
...t;> coro.suspend is three-way as opposed to two-way. coro.elide and
>> coro.delete
>> renamed coro.alloc and coro.free.
>>
>> All the changes implemented and tested. Full document, (nicely formatted
>> by
>> github is at:
>>
>> https://github.com/GorNishanov/llvm/blob/coro-rfc/docs/Coroutines.rst
>>
>> Below is a summary of a proposal to add coroutine support to LLVM.
>> The proposal is motivated primarily by the desire to support C++
>> Coroutines [1],
>> however the llvm representation is language neutral and can be used...
2016 Jun 10
2
[RFC] LLVM Coroutines
...end with 'br %suspend'
coro.end expands as before:
in f => no-op
in f.resume/f.destroy => ret void (+ fancy things in landing pads)
Gor
On Thu, Jun 9, 2016 at 4:50 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Jun 9, 2016 at 2:33 PM, Gor Nishanov <gornishanov at gmail.com> wrote:
>>
>> Lowering 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 cor...
2016 Jun 09
2
[RFC] LLVM Coroutines
On Thu, Jun 9, 2016 at 1:49 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
>> Right... but that doesn't mean the call to the suspend intrinsic has to be
>> the last non-terminator instruction in the basic block before you run
>> CoroSplit. You can split the basic block in CoroSplit so any instructions
>> after the suspend call are part of a different basic
2016 Jun 15
2
[RFC] LLVM Coroutines
...f they weren't there, but, if
frontend put them there, LLVM should not replace them with
`@llvm.traps` and `undef`s either.
Gor
On Tue, Jun 14, 2016 at 1:25 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
> Hi Gor,
>
> On Sun, Jun 12, 2016 at 6:40 PM, Gor Nishanov <gornishanov at gmail.com> wrote:
>> Quick answer: folding %val to 10 is OK, but, I would prefer it to be 'undef'
>> or even catch it in the verifier as it is a programmer/frontend error.
>
> Ok.
>
>>>> The thought experiment relevant here is that **could** you implem...
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...
2016 Jun 10
2
[RFC] LLVM Coroutines
On Fri, Jun 10, 2016 at 6:36 AM, Gor Nishanov <gornishanov at gmail.com> wrote:
> >> 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 to run into problems with trying to keep around a return
> block...
2016 Jun 13
3
[RFC] LLVM Coroutines
Hi Sanjoy:
>> Now in the above CFG %val can be folded to 10, but in reality you need
>> a PHI of 10 and 20
Quick answer: folding %val to 10 is OK, but, I would prefer it to be 'undef'
or even catch it in the verifier as it is a programmer/frontend error.
Details are in the second half of my reply. I would like to start
with the thought experiment you suggested, as it might
2016 Jul 15
2
RFC: Coroutine Optimization Passes
...g/pipermail/llvm-dev/2016-July/102133.html (Round 2)
2) Get agreement on how coroutine transformation passes integrate into the
optimizer pipeline. (this mail) <=== WE ARE HERE
.. repeat 2) until happy
3) update IR/Intrinsics.td + doc/Coroutines.rst + doc/LangRef.rst
https://github.com/GorNishanov/llvm/blob/coro-rfc/docs/Coroutines.rst
4) trickle in coroutine transformation passes + tests in digestible chunks.
5) get clang changes in (sometime after step 3).
6) fix bugs / remove limitations / add functionality to coroutine passes
.. repeat 6) until happy
Overview:
=========
LLVM coroutine...
2016 Jun 09
2
Fwd: [RFC] LLVM Coroutines
Hi Eli:
Thank you very much for your comments!
>> If you need some sort of unusual control flow construct, make it a
>> proper terminator instruction
I would love to. I was going by the advice in "docs/ExtendingLLVM.rst":
"WARNING: Adding instructions changes the bitcode format, and it will
take some effort to maintain compatibility with the previous
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
2016 Jul 15
4
RFC: Coroutine Optimization Passes
Hi David:
>> How do you deal with basic blocks which appear to be used by multiple parts
>> of the coroutine? We handled this in WinEHPrepare by cloning any BBs which
>> were shared.
I experimented with several approaches, but, cloning ended up being the simplest
and most reliable. Suspend points express three different control flows that
can happen at the suspend point: a