[coroutines] Part 4[ab]: Coroutine Devirtualization: Lower coro.resume and coro.destroy.
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 4 Aug 2016 20:30:07 +0000 (20:30 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 4 Aug 2016 20:30:07 +0000 (20:30 +0000)
commitf93082e71a9459f52b41e3af52e824790ede955c
treecf6e52f600e349e507b1bf064ebff927539edafd
parentc696467530b81c7283d44a1f058ba64a1cfe266d
[coroutines] Part 4[ab]: Coroutine Devirtualization: Lower coro.resume and coro.destroy.

This is the forth patch in the coroutine series. CoroEaly pass now lowers coro.resume
and coro.destroy intrinsics by replacing them with an indirect call to an address
returned by coro.subfn.addr intrinsic. This is done so that CGPassManager recognizes
devirtualization when CoroElide replaces a call to coro.subfn.addr with an appropriate
function address.

Patch by Gor Nishanov!

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

llvm-svn: 277765
llvm/include/llvm/IR/CallSite.h
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Coroutines/CoroEarly.cpp
llvm/lib/Transforms/Coroutines/CoroInstr.h [new file with mode: 0644]
llvm/lib/Transforms/Coroutines/CoroInternal.h
llvm/lib/Transforms/Coroutines/Coroutines.cpp
llvm/test/Transforms/Coroutines/coro-early.ll [new file with mode: 0644]
llvm/test/Verifier/invoke.ll