[PATCH] D82314: [RFC][Coroutines] Optimize the lifespan of temporary co_await object
Lewis Baker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 12:02:23 PDT 2020
lewissbaker added a comment.
> There are still room for improvements, in particular, GCC has a 4K frame for this function.
I think GCC having a smaller coroutine frame is probably because it does not yet implement the allocation-elision optimisation which inlines the nested coroutine frame (which is 4K) into the parent coroutine frame.
I have not looked yet, but I suspect that you'll see within the get_big_object2() code it will perform another heap allocation for the get_big_object() frame.
Until we have more general support for async RVO, I think 8K is probably as good as we're going to be able to get (4K for this coroutine's promise and 4K for child coroutine-frame and its promise).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82314/new/
https://reviews.llvm.org/D82314
More information about the llvm-commits
mailing list