Hi all,
<div><br></div><div>Hypothetically, suppose I have a generic system with multiple address spaces such that each address space is accessed using different instructions.</div><div><br></div><div>Now suppose, I wanted to add a new keywords 'foo' and 'bar' to the front of c variables and function return types such that the following would be valid:</div>

<div><br></div><div>foo void* a;</div><div>foo void* somefunc(){...}</div><div><div>bar int b;</div><div>int somefunc2(bar int*){...}</div></div><div><br></div><div>Furthermore, if I wanted this keyword to be added as part of the LLVM IR in some manner such that the during the translation of LLVM IR to some target machine ASM it could be used to switch which address spaces are used (e.g. if I specify one of the keywords, I get some instruction or group of instructions to access a certain address space), what would be the correct/easiest place(s) to add this functionality, and would there be existing code that does something similar that can be used as a starting point?</div>

<div><br></div><div>More Info: suppose this uses clang as a frontend.</div><div><br></div><div>Thanks,</div><div>Aaron Landwehr</div>