diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-04 20:30:07 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-04 20:30:07 +0000 |
commit | f93082e71a9459f52b41e3af52e824790ede955c (patch) | |
tree | cf6e52f600e349e507b1bf064ebff927539edafd /llvm/lib/IR/Verifier.cpp | |
parent | c696467530b81c7283d44a1f058ba64a1cfe266d (diff) | |
download | bcm5719-llvm-f93082e71a9459f52b41e3af52e824790ede955c.tar.gz bcm5719-llvm-f93082e71a9459f52b41e3af52e824790ede955c.zip |
[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
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index ec4eb793426..2b6bd3aa64f 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -3681,11 +3681,13 @@ void Verifier::visitInstruction(Instruction &I) { Assert( !F->isIntrinsic() || isa<CallInst>(I) || F->getIntrinsicID() == Intrinsic::donothing || + F->getIntrinsicID() == Intrinsic::coro_resume || + F->getIntrinsicID() == Intrinsic::coro_destroy || F->getIntrinsicID() == Intrinsic::experimental_patchpoint_void || F->getIntrinsicID() == Intrinsic::experimental_patchpoint_i64 || F->getIntrinsicID() == Intrinsic::experimental_gc_statepoint, - "Cannot invoke an intrinsic other than donothing, patchpoint or " - "statepoint", + "Cannot invoke an intrinsic other than donothing, patchpoint, " + "statepoint, coro_resume or coro_destroy", &I); Assert(F->getParent() == &M, "Referencing function in another module!", &I, &M, F, F->getParent()); |