options, lto: Optimize streaming of optimization nodes
authorJakub Jelinek <jakub@redhat.com>
Wed, 18 Nov 2020 19:14:00 +0000 (20:14 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 18 Nov 2020 19:14:00 +0000 (20:14 +0100)
commit95db7e9afe57ca1c269d46baa2accced004e5c74
tree4ccd276d0b07bfc9ac1ef6dc43b54f85e8c11165
parentd326ebc94f3b2b0d962fb9e253564b39106a10da
options, lto: Optimize streaming of optimization nodes

Honza mentioned that especially for the new param machinery, most of
streamed values are probably going to be the default values.  Perhaps
somehow we could stream them more effectively.

This patch implements it and brings further savings, the size
goes down from 574 bytes to 273 bytes, i.e. less than half.
Not trying to handle enums because the code doesn't know if (enum ...) 10
is even valid, similarly non-parameters because those really generally
don't have large initializers, and params without Init (those are 0
initialized and thus don't need to be handled).

2020-11-18  Jakub Jelinek  <jakub@redhat.com>

* optc-save-gen.awk: Initialize var_opt_init.  In
cl_optimization_stream_out for params with default values larger than
10, xor the default value with the actual parameter value.  In
cl_optimization_stream_in repeat the above xor.
gcc/optc-save-gen.awk