GCC Middle and Back End API Reference
|
Data Structures | |
struct | lto_compression_stream |
Functions | |
static void * | lto_zalloc () |
static void | lto_zfree () |
static int | lto_normalized_zlib_level () |
static struct lto_compression_stream * | lto_new_compression_stream (void(*callback)(const char *, unsigned, void *), void *opaque, bool is_compression) |
static void | lto_append_to_compression_stream (struct lto_compression_stream *stream, const char *base, size_t num_chars) |
static void | lto_destroy_compression_stream () |
struct lto_compression_stream * | lto_start_compression (void(*callback)(const char *, unsigned, void *), void *opaque) |
void | lto_compress_block (struct lto_compression_stream *stream, const char *base, size_t num_chars) |
void | lto_end_compression () |
struct lto_compression_stream * | lto_start_uncompression (void(*callback)(const char *, unsigned, void *), void *opaque) |
void | lto_uncompress_block (struct lto_compression_stream *stream, const char *base, size_t num_chars) |
void | lto_end_uncompression () |
Variables | |
static const size_t | Z_BUFFER_LENGTH = 4096 |
static const size_t | MIN_STREAM_ALLOCATION = 1024 |
|
static |
Append NUM_CHARS from address BASE to STREAM.
References lto_compression_stream::allocation, lto_compression_stream::buffer, lto_compression_stream::bytes, memcpy(), and MIN_STREAM_ALLOCATION.
Referenced by lto_compress_block(), and lto_uncompress_block().
void lto_compress_block | ( | struct lto_compression_stream * | stream, |
const char * | base, | ||
size_t | num_chars | ||
) |
Append NUM_CHARS from address BASE to STREAM.
References lto_compression_stream::is_compression, lto_append_to_compression_stream(), lto_stats, and lto_stats_d::num_output_il_bytes.
Referenced by lto_write_stream().
|
static |
Free the buffer and memory associated with STREAM.
References lto_compression_stream::buffer, and free().
Referenced by lto_end_compression(), and lto_end_uncompression().
void lto_end_compression | ( | ) |
Finalize STREAM compression, and free stream allocations.
References lto_compression_stream::buffer, lto_compression_stream::bytes, lto_compression_stream::callback, free(), internal_error(), lto_compression_stream::is_compression, lto_destroy_compression_stream(), lto_normalized_zlib_level(), lto_stats, lto_zalloc(), lto_zfree(), lto_stats_d::num_compressed_il_bytes, lto_compression_stream::opaque, and Z_BUFFER_LENGTH.
Referenced by lto_end_section().
void lto_end_uncompression | ( | ) |
Finalize STREAM uncompression, and free stream allocations. Because of the way LTO IL streams are compressed, there may be several concatenated compressed segments in the accumulated data, so for this function we iterate decompressions until no data remains.
References lto_compression_stream::buffer, lto_compression_stream::bytes, lto_compression_stream::callback, free(), internal_error(), lto_compression_stream::is_compression, lto_destroy_compression_stream(), lto_stats, lto_zalloc(), lto_zfree(), lto_stats_d::num_uncompressed_il_bytes, lto_compression_stream::opaque, and Z_BUFFER_LENGTH.
Referenced by lto_get_section_data().
|
staticread |
Create a new compression stream, with CALLBACK flush function passed OPAQUE token, IS_COMPRESSION indicates if compressing or uncompressing.
References lto_compression_stream::callback, lto_compression_stream::is_compression, memset(), and lto_compression_stream::opaque.
Referenced by lto_start_compression(), and lto_start_uncompression().
|
static |
Return a zlib compression level that zlib will not reject. Normalizes the compression level from the command line flag, clamping non-default values to the appropriate end of their valid range.
Referenced by lto_end_compression().
|
read |
Return a new compression stream, with CALLBACK flush function passed OPAQUE token.
References lto_compression_stream::callback, and lto_new_compression_stream().
Referenced by lto_begin_section().
|
read |
Return a new uncompression stream, with CALLBACK flush function passed OPAQUE token.
References lto_compression_stream::callback, and lto_new_compression_stream().
Referenced by lto_get_section_data().
void lto_uncompress_block | ( | struct lto_compression_stream * | stream, |
const char * | base, | ||
size_t | num_chars | ||
) |
Append NUM_CHARS from address BASE to STREAM.
References lto_compression_stream::is_compression, lto_append_to_compression_stream(), lto_stats, and lto_stats_d::num_input_il_bytes.
Referenced by lto_get_section_data().
|
static |
For zlib, allocate SIZE count of ITEMS and return the address, OPAQUE is unused.
Referenced by lto_end_compression(), and lto_end_uncompression().
|
static |
For zlib, free memory at ADDRESS, OPAQUE is unused.
References free().
Referenced by lto_end_compression(), and lto_end_uncompression().
|
static |
Referenced by lto_append_to_compression_stream().
|
static |
Overall compression constants for zlib.
Referenced by lto_end_compression(), and lto_end_uncompression().