[PATCH] D61372: [coroutines] Fix spills of static array allocas

Ben Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 04:28:55 PDT 2019


ben-clayton created this revision.
ben-clayton added reviewers: GorNishanov, modocache.
Herald added subscribers: llvm-commits, EricWF.
Herald added a project: LLVM.

CoroFrame was not considering static array allocas, and was only ever reserving a single element in the coroutine frame.
This meant that stores to the non-zero'th element would corrupt later frame data.

Store static array allocas as field arrays in the coroutine frame.

Added test.


Repository:
  rL LLVM

https://reviews.llvm.org/D61372

Files:
  lib/Transforms/Coroutines/CoroFrame.cpp
  test/Transforms/Coroutines/coro-frame-arrayalloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61372.197527.patch
Type: text/x-patch
Size: 6788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190501/a9a5bd2f/attachment.bin>


More information about the llvm-commits mailing list