[PATCH] D23993: [Coroutines] Part 10: Add coroutine promise support.

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 07:49:31 PDT 2016


GorNishanov created this revision.
GorNishanov added a reviewer: majnemer.
GorNishanov added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

1) CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain
a coroutine promise pointer from a coroutine frame and vice versa.

2) CoroFrame now interprets Promise argument of llvm.coro.begin to
place CoroutinPromise alloca at a deterministic offset from the coroutine frame.

Now, the coroutine promise example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex4.ll).


https://reviews.llvm.org/D23993

Files:
  lib/Transforms/Coroutines/CoroEarly.cpp
  lib/Transforms/Coroutines/CoroFrame.cpp
  lib/Transforms/Coroutines/CoroInstr.h
  lib/Transforms/Coroutines/CoroInternal.h
  lib/Transforms/Coroutines/Coroutines.cpp
  test/Transforms/Coroutines/ex4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23993.69571.patch
Type: text/x-patch
Size: 12602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160829/3e29219c/attachment.bin>


More information about the llvm-commits mailing list