yaxunl added a comment.

>> It seems the casting from a pointer to different address space is not 
>> affected by this change. When a null pointer is casted to different address 
>> space, it is casted the same way as an ordinary pointer, e.g. by 
>> addrspacecast.
> 
> You mean, the code-generation for that knows about your special null pointer 
> representation?  That is confusing.

The null pointer is represented in a new way, but the new representation has 
the same type as before. For example, a null pointer in addr space 0 used to be 
`i8 *null`, now it becomes `addrspacecast i8 addrspace(4)* null to i8*`. It is 
still of type i8*, so nothing is changed about casting a pointer to a different 
address space.


https://reviews.llvm.org/D26196



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to