[PATCH] [InstCombine] Canonicalize addrspacecast between different element types

Jingyue Wu jingyue at google.com
Thu Jun 5 14:46:01 PDT 2014


Right, that's another (more aggressive) way. I am not against that either.

Jingyue


On Thu, Jun 5, 2014 at 2:22 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 5 June 2014 17:01, Jingyue Wu <jingyue at google.com> wrote:
> > Hi Phillip,
> >
> > Thanks for your comments! They do make a lot of sense.
> >
> > I wasn't here when the addrspacecast instruction was added. Maybe Matt
> can
> > provide more context on why addrspacecast is a superset of bitcast.
> However,
> > I don't see too much value of including the semantics of bitcast besides
> > making bitcode more compact.
> >
> > With that, I would be more than happy to work on having clang emitting
> both
> > of them. But even with changes in clang, I think instcombine would still
> > need this canonicalization to handle IR not directly generated by clang.
>
> If desirable, we could change the IR to require addrspacecast to
> change just the address space and then move this logic to the bitcode
> upgrade.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140605/54ba6ee5/attachment.html>


More information about the llvm-commits mailing list