[PATCH] Removing unnecessary addrspacecasts from non-generic address spaces to the generic address space

Peter Collingbourne peter at pcc.me.uk
Mon Mar 31 14:30:05 PDT 2014


On Mon, Mar 31, 2014 at 02:00:52PM -0700, Matt Arsenault wrote:
> 
>   This looks like it doesn't handle vectors of pointers, although that's probably not very important.
> 
>   I don't see anything tying this to NVPTX except the use of 0 for generic. Where should this go when generalized? Put it in lib/CodeGen and add getGenericAddressSpace() to TTI?

One idea I had was to add something like getAddressSpaceCost(unsigned AddrSpace)
to TTI. We could then apply the transform only if it lowers the cost.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list