[Preallocated] Add @llvm.call.preallocated.teardown
authorArthur Eubanks <aeubanks@google.com>
Wed, 8 Jul 2020 15:48:44 +0000 (08:48 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 8 Jul 2020 15:48:44 +0000 (08:48 -0700)
commit470bf7b5a2976b5792a97b2d053a59d4b1082a5f
treea87cbc64c5ea4d05b1d80d18301313a92176f6ca
parentc54a013e5a8206645e2611974ff83d19d74accbe
[Preallocated] Add @llvm.call.preallocated.teardown

This cleans up the stack allocated by a @llvm.call.preallocated.setup.
Should either call the teardown or the preallocated call to clean up the
stack. Calling both is UB.

Add LangRef.

Add verifier check that the token argument is a @llvm.call.preallocated.setup.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D83354
llvm/docs/LangRef.rst
llvm/include/llvm/IR/Intrinsics.td
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/preallocated-invalid.ll
llvm/test/Verifier/preallocated-valid.ll