[PATCH] options, lto: Optimize streaming of optimization nodes

Joseph Myers joseph@codesourcery.com
Wed Nov 18 19:06:49 GMT 2020


On Wed, 18 Nov 2020, Jakub Jelinek via Gcc-patches wrote:

> Hi!
> 
> Reposting with self-contained description per Joseph's request:
> 
> 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).
> 
> Bootstrapped/regtested again on x86_64-linux and i686-linux, ok for trunk?
> 
> 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.

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Gcc-patches mailing list