glamor's gradient code could probably be better
If memory serves, the gradient shaders are the ones most likely to push us over the instruction limit on i915 and similarly sad devices, probably due to the massive if/else chain.
Since gradient stops are defined as 16.16 fixed point values in the range [0,1], there are a maximum of 65537 stops. It might be worthwhile to pre-render the gradient as a 1D texture and sample from that in the shader. For extra credit you could pre-render the gradient with the GPU too. This does use a bit more memory - 256k or so per gradient - but could easily be more performant as well as needing fewer shader instructions.