[LLVMdev] Casting between address spaces and address space semantics

Mon P Wang wangmp at apple.com
Mon Jul 21 09:48:00 PDT 2008


Hi Matthijs,

I was going to check in a change into clang assuming that by default,  
address spaces are separate unless there was some additional  
information (which since we didn't have any was always true) so that  
implicit cast will always generate an error.  I'll hold off on this  
until we resolved what we want to do here.

   -- Mon Ping


On Jul 18, 2008, at 2:04 PM, Matthijs Kooijman wrote:

> When this information is known, we can define a "any memory" address  
> space,
> which is a superset of the specific address spaces. This will allow  
> a function
> to be (temporarily) defined to work with any memory, while still  
> properly
> propagating information about the different memories through the  
> program (and
> preventing mixup, since you can cast to the "any memory" address  
> space, but
> not back).
>
> This requires clang to know about the relationships between address  
> spaces, so
> it knows when to insert implicit casts and when to error out.




More information about the llvm-dev mailing list