This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LTO][PATCH] Compress LTO IL sections in object files


On Tue, May 12, 2009 at 12:38, Simon Baldwin <simonb@google.com> wrote:

> ChangeLog.lto
> 2009-05-12  Simon Baldwin  <simonb@google.com>
>
> 	* configure.ac: If --with-system-zlib, suppress local zlib and
> 	pass --with-system-zlib to subdir configure scripts.
> 	* configure: Regenerate.
>
> gcc/ChangeLog.lto
> 2009-05-12  Simon Baldwin  <simonb@google.com>
>
> 	* lto-compress.h: New file.
> 	* lto-compress.c: New file.
> 	* Makefile.in: Added entries to build lto-compress module, added
> 	ZLIB to BACKENDLIBS.
> 	* lto-header.h (struct lto_stats_d): Add counters to monitor
> 	compression performance.
> 	* langhooks.c (lhd_append_data): Omit call to assemble_string if
> 	data to send is NULL.
> 	* lto-section-in.c: Include lto-compress.h.
> 	* (struct lto_buffer): New structure supporting data accumulation
> 	from compression.
> 	* (lto_append_data): New function, compression callback.
> 	* (struct lto_data_header): New structure added to uncompressed
> 	data streams to allow free to find the original compressed data.
> 	* (lto_get_section_data): Uncompress retrieved section data, and
> 	return instead the uncompressed text.
> 	* (lto_free_section_data): Retrieve the address and length of the
> 	original compressed data and free that, then free the uncompressed
> 	data.
> 	* lto-section-out.c: Include lto-compress.h.
> 	* (lto_append_data): New function, compression callback.
> 	* (compression_stream): Static pointer to current compression stream.
> 	* (lto_begin_section): Add call to lto_start_compression.
> 	* (lto_end_section): Add call to lto_end_compression.
> 	* (lto_write_stream): Add call to lto_compress_block, general tidy up
> 	of loop structure.
> 	* common.opt: Add new flag -flto-compression-level.
> 	* lto-utils.c (print_lto_report): Add report of (un-)compression
> 	statistics.
>
> gcc/doc/ChangeLog.lto
> 2009-05-12  Simon Baldwin  <simonb@google.com>
>
> 	* invoke.texi: Documented -flto-compression-level.
> 	* sourcebuild.texi: Added information on new use of zlib.
>
> gcc/java/ChangeLog.lto:
> 2009-05-12  Simon Baldwin  <simonb@google.com>
>
> 	* config-lang.in: Removed zlib from lang specific dirs.

OK with

> +#include "config.h"
> +#include "system.h"
> +#include <zlib.h>

Add a comment describing why zlib.h needs to be included after
config.h and system.h.

> +/* Compression stream structure, holds the flush callback and opaque token,
> +   the buffered data, and a note of whether compression or uncompressing.  */

s/compression/compressing/?  If not, I don't know what you meant
here.

> +      /* If this is not the last block, it is full.  If it is the last
> +	 block, left_in_block indicates how many chars are unoccupied in
> +	 this block; subtract from num_chars to obtain occupancy.  */
> +      next_block = (struct lto_char_ptr_base *)block->ptr;

Space after ')'.


> +use_included_zlib=
> +# Make sure we don't let ZLIB as be added if we didn't want it.

s/as be/be/


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]