<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/14/2013 11:07 AM, Eli Friedman
wrote:<br>
</div>
<blockquote
cite="mid:CAJdarcH0GSLnb_VZ1zo7DzgSP1UXZ8Bs6Fz=AA38+_xvBbE+jQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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
moz-do-not-send="true"
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
moz-do-not-send="true"
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>
</blockquote>
I think ptrtoint / inttoptr method would be acceptable, at least for
some targets. It sounded like David had some weird case that might
not work with this. If the only real problem was turning
ptrtoint-inttoptr into bitcasts between different sized address
spaces, then that should be fixed (and probably already is).<br>
</body>
</html>