You have run-time and compile-time of the C-code and of the OpenCL-code. It is very important to make clear when you talk about compile-time of the kernel as this can be confusing. Compile-time of the kernel is at run-time of the software after the compute-devices have been queried. The OpenCL-compiler can make better optimised code when you give as much information as possible. One of the methods is using Function Qualifiers. A function qualifier is notated as a kernel-attribute:
__kernel __attribute__((qualifier(qualification))) void foo ( …. ) { …. }
There are three qualifiers described in OpenCL 1.x. Let’s walk through them one by one. You can also read them here in the official documentation, with more examples.
In the series 
or
.