[cfe-dev] question about adding qualifiers

kartik kumar kartikms2008 at gmail.com
Sat May 15 12:13:09 PDT 2010


Hello clang,

This is my first post here. I have gone through the previous posts of the
cfe-dev group and found them quite useful and helpful. I have a conceptual
(and dumb ) doubt before I start digging into clang code base. When adding
compiler support to a hardware like a GPU where the memory is divided into
"private" "local" and "global", How do you represent these memory locations
through coding. I know that these locations are accessed through the address
space qualifiers of the language that we add to the existing compiler, but
how are these qualifiers digested by a compiler frontend like clang. Do I
just pick a number for following representation and tell clang that this is
some location of the hardware that I am going to support and make it print
some instructions in the LLVM IR ?

#define _global __attribute__((address_space(NUMBER)))


I have a faint idea about GPUs, the architecture that I want to support is
something like that. Can someone please help me with the above doubt ?
Thanks.
kk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100515/7c505d0e/attachment.html>


More information about the cfe-dev mailing list