[PATCH] D140231: CoroFrame: Put escaped variables with multiple lifetimes on coroutine frame

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 19:40:25 PST 2022


ChuanqiXu accepted this revision.
ChuanqiXu added a comment.
This revision is now accepted and ready to land.

The patch is self-contained and good.

I am curious about why https://github.com/llvm/llvm-project/issues/51843 is arm related since the patch doesn't involve the backend.

And another point is about the assumption:

> The llvm.lifetime.start intrinsic guarantees that the address for a

given alloca is always the same.

In the manual (https://llvm.org/docs/LangRef.html#int-lifestart), it says:

> After llvm.lifetime.end is called, ‘llvm.lifetime.start’ on the stack object can be called again. The second ‘llvm.lifetime.start’ call marks the object as alive, but it does not change the address of the object.

I want to say these two statements doesn't look the same. Maybe it'll be better to sent another patch to edit the manual too?



================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:82-83
 //   Kills: a bit vector which contains a set of indices of blocks that can
-//          reach block 'i', but one of the path will cross a suspend point
+//          reach block 'i' but there is a path crossing a suspend point
+//          not repeating 'i' (path to 'i' without cycles containing 'i').
 //   Suspend: a boolean indicating whether block 'i' contains a suspend point.
----------------
Is this change necessary? I mean if there is a path that can reach block 'i' and repeating 'i' , we must can reduce a path which can reach 'I' without repeating 'I'. Do I misunderstand anything?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140231



More information about the llvm-commits mailing list