OSDN Git Service

[coroutines] CoroBegin from inner coroutines should be considered for spills
authorGor Nishanov <GorNishanov@gmail.com>
Wed, 23 Aug 2017 14:47:52 +0000 (14:47 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Wed, 23 Aug 2017 14:47:52 +0000 (14:47 +0000)
commit1e95aaa81043134a1420837c6837d2dc9b7907f8
tree5e872e3c5ebaa6c18148d4c66b2644fc8240dfa0
parent37d17304a3191741d87f2eec34284ab9932eacc1
[coroutines] CoroBegin from inner coroutines should be considered for spills

Summary:
If a coroutine outer calls another coroutine inner and the inner coroutine body is inlined into the outer, coro.begin from the inner coroutine should be considered for spilling if accessed across suspends.

Prior to this change, coroutine frame building code was not considering any coro.begins for spilling.
With this change, we only ignore coro.begin for the current coroutine, but, any coro.begins that were inlined into the current coroutine are eligible for spills.

Fixes PR34267

Reviewers: GorNishanov

Subscribers: qcolombet, llvm-commits, EricWF

Differential Revision: https://reviews.llvm.org/D37062

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311556 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Coroutines/CoroFrame.cpp
test/Transforms/Coroutines/coro-spill-corobegin.ll [new file with mode: 0644]