GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include <zlib.h>
#include "lto-compress.h"
#include "timevar.h"
Data Structures | |
struct | lto_compression_stream |
Functions | |
static void * | lto_zalloc (void *opaque, unsigned items, unsigned size) |
static void | lto_zfree (void *opaque, void *address) |
static int | lto_normalized_zlib_level (void) |
static void | lto_destroy_compression_stream (struct lto_compression_stream *stream) |
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) |
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) |
static void | lto_compression_zlib (struct lto_compression_stream *stream) |
void | lto_end_compression (struct lto_compression_stream *stream) |
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) |
static void | lto_uncompression_zlib (struct lto_compression_stream *stream) |
void | lto_end_uncompression (struct lto_compression_stream *stream, lto_compression compression) |
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, 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 gcc_assert, lto_compression_stream::is_compression, lto_append_to_compression_stream(), lto_stats, and lto_stats_d::num_output_il_bytes.
Referenced by lto_write_data(), and lto_write_stream().
|
static |
References lto_compression_stream::buffer, lto_compression_stream::bytes, lto_compression_stream::callback, free(), gcc_assert, 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, timevar_pop(), timevar_push(), and Z_BUFFER_LENGTH.
Referenced by lto_end_compression().
|
static |
Free the buffer and memory associated with STREAM.
References lto_compression_stream::buffer, and free().
Referenced by lto_compression_zlib(), and lto_uncompression_zlib().
void lto_end_compression | ( | struct lto_compression_stream * | stream | ) |
References lto_compression_zlib().
Referenced by lto_end_section().
void lto_end_uncompression | ( | struct lto_compression_stream * | stream, |
lto_compression | compression ) |
References fatal_error(), lto_uncompression_zlib(), UNKNOWN_LOCATION, and ZSTD.
Referenced by lto_get_section_data().
|
static |
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, 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_compression_zlib().
struct lto_compression_stream * lto_start_compression | ( | void(* | callback )(const char *, unsigned, void *), |
void * | opaque ) |
Return a new compression stream, with CALLBACK flush function passed OPAQUE token.
References lto_compression_stream::callback, lto_new_compression_stream(), and lto_compression_stream::opaque.
Referenced by lto_begin_section().
struct lto_compression_stream * lto_start_uncompression | ( | void(* | callback )(const char *, unsigned, void *), |
void * | opaque ) |
Return a new uncompression stream, with CALLBACK flush function passed OPAQUE token.
References lto_compression_stream::callback, lto_new_compression_stream(), and lto_compression_stream::opaque.
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 gcc_assert, 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 |
References lto_compression_stream::buffer, lto_compression_stream::bytes, lto_compression_stream::callback, free(), gcc_assert, 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, timevar_pop(), timevar_push(), and Z_BUFFER_LENGTH.
Referenced by lto_end_uncompression().
|
static |
For zlib, allocate SIZE count of ITEMS and return the address, OPAQUE is unused.
References gcc_assert.
Referenced by lto_compression_zlib(), and lto_uncompression_zlib().
|
static |
For zlib, free memory at ADDRESS, OPAQUE is unused.
References free(), and gcc_assert.
Referenced by lto_compression_zlib(), and lto_uncompression_zlib().
|
static |
Referenced by lto_append_to_compression_stream().
|
static |
Overall compression constants for zlib.
Referenced by lto_compression_zlib(), and lto_uncompression_zlib().