Status of __builtin_expect?

GCC has a feature where you can give the compiler hints as to how likely certain branches are to occur, and allows for slightly more optimized code. I know this would be available in portions marked as extern “C”, but how about inside kernels and stuff?

The kernel code is compiled with a modified version of the Open64 compiler. You might poke around and see if Open64 has an equivalent of this GCC feature. (No guarantees that the NVIDIA version of the compiler does anything with it, of course.)