<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Nov 11, 2007, at 9:52 AM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Unlike alignment and volatility, I think that the address space qualifier should be represented explicitly in the type system.  The reason for this is primarily that pointers to different address spaces are really very different sorts of beasties: for example they can be codegen'd to have different sizes.  Any property that affects how the value is stored in registers needs to be in the type instead of on the load/store instruction.  Also, unlike volatile, it is not common to cast a pointer between two different address spaces. </span></div><div><br class="webkit-block-placeholder"></div><div>The good thing about this is that I think it will make it substantially easier to update the various llvm optimizations if you do this.  The meat of project boils down to adding a new address space qualifier field to PointerType, making sure PointerType takes this field into account when it is being uniqued, and adding the address space qualifier to things like global variable.</div></blockquote><br></div><div>Any suggestions on type syntax in .ll files for address spaced pointers?</div><div>I was thinking postfix of the type name, but I'm up in the air about what a good separator would be. Simply whitespace?</div><div><br></div><div>i32$27*</div><div><br class="webkit-block-placeholder"></div><div>i32 27*</div><div><br class="webkit-block-placeholder"></div><div>i32(27)*</div><div><br class="webkit-block-placeholder"></div><div>i32{27}*</div><div><br class="webkit-block-placeholder"></div><div>i32@27*</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Christopher Lamb</div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>