[PATCH] D57936: [CodeGenObjC] When available, emit a direct call to objc_alloc_init(cls) instead of [objc_alloc(cls) init]

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 7 18:38:26 PST 2019


erik.pilkington created this revision.
erik.pilkington added reviewers: rjmccall, pete, ahatanak.
Herald added subscribers: dexonsmith, jkorous.
Herald added a project: clang.

This provides a code size win on the caller side, since the `init` message send is done in the runtime function.

rdar://44987038

Thanks!
Erik


Repository:
  rC Clang

https://reviews.llvm.org/D57936

Files:
  clang/include/clang/Basic/ObjCRuntime.h
  clang/lib/CodeGen/CGObjC.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGenObjC/objc-alloc-init.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57936.185908.patch
Type: text/x-patch
Size: 5772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190208/e6d18b82/attachment.bin>


More information about the cfe-commits mailing list