static void build_single_def_use_links (void) { /* We use the multiple definitions problem to compute our restricted use-def chains. */ df_set_flags (DF_EQ_NOTES); df_md_add_problem (); df_note_add_problem (); df_analyze (); df_maybe_reorganize_use_refs (DF_REF_ORDER_BY_INSN_WITH_NOTES); use_def_ref.create (DF_USES_TABLE_SIZE ()); use_def_ref.safe_grow_cleared (DF_USES_TABLE_SIZE ()); reg_defs.create (max_reg_num ()); reg_defs.safe_grow_cleared (max_reg_num ()); reg_defs_stack.create (n_basic_blocks_for_fn (cfun) * 10); local_md = BITMAP_ALLOC (NULL); local_lr = BITMAP_ALLOC (NULL); /* Walk the dominator tree looking for single reaching definitions dominating the uses. This is similar to how SSA form is built. */ single_def_use_dom_walker (CDI_DOMINATORS) .walk (cfun->cfg->x_entry_block_ptr); BITMAP_FREE (local_lr); BITMAP_FREE (local_md); reg_defs.release (); reg_defs_stack.release (); }
scoped_attributes* register_scoped_attributes (const struct attribute_spec * attributes, const char* ns) { scoped_attributes *result = NULL; /* See if we already have attributes in the namespace NS. */ result = find_attribute_namespace (ns); if (result == NULL) { /* We don't have any namespace NS yet. Create one. */ scoped_attributes sa; if (!attributes_table.is_empty ()) attributes_table.create (64); memset (&sa, 0, sizeof (sa)); sa.ns = ns; sa.attributes.create (64); result = attributes_table.safe_push (sa); result->attribute_hash = new hash_table<attribute_hasher> (200); } /* Really add the attributes to their namespace now. */ for (unsigned i = 0; attributes[i].name != NULL; ++i) { result->attributes.safe_push (attributes[i]); register_scoped_attribute (&attributes[i], result); } gcc_assert (result != NULL); return result; }
/* Create structures to hold check information for current function. */ static void chkp_init_check_info (void) { struct bb_checks empty_bbc; int n; empty_bbc.checks = vNULL; chkp_release_check_info (); check_infos.create (last_basic_block_for_fn (cfun)); for (n = 0; n < last_basic_block_for_fn (cfun); n++) { check_infos.safe_push (empty_bbc); check_infos.last ().checks.create (0); } }
void init_ssa_operands (struct function *fn) { if (!n_initialized++) { build_uses.create (10); build_vuse = NULL_TREE; build_vdef = NULL_TREE; bitmap_obstack_initialize (&operands_bitmap_obstack); } gcc_assert (gimple_ssa_operands (fn)->operand_memory == NULL); gimple_ssa_operands (fn)->operand_memory_index = gimple_ssa_operands (fn)->ssa_operand_mem_size; gimple_ssa_operands (fn)->ops_active = true; gimple_ssa_operands (fn)->ssa_operand_mem_size = OP_SIZE_INIT; create_vop_var (fn); }
/* Initialize the per SSA_NAME value-handles array. Returns it. */ void threadedge_initialize_values (void) { gcc_assert (!ssa_name_values.exists ()); ssa_name_values.create (num_ssa_names); }