search for: corobegin

Displaying 5 results from an estimated 5 matches for "corobegin".

2018 Feb 26
0
problem with moveSpillUsesAfterCoroBegin
Here's what this function is supposed to do: // Move early uses of spilled variable after CoroBegin. // For example, if a parameter had address taken, we may end up with the code // like: // define @f(i32 %n) { // %n.addr = alloca i32 // store %n, %n.addr // ... // call @coro.begin // we need to move the store after coro.begin in the implementation...
2016 Jun 09
2
Fwd: [RFC] LLVM Coroutines
...ons changes the bitcode format, and it will take some effort to maintain compatibility with the previous version. Only add an instruction if it is absolutely necessary. Having coro.fork and coro.suspend to be proper terminators (as they are) will be much cleaner. Something like: corobegin to label %start suspend label %retblock corosuspend [final] [save %token] resume label %resume cleanup label %cleanup I did consider "repurposing" 'invoke', but felt it is too much of an abuse. If there is a support for making corobegin/corosus...
2018 Mar 19
2
Suggestions for how coroutines and UBSan codegen can play nice with one another?
...example of the assert in this 26-line C++ file here: https://godbolt.org/g/Gw9UZq Note that without the '-fsanitize=null' option this compiles fine, but when that option is used, Clang/LLVM crashes due to "error in backend: cannot move instruction since its users are not dominated by CoroBegin". The coroutine pass coro-split is responsible for transforming instructions within a coroutine function. Because a coroutine function can be suspended and then resumed much later in a program's execution, accesses to stack variables much be rewritten so that they access variables stored...
2018 Mar 19
0
Suggestions for how coroutines and UBSan codegen can play nice with one another?
...here: https://godbolt.org/g/Gw9UZq <https://godbolt.org/g/Gw9UZq> > > Note that without the '-fsanitize=null' option this compiles fine, but when that option is used, Clang/LLVM crashes due to "error in backend: cannot move instruction since its users are not dominated by CoroBegin". > > The coroutine pass coro-split is responsible for transforming instructions within a coroutine function. Because a coroutine function can be suspended and then resumed much later in a program's execution, accesses to stack variables much be rewritten so that they access variabl...
2016 Jun 09
6
Fwd: [RFC] LLVM Coroutines
Hi all: Below is a proposal to add experimental coroutine support to LLVM. Though this proposal is motivated primarily by the desire to support C++ Coroutines [1], the llvm representation is language neutral and can be used to support coroutines in other languages as well. Clang + llvm coroutines allows you to take this code: generator<int> range(int from, int to) { for(int i =