[LLVMdev] Address Spaces for local memories

Giuma Cordes giuma.cordes at gmail.com
Mon Apr 21 16:58:22 PDT 2008


I'm developing a C compiler for a  machine with different local memories,
for which I need to be able to specify in which specific memory a global
variable should be allocated,  and I also need to generate different
instructions for accessing different local memories.

I've seen in the LLVM 2.2 release notes that there is now support for
multiple address spaces, that seem to address my problem, but I couldn't
understand how to use them.

Should I indeed use address spaces for my local memories requirements?
If yes, can someone tell me how to specify address spaces in C for global
Is it possible to specify that a given pointer (e.g. a function argument or
local pointer variable) points to a specific address space and how?
How do I then retrieve the address space information in the LLVM IR, in
particular when using pointers?


-- Giuma Cordes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080422/60423138/attachment.html>

More information about the llvm-dev mailing list