[LLVMdev] Address space extension
Michele Scandale
michele.scandale at gmail.com
Thu Aug 8 12:31:05 PDT 2013
On 08/08/2013 08:55 PM, Tom Stellard wrote:
> I agree with Justin here. I prefer having the address spaces be
> consistent across all languages. If we have to start using metadata to
> describe the address spaces, there will be information loss (e.g. GLSL
> private memory may not be the same as OpenCL private memory).
>
> Also, I'm not sure I understand what the advantage would be of using
> metadata, is it only to make alias analysis easier?
Hi Tom,
it is not clear to me what you mean with "consistent across all languages".
If this is referred to the usage of fixed class of address space (in the
example !private_memory, !global_memory etc) this it works only for a
subset of languages that have at least these kind of abstraction.
I would prefer that inside the middle-end no specific knowledge is
added: everything would be described through metadata (address spaces
overlapping, some not specific properties, e.g. constant, and mapping to
physical address spaces). In the middle end the only things required is
the knowledge of general and language independent concept that can be
used to improve optimizations and allow the instruction selection to
manage correctly the address spaces that may be present in the IR
through the mapping between logical and physical address spaces.
These informations are language specific because they describe features
of the source language, but no a-priori knowledge of these is (at least
should be) required in middle-end and the backend.
-Michele
More information about the llvm-dev
mailing list