HomePhabricator

[Coroutines] Part 10: Add coroutine promise support.

Authored by GorNishanov on Aug 30 2016, 5:35 PM.

Description

[Coroutines] Part 10: Add coroutine promise support.

Summary:

  1. CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain

a coroutine promise pointer from a coroutine frame and vice versa.

  1. 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).

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

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

llvm-svn: 280184

Details

Committed
GorNishanovAug 30 2016, 5:35 PM
Differential Revision
D23993: [Coroutines] Part 10: Add coroutine promise support.
Parents
rG7d9ebaf3373f: [InstCombine] clean up InsertRangeTest; NFCI
Branches
Unknown
Tags
Unknown