[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 10:50:19 PDT 2019


rjmccall added a comment.

In D64083#1583109 <https://reviews.llvm.org/D64083#1583109>, @rjmccall wrote:

> Okay, so it sounds like *from the language perspective* all block pointers are actually pointers into `__generic`, and the thing with literals is just an implementation detail that's been inappropriately expressed in the AST.  The better implementation strategy is to make sure that (1) the AST uses the size/alignment of a `__generic` pointer for a block pointer and (2) IRGen implicitly converts block literals to `__generic` pointers when it emits them, and then there's no such thing as a block pointer to a qualified type.


This is actually important to get right in C++ because of `auto` and templates; you really don't want non-generic block pointer types to become an expressible thing in the language.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64083/new/

https://reviews.llvm.org/D64083





More information about the cfe-commits mailing list