<div dir="ltr"><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 14, 2013 at 10:44 AM, Michele Scandale <span dir="ltr"><<a href="mailto:michele.scandale@gmail.com" target="_blank">michele.scandale@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi arsenm, villmow, theraven,<br>
<br>
Hello to everybody,<br>
<br>
here I a patch to add the 'addrspacecast' instruction to represent casting between pointers of different address spaces in general (pointers of different sizes, value change).<br>
I took the specification details from <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html</a> .<br>
I haven't implemented the auto upgrade for ptrtoint-inttoptr sequence because it's not clear to me the reasong for this transformation.<br></blockquote><div><br></div><div>At a high level, is this actually what we want?  Given Matt's work to restrict bitcasts, the problem space changes a bit: this instruction would be used exclusively to represent non-trivial address-space transformations, and I don't see why we can't just can write them out using either arithmetic or platform-specific intrinsics.<br>
<br></div><div>-Eli <br></div></div></div></div></div>