OSDN Git Service

Part 4c: Coroutine Devirtualization: Devirtualize coro.resume and coro.destroy.
authorGor Nishanov <GorNishanov@gmail.com>
Sat, 6 Aug 2016 02:16:35 +0000 (02:16 +0000)
committerGor Nishanov <GorNishanov@gmail.com>
Sat, 6 Aug 2016 02:16:35 +0000 (02:16 +0000)
commitfa2883261f215157289eeb560fa8a18a75dd595e
treeafb7aa0c5a20d735590602704b6cdf99d384d7af
parent84f6a48c0d301524b28fc15f2ba849a89ce5e576
Part 4c: Coroutine Devirtualization: Devirtualize coro.resume and coro.destroy.

Summary:
This is the 4c patch of the coroutine series. CoroElide pass now checks if PostSplit coro.begin
is referenced by coro.subfn.addr intrinsics. If so replace coro.subfn.addrs with an appropriate coroutine
subfunction associated with that coro.begin.

Documentation and overview is here: http://llvm.org/docs/Coroutines.html.

Upstreaming sequence (rough plan)
1.Add documentation. (https://reviews.llvm.org/D22603)
2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659)
3.Add empty coroutine passes. (https://reviews.llvm.org/D22847)
4.Add coroutine devirtualization + tests.
ab) Lower coro.resume and coro.destroy (https://reviews.llvm.org/D22998)
c) Do devirtualization <= we are here
5.Add CGSCC restart trigger + tests.
6.Add coroutine heap elision + tests.
7.Add the rest of the logic (split into more patches)

Reviewers: majnemer

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277908 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Intrinsics.td
lib/IR/Verifier.cpp
lib/Transforms/Coroutines/CoroEarly.cpp
lib/Transforms/Coroutines/CoroElide.cpp
lib/Transforms/Coroutines/CoroInstr.h
lib/Transforms/Coroutines/CoroInternal.h
lib/Transforms/Coroutines/Coroutines.cpp
test/Transforms/Coroutines/coro-early.ll
test/Transforms/Coroutines/coro-elide.ll [new file with mode: 0644]