[PATCH] D50783: [CodeGen] Merge identical block descriptor global variables
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 08:23:21 PDT 2018
ahatanak created this revision.
ahatanak added reviewers: rjmccall, arphaman.
Herald added a subscriber: dexonsmith.
Currently, clang generates a new block descriptor global variable for each block literal. This patch merges block descriptors that are identical inside and across translation units using the same approach taken in r339438.
To enable merging identical block descriptors, the information of each member of a block descriptor is encoded into the block descriptor name. Also, the linkage of the block descriptor is `linkonce_odr` unless the copy or dispose helper is internal.
Repository:
rC Clang
https://reviews.llvm.org/D50783
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGObjCGNU.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CGObjCRuntime.h
test/CodeGenCXX/blocks.cpp
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjC/fragile-arc.m
test/CodeGenObjC/noescape.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50783.160812.patch
Type: text/x-patch
Size: 20689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180815/a5d8e656/attachment-0001.bin>
More information about the cfe-commits
mailing list