[PATCH] D49303: [CodeGen][ObjC] Treat non-escaping blocks as global blocks to make copy/dispose a no-op
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 09:41:27 PDT 2022
rjmccall added a comment.
Blocks that don't capture anything have always been allocated globally. This optimization is using the global ISA for blocks that do capture locals but which are known statically (on penalty of UB) to not escape the original scope of the block literal. Using the global ISA causes attempts to copy these blocks to have no effect, in case the program attempts to do unnecessary copies despite the block being declared non-escaping.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D49303/new/
https://reviews.llvm.org/D49303
More information about the cfe-commits
mailing list