Here's the udpated ir_builder changeset. Now at +140 lines, I think I'll still land it given that idr has said he's interested in it for the ARB programs to GLSL conversion work. It now uses C++ tricks (noted in a big comment) to get compile-time type checking and ir_dereference_variable generation. Oh, and it actually passes piglit.