diff options
author | Florian Hahn <flo@fhahn.com> | 2021-05-21 15:58:35 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2021-05-21 16:33:58 +0100 |
commit | c2d44bd2309c1e232d900fd6979aba320c913357 (patch) | |
tree | d695a973e0a7559e0b74da0932c073e21ae5d5d9 /llvm/lib/CodeGen/MachineDebugify.cpp | |
parent | d54712ab4deb5b83ef58db73ce18ed466201f4e1 (diff) | |
download | llvm-c2d44bd2309c1e232d900fd6979aba320c913357.zip llvm-c2d44bd2309c1e232d900fd6979aba320c913357.tar.gz llvm-c2d44bd2309c1e232d900fd6979aba320c913357.tar.bz2 |
[X86] Lower calls with clang.arc.attachedcall bundle
This patch adds support for lowering function calls with the
`clang.arc.attachedcall` bundle. The goal is to expand such calls to the
following sequence of instructions:
callq @fn
movq %rax, %rdi
callq _objc_retainAutoreleasedReturnValue / _objc_unsafeClaimAutoreleasedReturnValue
This sequence of instructions triggers Objective-C runtime optimizations,
hence we want to ensure no instructions get moved in between them.
This patch achieves that by adding a new CALL_RVMARKER ISD node,
which gets turned into the CALL64_RVMARKER pseudo, which eventually gets
expanded into the sequence mentioned above.
The ObjC runtime function to call is determined by the
argument in the bundle, which is passed through as a
target constant to the pseudo.
@ahatanak is working on using this attribute in the front- & middle-end.
Together with the front- & middle-end changes, this should address
PR31925 for X86.
This is the X86 version of 46bc40e50246c1902a1ca7916c8286cb837643ee,
which added similar support for AArch64.
Reviewed By: ab
Differential Revision: https://reviews.llvm.org/D94597
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugify.cpp')
0 files changed, 0 insertions, 0 deletions