GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | streamer_tree_cache_d |
tree streamer_alloc_tree | ( | struct lto_input_block * | ib, |
struct data_in * | data_in, | ||
enum LTO_tags | tag | ||
) |
Materialize a new tree from input block IB using descriptors in DATA_IN. The code for the new tree should match TAG. Store in *IX_P the index into the reader cache where the new tree is stored.
References HOST_WIDE_INT, HOST_WIDEST_INT, input_identifier(), len, lto_orig_address_map(), lto_tag_to_tree_code(), streamer_read_hwi(), streamer_read_string_cst(), and streamer_read_uhwi().
Referenced by lto_input_scc(), and lto_read_tree().
void streamer_check_handled_ts_structures | ( | void | ) |
In tree-streamer.c.
@verbatim Miscellaneous utilities for tree streaming. Things that are used
in both input and output are here.
Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi llo@ googl e.co m
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Check that all the TS_* structures handled by the streamer_write_* and streamer_read_* routines are exactly ALL the structures defined in treestruct.def.
References LAST_TS_ENUM, and memset().
Referenced by lto_streamer_init().
tree streamer_get_builtin_tree | ( | struct lto_input_block * | , |
struct data_in * | |||
) |
tree streamer_get_pickled_tree | ( | struct lto_input_block * | , |
struct data_in * | |||
) |
|
inlinestatic |
Return true if tree node EXPR should be streamed as a builtin. For these nodes, we just emit the class and function code.
References BUILT_IN_MD, and BUILT_IN_NORMAL.
Referenced by DFS_write_tree(), lto_output_tree_1(), lto_read_tree_1(), pack_ts_function_decl_value_fields(), and streamer_write_builtin().
void streamer_pack_tree_bitfields | ( | struct output_block * | ob, |
struct bitpack_d * | bp, | ||
tree | expr | ||
) |
Pack all the bitfields in EXPR into a bit pack.
References bp_pack_var_len_unsigned(), pack_ts_base_value_fields(), pack_ts_block_value_fields(), pack_ts_decl_common_value_fields(), pack_ts_decl_with_vis_value_fields(), pack_ts_decl_wrtl_value_fields(), pack_ts_fixed_cst_value_fields(), pack_ts_function_decl_value_fields(), pack_ts_int_cst_value_fields(), pack_ts_optimization(), pack_ts_real_cst_value_fields(), pack_ts_target_option(), pack_ts_translation_unit_decl_value_fields(), pack_ts_type_common_value_fields(), and vec_safe_length().
Referenced by lto_write_tree_1().
tree streamer_read_chain | ( | struct lto_input_block * | , |
struct data_in * | |||
) |
tree streamer_read_string_cst | ( | struct data_in * | , |
struct lto_input_block * | |||
) |
In tree-streamer-in.c.
|
read |
Read all the language-independent bitfield values for EXPR from IB. Return the partially unpacked bitpack so the caller can unpack any other bitfield values that the writer may have written.
References bp_unpack_value(), lto_tag_check(), lto_tree_code_to_tag(), streamer_read_bitpack(), and unpack_value_fields().
Referenced by lto_read_tree_1().
void streamer_read_tree_body | ( | struct lto_input_block * | ib, |
struct data_in * | data_in, | ||
tree | expr | ||
) |
Read all pointer fields in EXPR from input block IB. DATA_IN contains tables and descriptors for the file being read.
References lto_input_ts_binfo_tree_pointers(), lto_input_ts_block_tree_pointers(), lto_input_ts_common_tree_pointers(), lto_input_ts_complex_tree_pointers(), lto_input_ts_constructor_tree_pointers(), lto_input_ts_decl_common_tree_pointers(), lto_input_ts_decl_minimal_tree_pointers(), lto_input_ts_decl_non_common_tree_pointers(), lto_input_ts_decl_with_vis_tree_pointers(), lto_input_ts_exp_tree_pointers(), lto_input_ts_field_decl_tree_pointers(), lto_input_ts_function_decl_tree_pointers(), lto_input_ts_list_tree_pointers(), lto_input_ts_type_common_tree_pointers(), lto_input_ts_type_non_common_tree_pointers(), lto_input_ts_vec_tree_pointers(), and lto_input_ts_vector_tree_pointers().
Referenced by lto_read_tree_1().
void streamer_tree_cache_append | ( | struct streamer_tree_cache_d * | cache, |
tree | t, | ||
hashval_t | hash | ||
) |
Appends tree node T to CACHE, even if T already existed in it.
References streamer_tree_cache_d::node_map, streamer_tree_cache_d::nodes, streamer_tree_cache_add_to_node_array(), and streamer_tree_cache_insert_1().
Referenced by lto_input_scc(), lto_input_tree_1(), lto_read_tree(), record_common_node(), and streamer_get_builtin_tree().
|
read |
void streamer_tree_cache_delete | ( | struct streamer_tree_cache_d * | ) |
|
inlinestatic |
Return the tree hash value at slot IX in CACHE.
References streamer_tree_cache_d::hashes.
Referenced by hash_tree(), and streamer_tree_cache_replace_tree().
|
inlinestatic |
Return the tree node at slot IX in CACHE.
References streamer_tree_cache_d::nodes.
Referenced by lto_input_scc(), lto_read_body(), and streamer_get_pickled_tree().
bool streamer_tree_cache_insert | ( | struct streamer_tree_cache_d * | cache, |
tree | t, | ||
hashval_t | hash, | ||
unsigned * | ix_p | ||
) |
Insert tree node T in CACHE. If T already existed in the cache return true. Otherwise, return false. If IX_P is non-null, update it with the index into the cache where T has been stored.
References streamer_tree_cache_insert_1().
Referenced by DFS_write_tree(), and lto_output_tree_1().
bool streamer_tree_cache_lookup | ( | struct streamer_tree_cache_d * | cache, |
tree | t, | ||
unsigned * | ix_p | ||
) |
Return true if tree node T exists in CACHE, otherwise false. If IX_P is not NULL, write to *IX_P the index into the cache where T is stored ((unsigned)-1 if T is not found).
References pointer_map< T >::contains(), and streamer_tree_cache_d::node_map.
Referenced by DFS_write_tree(), hash_tree(), lto_output_decl_state_refs(), lto_output_tree(), write_global_references(), write_global_stream(), and write_symbol().
void streamer_tree_cache_replace_tree | ( | struct streamer_tree_cache_d * | cache, |
tree | t, | ||
unsigned | ix | ||
) |
Replace the tree node with T in CACHE at slot IX.
References streamer_tree_cache_d::hashes, streamer_tree_cache_d::node_map, streamer_tree_cache_add_to_node_array(), streamer_tree_cache_get_hash(), and streamer_tree_cache_insert_1().
void streamer_write_builtin | ( | struct output_block * | , |
tree | |||
) |
void streamer_write_chain | ( | struct output_block * | , |
tree | , | ||
bool | |||
) |
void streamer_write_integer_cst | ( | struct output_block * | , |
tree | , | ||
bool | |||
) |
void streamer_write_string_cst | ( | struct output_block * | ob, |
struct lto_output_stream * | index_stream, | ||
tree | string | ||
) |
In tree-streamer-out.c.
@verbatim Routines for emitting trees to a file stream.
Copyright (C) 2011-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi llo@ googl e.co m
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Output the STRING constant to the string table in OB. Then put the index onto the INDEX_STREAM.
References streamer_write_string_with_length().
Referenced by lto_output_toplevel_asms(), and streamer_write_tree_header().
void streamer_write_tree_body | ( | struct output_block * | , |
tree | , | ||
bool | |||
) |
void streamer_write_tree_header | ( | struct output_block * | , |
tree | |||
) |