[PATCH] D89768: [Coroutine] Properly determine whether an alloca should live on the frame

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 23:39:41 PDT 2020


lxfind created this revision.
lxfind added reviewers: wenlei, junparser, ChuanqiXu, rjmccall.
Herald added subscribers: llvm-commits, modimo, modocache, hiraditya.
Herald added a project: LLVM.
lxfind requested review of this revision.

The existing logic in determining whether an alloca should live on the frame only looks explicit def-use relationships. However a value defined by an alloca may be implicitly needed across suspension points, either because an alias has across-suspension-point def-use relationship, or escaped by store/call/memory intrinsics. To properly handle all these cases, we have to properly visit the alloca pointer up-front. Thie patch extends the exisiting alloca use visitor to determine whether an alloca should live on the frame.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89768

Files:
  llvm/lib/Transforms/Coroutines/CoroFrame.cpp
  llvm/test/Transforms/Coroutines/coro-alloca-01.ll
  llvm/test/Transforms/Coroutines/coro-alloca-02.ll
  llvm/test/Transforms/Coroutines/coro-alloca-03.ll
  llvm/test/Transforms/Coroutines/coro-alloca-04.ll
  llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89768.299271.patch
Type: text/x-patch
Size: 33376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201020/5e72c5bf/attachment.bin>


More information about the llvm-commits mailing list