|
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 *dest, struct bitpack_d *bp, class data_in *data_in) |
| void | input_location_and_block (location_t *dest, struct bitpack_d *bp, class lto_input_block *ib, class data_in *data_in) |
| void | set_linemap_offset (unsigned offset) |
| lto_location_cache (lto_file_decl_data *loc_data) | |
| ~lto_location_cache () | |
Static Public Attributes | |
| static lto_location_cache * | current_cache |
Private Attributes | |
| lto_file_decl_data *const | decl_data |
| const lto_loc_map * | cur_loc_map = nullptr |
| unsigned | linemap_offset = 0 |
| auto_vec< cached_location > | loc_cache |
| tree | stream_block = NULL_TREE |
| unsigned | stream_discr = 0 |
| size_t | stream_map_idx = 0 |
| location_t | stream_loc_offset = 0 |
| cached_location | current_cloc = {} |
| location_t | current_loc = UNKNOWN_LOCATION |
| unsigned | accepted_length = 0 |
The location cache holds the ancillary data for streamed in trees. This is done to reduce memory usage in the libcpp linemap; we don't need to create an adhoc location and store the ancillary data if the tree ends up being merged.
|
inlineexplicit |
References current_cache, decl_data, and gcc_assert.
|
inline |
References apply_location_cache(), current_cache, decl_data, 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, current_cloc, current_loc, line_table, and loc_cache.
Referenced by input_function(), ipa_odr_read_section(), lto_input_ts_exp_tree_pointers(), lto_read_body_or_constructor(), and ~lto_location_cache().
| void lto_location_cache::input_location | ( | location_t * | dest, |
| struct bitpack_d * | bp, | ||
| class data_in * | data_in ) |
References input_location_and_block(), and NULL.
Referenced by lto_input_location().
| void lto_location_cache::input_location_and_block | ( | location_t * | dest, |
| 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. It is necessary to call apply_location_cache to guarantee that *LOC has been updated.
References lto_location_cache::cached_location::block, bp_unpack_delta(), bp_unpack_int_in_range(), bp_unpack_value(), bp_unpack_var_len_unsigned(), cur_loc_map, current_cloc, current_loc, decl_data, lto_location_cache::cached_location::dest, lto_location_cache::cached_location::discr, gcc_checking_assert, get_loc_map(), get_location_from_idx(), linemap_offset, lto_location_cache::cached_location::loc, loc_cache, NULL_TREE, stream_block, stream_discr, stream_loc_offset, stream_map_idx, 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().
|
inline |
References linemap_offset.
Referenced by lto_read_body_or_constructor().
|
private |
Referenced by accept_location_cache(), apply_location_cache(), and revert_location_cache().
|
private |
Referenced by input_location_and_block().
|
static |
Pointer to currently alive instance of lto_location_cache.
Referenced by accept_location_cache(), add_type_duplicate(), 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 input_location_and_block(), lto_location_cache(), and ~lto_location_cache().
|
private |
Referenced by input_location_and_block(), and set_linemap_offset().
|
private |
Referenced by accept_location_cache(), apply_location_cache(), input_location_and_block(), and revert_location_cache().
Referenced by input_location_and_block().
|
private |
Referenced by input_location_and_block().
|
private |
Referenced by input_location_and_block().
|
private |
Referenced by input_location_and_block().