glsl/parser: Return the glsl_type object from the lexer
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 20 Sep 2017 21:05:54 +0000 (16:05 -0500)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 30 Oct 2017 16:27:09 +0000 (09:27 -0700)
commit747c057530a1da32860f3881ca73a0d648e8f317
tree4ccfe3714a25de8238402f3f22ca494bdf872a02
parent4171900cf15f2c81a1f119e1fb92772f6c355199
glsl/parser: Return the glsl_type object from the lexer

This allows us to use a single token for every built-in type except void.

   text    data     bss     dec     hex filename
8275163  269336  294072 8838571  86ddab 32-bit i965_dri.so before
8255243  268856  294072 8818171  868dfb 32-bit i965_dri.so after
7836963  346552  420592 8604107  8349cb 64-bit i965_dri.so before
7815195  345592  420592 8581379  82f103 64-bit i965_dri.so after

Yes, the 64-bit binary shrinks by 21k.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/glsl_lexer.ll
src/compiler/glsl/glsl_parser.yy