[PATCH] Address Space Casting

Eli Friedman eli.friedman at gmail.com
Wed Aug 14 11:07:27 PDT 2013


On Wed, Aug 14, 2013 at 10:44 AM, Michele Scandale <
michele.scandale at gmail.com> wrote:

> Hi arsenm, villmow, theraven,
>
> Hello to everybody,
>
> 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).
> I took the specification details from
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/064674.html .
> I haven't implemented the auto upgrade for ptrtoint-inttoptr sequence
> because it's not clear to me the reasong for this transformation.
>

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.

-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130814/f57a55d0/attachment.html>


More information about the llvm-commits mailing list