[PATCH] D134441: [ObjC][ARC] Don't use operand bundle "clang.arc.attachedcall" in codegen for Windows
John McCall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 16:04:51 PDT 2022
rjmccall added a comment.
Having some sort of reliable marker here emitted after the call is currently a correctness condition for using the ObjC ARC autorelease optimization. Apple's x86_64 ObjC runtime is constrained by ABI limitations, so we sniff for a particular, fairly reasonable code pattern that looks like moving the return value to the first argument register and then making a specific call; on other platforms, we look for a specific non-standard NOP. Non-Apple runtimes that don't have the same ABI concerns probably ought to just use a NOP marker, but if that's not an option, then yeah, I guess you just need the compiler to emit the right register-register move, and then make sure the runtime is sniffing for that.
It's possible the GNU runtime generally uses a different approach and doesn't need these markers at all; David Chisnall might know.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134441/new/
https://reviews.llvm.org/D134441
More information about the llvm-commits
mailing list