Hello. I have a question about kernel arguments.

Assuming my kernel is defined as something like this:

Code :
__kernel void 
my_kernel_func(__global const int w)

I pass the argument:

Code :
clSetKernelArg(kernel_obj, 0, sizeof(cl_int), &w) ;

Ok, then, how exactly the compiler treats the const int w ?
I mean, is the argument 'w' treated as constant integer and optimized out in compile time ?
Or, is it just in a global memory and is accessing the variable become slow ?