[PATCH] D101841: [Coroutines] Do not add alloca to the frame if the size is 0
Xun Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 08:48:25 PDT 2021
lxfind created this revision.
Herald added subscribers: ChuanqiXu, hoy, modimo, wenlei, hiraditya.
lxfind requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch is to address https://bugs.llvm.org/show_bug.cgi?id=49916.
When the size of an alloca is 0, it will trigger an assertion in OptimizedStructLayout when being added to the frame.
Fix it by not adding it at all. We return index 0 (beginning of the frame) for all 0-sized allocas.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101841
Files:
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
llvm/test/Transforms/Coroutines/coro-zero-alloca.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101841.342759.patch
Type: text/x-patch
Size: 4367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210504/fcfdb62d/attachment.bin>
More information about the llvm-commits
mailing list