|
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 "tree-streamer.h"#include "cgraph.h"
Variables | |
| unsigned char | streamer_mode_table [MAX_MACHINE_MODE] |
|
static |
Preload common nodes into CACHE and make sure they are merged properly according to the gimple type table.
References global_trees, i, integer_types, itk_char, itk_none, lto_stream_offload_p, preload_common_nodes(), record_common_node(), sizetype_tab, stk_type_kind_last, TI_BOOLEAN_FALSE, TI_BOOLEAN_TRUE, TI_BOOLEAN_TYPE, TI_CHREC_DONT_KNOW, TI_CHREC_KNOWN, TI_CURRENT_OPTIMIZE_PRAGMA, TI_CURRENT_TARGET_PRAGMA, TI_MAIN_IDENTIFIER, TI_MAX, TI_OPTIMIZATION_CURRENT, TI_OPTIMIZATION_DEFAULT, TI_PID_TYPE, TI_TARGET_OPTION_CURRENT, TI_TARGET_OPTION_DEFAULT, TI_VA_LIST_FPR_COUNTER_FIELD, TI_VA_LIST_GPR_COUNTER_FIELD, and TI_VA_LIST_TYPE.
Referenced by preload_common_nodes(), and streamer_tree_cache_create().
|
static |
Record NODE in CACHE.
References boolean_false_node, boolean_true_node, boolean_type_node, char_type_node, error_mark_node, gcc_checking_assert, gcc_unreachable, streamer_tree_cache_d::next_idx, record_common_node(), streamer_tree_cache_append(), TREE_CHAIN, TREE_CODE, TREE_TYPE, TYPE_FIELDS, and verify_common_node_recorded().
Referenced by preload_common_nodes(), and record_common_node().
| void streamer_check_handled_ts_structures | ( | void | ) |
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 gcc_assert, i, LAST_TS_ENUM, and streamer_check_handled_ts_structures().
Referenced by lto_streamer_init(), and streamer_check_handled_ts_structures().
|
static |
Helper for streamer_tree_cache_insert_1. Add T to CACHE->NODES at slot IX.
References streamer_tree_cache_d::hashes, streamer_tree_cache_d::nodes, and streamer_tree_cache_add_to_node_array().
Referenced by streamer_tree_cache_add_to_node_array(), streamer_tree_cache_append(), streamer_tree_cache_insert_1(), and streamer_tree_cache_replace_tree().
| 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::next_idx, streamer_tree_cache_d::node_map, streamer_tree_cache_add_to_node_array(), streamer_tree_cache_append(), and streamer_tree_cache_insert_1().
Referenced by lto_input_scc(), lto_input_tree_1(), lto_read_tree(), record_common_node(), and streamer_tree_cache_append().
| struct streamer_tree_cache_d * streamer_tree_cache_create | ( | bool | with_hashes, |
| bool | with_map, | ||
| bool | with_vec ) |
Create a cache of pickled nodes.
References streamer_tree_cache_d::hashes, streamer_tree_cache_d::next_idx, streamer_tree_cache_d::node_map, streamer_tree_cache_d::nodes, preload_common_nodes(), and streamer_tree_cache_create().
Referenced by create_output_block(), lto_data_in_create(), and streamer_tree_cache_create().
| void streamer_tree_cache_delete | ( | struct streamer_tree_cache_d * | c | ) |
Delete the streamer cache C.
References free(), NULL, and streamer_tree_cache_delete().
Referenced by destroy_output_block(), lto_data_in_delete(), and streamer_tree_cache_delete().
| 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(), and streamer_tree_cache_insert_1().
Referenced by DFS::DFS(), lto_output_tree_1(), and streamer_tree_cache_insert().
|
static |
Helper for streamer_tree_cache_insert and streamer_tree_cache_insert_at. CACHE, T, and IX_P are as in streamer_tree_cache_insert. If INSERT_AT_NEXT_SLOT_P is true, T is inserted at the next available slot in the cache. Otherwise, T is inserted at the position indicated in *IX_P. If T already existed in CACHE, return true. Otherwise, return false.
References gcc_assert, hash_map< KeyId, Value, Traits >::get_or_insert(), streamer_tree_cache_d::next_idx, streamer_tree_cache_d::node_map, streamer_tree_cache_add_to_node_array(), and streamer_tree_cache_insert_1().
Referenced by streamer_tree_cache_append(), streamer_tree_cache_insert(), streamer_tree_cache_insert_1(), and streamer_tree_cache_replace_tree().
| 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 gcc_assert, hash_map< KeyId, Value, Traits >::get(), streamer_tree_cache_d::node_map, NULL, and streamer_tree_cache_lookup().
Referenced by DFS::DFS_write_tree(), lto_output_decl_state_refs(), lto_output_tree(), stream_write_tree_ref(), streamer_tree_cache_lookup(), verify_common_node_recorded(), 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(), streamer_tree_cache_insert_1(), and streamer_tree_cache_replace_tree().
Referenced by streamer_tree_cache_replace_tree().
|
static |
Verify that NODE is in CACHE.
References gcc_assert, i, streamer_tree_cache_d::node_map, streamer_tree_cache_d::nodes, NULL, streamer_tree_cache_lookup(), and verify_common_node_recorded().
Referenced by record_common_node(), and verify_common_node_recorded().
| unsigned char streamer_mode_table[MAX_MACHINE_MODE] |
Miscellaneous utilities for tree streaming. Things that are used in both input and output are here. Copyright (C) 2011-2026 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@google.com> 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/>.
Table indexed by machine_mode, used for 2 different purposes. During streaming out we record there non-zero value for all modes that were streamed out. During streaming in, we translate the on the disk mode using this table. For normal LTO it is set to identity, for ACCEL_COMPILER depending on the mode_table content.
In tree-streamer.cc.
Referenced by bp_pack_machine_mode(), lto_output_init_mode_table(), and lto_write_mode_table().