[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

Scott Linder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 6 13:46:04 PST 2018


scott.linder added a comment.

I don't believe that is currently the case (the unrestricted linking of OCL code to OCL code via a dynamic linker), but we do have the notion of a static link step, followed by dynamic linking at runtime. The static link step is currently via IR, but we plan to support linking object files. Maybe I misunderstand the distinction between linkage and visibility, but it seems reasonable that a user would want to have e.g. a non-kernel function participate in static linking, but not be preemptible in the final shared object. The intention with this patch is to allow this with something like `-fvisibility hidden` without disrupting kernel symbols, which must appear in the dynsym for the reasons mentioned earlier in the thread.


https://reviews.llvm.org/D53153





More information about the cfe-commits mailing list