[PATCH] D23749: [NVPTX] Add NVPTXHoistAddrSpaceCast pass.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 20 21:01:31 PDT 2016


Matt, I thought about making this pass generic, but as written it doesn't
make much sense if you don't follow it with the equivalent of the NVPTX
address space inference pass.

David, I will meditate on this...

On Aug 20, 2016 8:40 PM, "Matt Arsenault" <Matthew.Arsenault at amd.com> wrote:

> arsenm added a subscriber: arsenm.
>
> ================
> Comment at: llvm/lib/Target/NVPTX/NVPTXHoistAddrSpaceCast.cpp:156-160
> @@ +155,7 @@
> +    if (AddrSpaceCastInst *ASC = dyn_cast<AddrSpaceCastInst>(&I))
> +      if (ASC->getSrcAddressSpace() == AddressSpace::ADDRESS_SPACE_GENERIC
> &&
> +          ASC->getDestAddressSpace() != AddressSpace::ADDRESS_SPACE_GENERIC
> &&
> +          ASC->getSrcTy()->getPointerElementType() ==
> +              ASC->getDestTy()->getPointerElementType())
> +        Worklist.push_back(ASC);
> +
> ----------------
> Can you put this into a TTI hook?
>
>
> https://reviews.llvm.org/D23749
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160820/c5aac333/attachment.html>


More information about the llvm-commits mailing list