[PATCH] D96928: [LICM][Coroutine] Don't sink stores from loops with coro.suspend instructions

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 19:27:39 PST 2021


lxfind added a comment.

In D96928#2576084 <https://reviews.llvm.org/D96928#2576084>, @junparser wrote:

> In D96928#2571879 <https://reviews.llvm.org/D96928#2571879>, @lxfind wrote:
>
>> In D96928#2570981 <https://reviews.llvm.org/D96928#2570981>, @junparser wrote:
>>
>>> please see comments of D87817 <https://reviews.llvm.org/D87817>.
>>
>> I don't think we should go that route, because LICM will mostly hurt coroutine, as I explained in the summary.
>> Hence we should simply disable LICM for coroutine, and I don't think this is a temporary change. What do you think?
>
> I do not think we should disable LICM for coroutine, also this is not semantic restriction of coroutine (GCC does not do this). It just caused by current pipeline of llvm coroutine as well as debug info issues.  I was thinking maybe we can invoke corosplit as early as possible (not considering performance). Anyway , we can discuss this in D95807 <https://reviews.llvm.org/D95807>.

Indeed GCC splits coroutine very early one so it doesn't get exposed to lots of issues like Clang does.
However if we do that, there will be no chance to optimize and we will always end up with a huge coroutine frame (unless we can redesign it in a way that can still optimize the coroutine frame post-split.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96928/new/

https://reviews.llvm.org/D96928



More information about the llvm-commits mailing list