Eliminate unused arguments in the kernel generator.