OSDN Git Service

All llvm.deoptimize declarations must use the same calling convention
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 12 May 2016 01:17:38 +0000 (01:17 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 12 May 2016 01:17:38 +0000 (01:17 +0000)
commitd2e75bd7aaf674db0c4f9804a89b5649f89bc66b
tree6f1469a4d07ba9e097fd381ddca66b0305682fdd
parentf600385f770a484af9eb7bcdc8fafd3d71ad7db7
All llvm.deoptimize declarations must use the same calling convention

This new verifier rule lets us unambigously pick a calling convention
when creating a new declaration for
`@llvm.experimental.deoptimize.<ty>`.  It is also congruent with our
lowering strategy -- since all calls to `@llvm.experimental.deoptimize`
are lowered to calls to `__llvm_deoptimize`, it is reasonable to enforce
a unique calling convention.

Some of the tests that were breaking this verifier rule have had to be
split up into different .ll files.

The inliner was violating this rule as well, and has been fixed to avoid
producing invalid IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269261 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/IR/Verifier.cpp
lib/Transforms/Utils/InlineFunction.cpp
test/CodeGen/X86/deopt-intrinsic-cconv.ll [new file with mode: 0644]
test/CodeGen/X86/deopt-intrinsic.ll
test/Transforms/Inline/deoptimize-intrinsic-cconv.ll [new file with mode: 0644]
test/Transforms/Inline/deoptimize-intrinsic.ll
test/Transforms/RewriteStatepointsForGC/deopt-intrinsic-cconv.ll [new file with mode: 0644]
test/Transforms/RewriteStatepointsForGC/deopt-intrinsic.ll
test/Verifier/deoptimize-intrinsic.ll