[PATCH] D33527: [coroutines] Relocate instructions that maybe spilled after coro.begin
Gor Nishanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 17:21:07 PDT 2017
GorNishanov created this revision.
Herald added a subscriber: EricWF.
Frontend generates store instructions after allocas, for example:
define i8* @f(i64 %this) "coroutine.presplit"="1" personality i32 0 {
entry:
%this.addr = alloca i64
store i64 %this, i64* %this.addr
..
%hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)
Such instructions may require spilling into coro.frame, but, coro-frame address is only available after coro.begin and thus needs to be moved after coro.begin.
The only instructions that should not be moved are the arguments of coro.begin and all of their operands.
https://reviews.llvm.org/D33527
Files:
lib/Transforms/Coroutines/CoroSplit.cpp
test/Transforms/Coroutines/coro-frame.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33527.100186.patch
Type: text/x-patch
Size: 4785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170525/6d839882/attachment.bin>
More information about the llvm-commits
mailing list