GCC Middle and Back End API Reference
|
Data Structures | |
struct | scc_entry |
struct | sccs |
struct | worklist |
Public Member Functions | |
DFS (struct output_block *ob, tree expr, bool ref_p, bool this_ref_p, bool single_p) | |
~DFS () | |
Data Fields | |
auto_vec< scc_entry, 32 > | sccstack |
Private Member Functions | |
void | DFS_write_tree_body (struct output_block *ob, tree expr, sccs *expr_state, bool ref_p) |
void | DFS_write_tree (struct output_block *ob, sccs *from_state, tree expr, bool ref_p, bool this_ref_p) |
hashval_t | hash_scc (struct output_block *ob, unsigned first, unsigned size, bool ref_p, bool this_ref_p) |
Static Private Member Functions | |
static int | scc_entry_compare (const void *, const void *) |
Private Attributes | |
int | max_local_entry |
hash_map< tree, sccs * > | sccstate |
auto_vec< worklist, 32 > | worklist_vec |
struct obstack | sccstate_obstack |
DFS::DFS | ( | struct output_block * | ob, |
tree | expr, | ||
bool | ref_p, | ||
bool | this_ref_p, | ||
bool | single_p ) |
Emit the physical representation of tree node EXPR to output block OB, using depth-first search on the subgraph. If THIS_REF_P is true, the leaves of EXPR are emitted as references via lto_output_tree_ref. REF_P is used for streaming siblings of EXPR. If SINGLE_P is true, this is for a rewalk of a single leaf SCC.
References hash_set< KeyId, Lazy, Traits >::add(), DFS::worklist::cstate, DECL_P, output_block::decl_state, DFS_write_tree(), DFS_write_tree_body(), DFS::sccs::dfsnum, DFS::worklist::expr, DFS::worklist::from_state, gcc_assert, gcc_checking_assert, gcc_obstack_init, get_symbol_initial_value(), get_tree_code_name(), hash_scc(), i, internal_error(), local_tree_p(), output_block::local_trees, DFS::sccs::low, lto_is_streamable(), lto_output_tree_1(), LTO_section_decls, LTO_tree_scc, LTO_trees, lto_write_tree_1(), output_block::main_stream, max_local_entry, MIN, NULL, DFS::worklist::ref_p, sccstack, sccstate, sccstate_obstack, output_block::section_type, streamer_dump_file, streamer_tree_cache_insert(), streamer_write_record_start(), streamer_write_tree_header(), streamer_write_uhwi(), lto_out_decl_state::symtab_node_encoder, DFS::worklist::this_ref_p, lto_output_stream::total_size, TREE_CODE, TREE_OVERFLOW, TREE_TYPE, worklist_vec, and output_block::writer_cache.
Referenced by hash_scc().
DFS::~DFS | ( | ) |
References NULL, and sccstate_obstack.
|
private |
DFS walk EXPR and stream SCCs of tree bodies if they are not already in the streamer cache. Main routine called for each visit of EXPR.
References hash_set< KeyId, Lazy, Traits >::contains(), DFS::worklist::cstate, DFS::worklist::expr, DFS::worklist::from_state, output_block::local_trees, max_local_entry, NULL, NULL_TREE, DFS::worklist::ref_p, sccstack, streamer_tree_cache_lookup(), DFS::worklist::this_ref_p, tree_is_indexable(), worklist_vec, and output_block::writer_cache.
Referenced by DFS().
|
private |
Handle the tree EXPR in the DFS walk with SCC state EXPR_STATE and DFS recurse for all tree edges originating from it.
References all_translation_units, BINFO_BASE_BINFOS, BINFO_OFFSET, BINFO_VTABLE, BLOCK_ABSTRACT_ORIGIN, BLOCK_SUPERCONTEXT, BLOCK_VARS, CODE_CONTAINS_STRUCT, CONSTRUCTOR_ELTS, count, DECL_ABSTRACT_ORIGIN, DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, DECL_ATTRIBUTES, DECL_BIT_FIELD_REPRESENTATIVE, DECL_BIT_FIELD_TYPE, DECL_CONTEXT, DECL_DEBUG_EXPR, DECL_EXTERNAL, DECL_FCONTEXT, DECL_FIELD_BIT_OFFSET, DECL_FIELD_OFFSET, DECL_FUNCTION_PERSONALITY, DECL_FUNCTION_SPECIFIC_OPTIMIZATION, DECL_FUNCTION_SPECIFIC_TARGET, DECL_HAS_DEBUG_EXPR_P, DECL_HAS_VALUE_EXPR_P, DECL_NAME, DECL_SIZE, DECL_SIZE_UNIT, DECL_VALUE_EXPR, DECL_VINDEX, DFS_follow_tree_edge, error_mark_node, FOR_EACH_CONSTRUCTOR_ELT, FOR_EACH_VEC_ELT, FUNC_OR_METHOD_TYPE_P, gcc_assert, gcc_checking_assert, i, IDENTIFIER_ANON_P, NULL, NUM_POLY_INT_COEFFS, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, omp_clause_num_ops, OMP_CLAUSE_OPERAND, POINTER_TYPE_P, POLY_INT_CST_COEFF, RAW_DATA_OWNER, RECORD_OR_UNION_TYPE_P, TREE_BLOCK, TREE_CHAIN, TREE_CODE, TREE_IMAGPART, TREE_OPERAND, TREE_OPERAND_LENGTH, TREE_PURPOSE, TREE_REALPART, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, TYPE_ARG_TYPES, TYPE_ATTRIBUTES, TYPE_CONTEXT, TYPE_DOMAIN, TYPE_FIELDS, TYPE_MAIN_VARIANT, TYPE_MAX_VALUE_RAW, TYPE_MIN_VALUE_RAW, TYPE_NAME, TYPE_SIZE, TYPE_SIZE_UNIT, VAR_OR_FUNCTION_DECL_P, VAR_P, VECTOR_CST_ENCODED_ELT, and vector_cst_encoded_nelts().
Referenced by DFS().
|
private |
Return a hash value for the SCC on the SCC stack from FIRST with SIZE. THIS_REF_P and REF_P are as passed to lto_output_tree for FIRST.
References DFS(), gcc_assert, gcc_checking_assert, hash_tree(), i, iterative_hash_hashval_t(), map, NULL, qsort, scc_entry_compare(), sccstack, and output_block::writer_cache.
Referenced by DFS().
|
staticprivate |
Compare two SCC entries by their hash value for qsorting them.
References DFS::scc_entry::hash.
Referenced by hash_scc().
|
private |
Referenced by DFS(), and DFS_write_tree().
Referenced by DFS(), DFS_write_tree(), and hash_scc().
Referenced by DFS(), and DFS_write_tree().