[PATCH] D154695: [Coroutines] Add an O(n) algorithm for computing the cross suspend point information.

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 02:50:52 PDT 2023


ChuanqiXu added a comment.

> Apparently, for.cond.Kills[Entry] is false, it means %n.addr not crossing a suspend point.

IIUC, `for.cond.Kills[Entry]` should be true since there is a path from `Entry` to `for.cond` without repeating `Entry`, right?

> @ChuanqiXu I takes some time to figure out where the cross suspend point information is used and what it does . It used to determine whether the stack variable need to be placed on Coroutine frame. So the current problem does not affect the correctness of the coroutine programs.

Yes, it is only about optimizations. So it is always correct to mark all blocks as killed and the analysis will be extremely fast in this way.

For the patch itself, I think it'd better to improve the readability. And also it would be better to have some (may be not so formal) proof to the correctness and precision.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154695



More information about the llvm-commits mailing list