[PATCH] Teach SROA about addrspacecast.

Matt Arsenault Matthew.Arsenault at amd.com
Thu Jul 17 13:10:53 PDT 2014


addrspacecasts of allocas are an important case in OpenCL 2.0. Your private allocations are from allocas in address space 0, which are then often casted to the non-zero generic address space for convenience of use. Accessing private allocations and access through a flat pointer is expensive, so we really want to be able to eliminate the cast to generic and alloca if possible. Right now SROA doesn't eliminate any of these common allocas because of the addrspacecast

http://reviews.llvm.org/D4501






More information about the llvm-commits mailing list