I think the GLSL compiler only eliminates unused user-defined varyings, unused legacy varyings are not eliminated. I'm taking this task.