GCC Middle and Back End API Reference
|
#include <lto-streamer.h>
Data Structures | |
struct | cached_location |
Public Member Functions | |
bool | apply_location_cache () |
void | accept_location_cache () |
void | revert_location_cache () |
void | input_location (location_t *loc, struct bitpack_d *bp, class data_in *data_in) |
void | input_location_and_block (location_t *loc, struct bitpack_d *bp, class lto_input_block *ib, class data_in *data_in) |
lto_location_cache () | |
~lto_location_cache () | |
Static Public Attributes | |
static lto_location_cache * | current_cache |
Static Private Member Functions | |
static int | cmp_loc (const void *pa, const void *pb) |
Private Attributes | |
auto_vec< cached_location > | loc_cache |
int | accepted_length |
const char * | current_file |
int | current_line |
int | current_col |
bool | current_sysp |
location_t | current_loc |
tree | current_block |
unsigned | current_discr |
The location cache holds expanded locations for streamed in trees. This is done to reduce memory usage of libcpp linemap that strongly prefers locations to be inserted in the source order.
|
inline |
References current_cache, and gcc_assert.
|
inline |
References apply_location_cache(), current_cache, gcc_assert, and NULL.
void lto_location_cache::accept_location_cache | ( | ) |
Tree merging did not succeed; mark all changes in the cache as accepted.
References accepted_length, current_cache, gcc_assert, and loc_cache.
bool lto_location_cache::apply_location_cache | ( | ) |
Apply all changes in location cache. Add locations into linemap and patch trees.
References accepted_length, lto_location_cache::cached_location::block, BUILTINS_LOCATION, cmp_loc(), lto_location_cache::cached_location::col, current_block, current_col, current_discr, current_file, current_line, current_loc, lto_location_cache::cached_location::discr, lto_location_cache::cached_location::file, gcc_assert, i, lto_location_cache::cached_location::line, line_table, lto_location_cache::cached_location::loc, loc_cache, LOCATION_LOCUS, location_with_discriminator(), set_block(), and lto_location_cache::cached_location::sysp.
Referenced by add_type_duplicate(), input_function(), ipa_odr_read_section(), lto_input_ts_exp_tree_pointers(), lto_read_body_or_constructor(), warn_odr(), and ~lto_location_cache().
|
staticprivate |
Sort locations in source order. Start with file from last application.
References a, b, BLOCK_NUMBER, current_cache, current_file, current_line, and NULL_TREE.
Referenced by apply_location_cache().
void lto_location_cache::input_location | ( | location_t * | loc, |
struct bitpack_d * | bp, | ||
class data_in * | data_in ) |
Read a location bitpack from bit pack BP and either update *LOC directly or add it to the location cache. It is neccesary to call apply_location_cache to get *LOC updated.
References input_location_and_block(), and NULL.
Referenced by lto_input_location().
void lto_location_cache::input_location_and_block | ( | location_t * | loc, |
struct bitpack_d * | bp, | ||
class lto_input_block * | ib, | ||
class data_in * | data_in ) |
Read a location bitpack from bit pack BP and either update *LOC directly or add it to the location cache. If IB is non-NULL, stream in a block afterwards. It is neccesary to call apply_location_cache to get *LOC updated.
References bp_unpack_int_in_range(), bp_unpack_string(), bp_unpack_value(), bp_unpack_var_len_unsigned(), canon_file_name(), canon_relative_path_prefix(), current_block, current_cache, current_col, current_discr, current_file, current_line, current_loc, current_sysp, gcc_assert, get_src_pwd(), loc_cache, LOCATION_LOCUS, NULL, NULL_TREE, set_block(), src_pwd, and stream_read_tree.
Referenced by input_cfg(), input_gimple_stmt(), input_location(), and input_phi().
void lto_location_cache::revert_location_cache | ( | ) |
Tree merging did succeed; throw away recent changes.
References accepted_length, and loc_cache.
Referenced by ipa_odr_read_section().
|
private |
Referenced by accept_location_cache(), apply_location_cache(), and revert_location_cache().
|
private |
Referenced by apply_location_cache(), and input_location_and_block().
|
static |
Pointer to currently alive instance of lto_location_cache.
Referenced by accept_location_cache(), add_type_duplicate(), cmp_loc(), input_location_and_block(), lto_location_cache(), warn_odr(), and ~lto_location_cache().
|
private |
Referenced by apply_location_cache(), and input_location_and_block().
|
private |
Referenced by apply_location_cache(), and input_location_and_block().
|
private |
Referenced by apply_location_cache(), cmp_loc(), and input_location_and_block().
|
private |
Referenced by apply_location_cache(), cmp_loc(), and input_location_and_block().
|
private |
Referenced by apply_location_cache(), and input_location_and_block().
|
private |
Referenced by input_location_and_block().
|
private |
Referenced by accept_location_cache(), apply_location_cache(), input_location_and_block(), and revert_location_cache().