<div dir="ltr"><div dir="ltr">Hey guys, I've recently open source a coroutine based <a href="https://github.com/loopperfect/conduit">library</a>.<div><br></div><div>We identified couple cases where clang/llvm is not able to optimize away some heap allocations. I was wondering whether there is a way to fix this, either by a workaround, compiler flags or fix in the llvm-optimisation pass.<br><br>Here is an link to the compiler explorer:<br><a href="https://godbolt.org/z/kMEWEO">https://godbolt.org/z/kMEWEO</a> </div><div><div><br>Feedback highly appreciated.</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px">Regards,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Gaetano Checinski</div><div style="font-size:12.8px"><span style="font-size:12.8px">Founder of Loopperfect</span><br></div><div style="font-size:12.8px"><span style="font-size:12.8px"><a href="https://loopperfect.com" target="_blank">https://loopperfect.com</a></span></div><div style="font-size:12.8px"><span style="font-size:12.8px"><a href="https://buckaroo.pm" target="_blank">https://buckaroo.pm</a></span></div></div></div></div></div></div></div></div>