GCC Middle and Back End API Reference
DFS Class Reference
Collaboration diagram for DFS:

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
 

Constructor & Destructor Documentation

◆ DFS()

◆ ~DFS()

DFS::~DFS ( )

References ggc_alloc(), NULL, and sccstate_obstack.

Member Function Documentation

◆ DFS_write_tree()

void DFS::DFS_write_tree ( struct output_block * ob,
sccs * from_state,
tree expr,
bool ref_p,
bool this_ref_p )
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(), expr, ggc_alloc(), output_block::local_trees, max_local_entry, NULL, NULL_TREE, sccstack, streamer_tree_cache_lookup(), tree_is_indexable(), worklist_vec, and output_block::writer_cache.

Referenced by DFS().

◆ DFS_write_tree_body()

void DFS::DFS_write_tree_body ( struct output_block * ob,
tree expr,
sccs * expr_state,
bool ref_p )
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, ggc_alloc(), 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, 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().

◆ hash_scc()

hashval_t DFS::hash_scc ( struct output_block * ob,
unsigned first,
unsigned size,
bool ref_p,
bool this_ref_p )
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 gcc_assert, gcc_checking_assert, ggc_alloc(), hash_tree(), i, iterative_hash_hashval_t(), map, NULL, qsort, scc_entry_compare(), sccstack, and output_block::writer_cache.

Referenced by DFS().

◆ scc_entry_compare()

int DFS::scc_entry_compare ( const void * p1_,
const void * p2_ )
staticprivate
Compare two SCC entries by their hash value for qsorting them.   

References ggc_alloc().

Referenced by hash_scc().

Field Documentation

◆ max_local_entry

int DFS::max_local_entry
private

Referenced by DFS(), and DFS_write_tree().

◆ sccstack

auto_vec<scc_entry,32> DFS::sccstack

Referenced by DFS(), DFS_write_tree(), and hash_scc().

◆ sccstate

hash_map<tree, sccs *> DFS::sccstate
private

Referenced by DFS().

◆ sccstate_obstack

struct obstack DFS::sccstate_obstack
private

Referenced by DFS(), and ~DFS().

◆ worklist_vec

auto_vec<worklist, 32> DFS::worklist_vec
private

Referenced by DFS(), and DFS_write_tree().


The documentation for this class was generated from the following file: