[PATCH] D62574: Initial draft of target-configurable address spaces.

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 7 10:36:04 PDT 2020


ebevhan added a comment.

In D62574#2136553 <https://reviews.llvm.org/D62574#2136553>, @danilaml wrote:

> In D62574#2135662 <https://reviews.llvm.org/D62574#2135662>, @ebevhan wrote:
>
> > It's generally not safe to alter address spaces below the top level. C is just very permissive about it.
>
>
> Isn't that also true for the top-level casts? Unless when it is. And the target should know when it's safe or not. It's just that for non top-level casts there is added condition that casts are noop (i.e. don't change the bit pattern of the pointer). At least that's how I see it.


Yes, I see what you mean. I think that the default assumption in Clang at the moment is that it is not safe to do so, hence the current design. Not that there are many targets that use address spaces, so perhaps that assumption is too conservative for ones that do downstream.


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

https://reviews.llvm.org/D62574





More information about the cfe-commits mailing list