yaxunl added a comment. In https://reviews.llvm.org/D26157#589033, @pekka.jaaskelainen wrote:
> The uses for the OpenCL logical address spaces that I know of are: > > 1. to differentiate local kernel arguments as their memory allocation is > different (per WG if parallel WGs) > 2. alias analysis: as OpenCL address spaces are per definition disjoint (no > overlap), it can be utilized to prove that pointers to different address > spaces are not accessing the same areas, which helps e.g. vectorization and > other optimizations that require code motion/parallelization > 3. clGetKernelArgInfo() implementation > > The kernel arg MD is good enough for 1) and 3) and helps in 2). Actually > having the address spaces in the pointers would be much better, but is harder > to maintain. I think 2) should be done through address space of IR since the MD is only available for kernel functions. For amdgpu targets this is not an issue since they preserve the OpenCL address spaces. > Yes. Maybe I should just add to the docs about the MD in my patch? I think > this patch should go in regardless of a possible heavier work related to the > logical address spaces as the current MD is clearly broken. Agree. Repository: rL LLVM https://reviews.llvm.org/D26157 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits