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

JunMa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 19:04:48 PST 2021


junparser added a comment.

In D96928#2580756 <https://reviews.llvm.org/D96928#2580756>, @lxfind wrote:

>> BTW,  although this patch is OK enough for pr46990 and use-after-free issue, Fixing these issues case by case for coroutine is not good enough.  That's the reason why i agree with efriedma.
>
> The problem I see right now is there is no general fix available for this problem. From LLVM IR perspective, the default edge of the coro.suspend switch is not something reliable to discover, nor something developers can avoid moving instructions over. So even if we want to document, I don't know what to document in LangRef other than explaining in the Coroutines.ts on how this works and what the issue is.
> Perhaps we need to introduce a new IR instruction for suspend instead of relying on intrinsics, but that's not going to be something we can redesign in a short amount of time.
> I am happy to add more detailed documentation in Coroutines.ts. But beyond that I don't see much I can do here.

@efriedma any idea?


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