[ObjC] Override TailCallKind when lowering objc intrinsics
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Thu, 7 Nov 2019 01:09:55 +0000 (17:09 -0800)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 11 Nov 2019 16:30:06 +0000 (08:30 -0800)
commita9a3781df81a8a630e5d233efbc8b15b24ddd1dd
tree94d8b045db0c77789b2c5a3c01d1d639f42696b4
parent135a493f34561219d67251b58a482cd3fc6416b9
[ObjC] Override TailCallKind when lowering objc intrinsics

The tail-call-kind-ness is known by the ObjCARC analysis and can be
enforced while lowering the intrinsics to calls.

This allows us to get the requested tail calls at -O0 without trying to
preserve the attributes throughout passes that change code even at -O0
,like the Always Inliner, where the ObjCOpt pass doesn't run.

Differential Revision: https://reviews.llvm.org/D69980
llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
llvm/test/Transforms/PreISelIntrinsicLowering/objc-arc.ll