[PATCH] D104007: [BasicAA] Properly mark that coroutine suspension may modify parameters

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 10 21:38:33 PDT 2021


lxfind added a comment.

In D104007#2812383 <https://reviews.llvm.org/D104007#2812383>, @efriedma wrote:

> This doesn't seem right.  A byval argument is essentially a local variable.  We should treat it the same way as we would an alloca.  If it's live across the first suspend point, it should become part of the coroutine frame.

In fact, I think this patch may as well fix other bugs that we are not aware of yet.
As long as there exists a pointer in the parameters, its value may change during a coroutine suspension. Without this patch, I imagine there can exist other cases where some optimization will think the value of a parameter never change during the function and hence do some optimizations based on it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104007



More information about the llvm-commits mailing list