Decreasing register usage in kernels