3 ms·
This is the main issue that zig has with LLVM's coroutines implementation, as well as: * buggy - we currently have to disable all optimizations in coroutine fu
by AndyKelley 8y ago
This is the main issue that zig has with LLVM's coroutines implementation, as well as:
* buggy - we currently have to disable all optimizations in coroutine functions because mem2reg reverts correct coroutine frame spills back to invalid parameter references
* compilation speed - llvm's coroutine splitting code is extraordinarily slow.
I had a chat with Eddy B about how coroutines work in rust, and I think it's a much better approach. Rust does its own splitting in the frontend, and avoids LLVM coroutines in the IR.
But yeah, non-guaranteed memory allocation elision is just not going to cut it. Especially if we need guaranteed memory allocation elision in debug builds where we don't have time to run any optimizers.