diff options
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 4aa2655577c..25a6ad4421c 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -178,7 +178,7 @@ ipa_reference_get_not_read_global (struct cgraph_node *fn) get_reference_optimization_summary (cgraph_function_node (fn, NULL)); if (info) return info->statics_not_read; - else if (flags_from_decl_or_type (fn->symbol.decl) & ECF_LEAF) + else if (flags_from_decl_or_type (fn->decl) & ECF_LEAF) return all_module_statics; else return NULL; @@ -196,7 +196,7 @@ ipa_reference_get_not_written_global (struct cgraph_node *fn) get_reference_optimization_summary (fn); if (info) return info->statics_not_written; - else if (flags_from_decl_or_type (fn->symbol.decl) & ECF_LEAF) + else if (flags_from_decl_or_type (fn->decl) & ECF_LEAF) return all_module_statics; else return NULL; @@ -365,7 +365,7 @@ propagate_bits (ipa_reference_global_vars_info_t x_global, struct cgraph_node *x continue; /* Only look into nodes we can propagate something. */ - int flags = flags_from_decl_or_type (y->symbol.decl); + int flags = flags_from_decl_or_type (y->decl); if (avail > AVAIL_OVERWRITABLE || (avail == AVAIL_OVERWRITABLE && (flags & ECF_LEAF))) { @@ -460,11 +460,11 @@ analyze_function (struct cgraph_node *fn) tree var; local = init_function_info (fn); - for (i = 0; ipa_ref_list_reference_iterate (&fn->symbol.ref_list, i, ref); i++) + for (i = 0; ipa_ref_list_reference_iterate (&fn->ref_list, i, ref); i++) { if (!is_a <varpool_node> (ref->referred)) continue; - var = ipa_ref_varpool_node (ref)->symbol.decl; + var = ipa_ref_varpool_node (ref)->decl; if (!is_proper_for_analysis (var)) continue; switch (ref->use) @@ -562,7 +562,7 @@ generate_summary (void) l = &get_reference_vars_info (node)->local; fprintf (dump_file, "\nFunction name:%s/%i:", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); fprintf (dump_file, "\n locals read: "); if (l->statics_read) EXECUTE_IF_SET_IN_BITMAP (l->statics_read, @@ -587,7 +587,7 @@ static void read_write_all_from_decl (struct cgraph_node *node, bool &read_all, bool &write_all) { - tree decl = node->symbol.decl; + tree decl = node->decl; int flags = flags_from_decl_or_type (decl); if ((flags & ECF_LEAF) && cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE) @@ -600,7 +600,7 @@ read_write_all_from_decl (struct cgraph_node *node, read_all = true; if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " %s/%i -> read all\n", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); } else { @@ -610,7 +610,7 @@ read_write_all_from_decl (struct cgraph_node *node, write_all = true; if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " %s/%i -> read all, write all\n", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); } } @@ -677,12 +677,12 @@ propagate (void) /* Now we know what vars are really statics; prune out those that aren't. */ FOR_EACH_VARIABLE (vnode) - if (vnode->symbol.externally_visible - || TREE_ADDRESSABLE (vnode->symbol.decl) - || TREE_READONLY (vnode->symbol.decl) - || !is_proper_for_analysis (vnode->symbol.decl) - || !vnode->symbol.definition) - bitmap_clear_bit (all_module_statics, DECL_UID (vnode->symbol.decl)); + if (vnode->externally_visible + || TREE_ADDRESSABLE (vnode->decl) + || TREE_READONLY (vnode->decl) + || !is_proper_for_analysis (vnode->decl) + || !vnode->definition) + bitmap_clear_bit (all_module_statics, DECL_UID (vnode->decl)); /* Forget info we collected "just for fun" on variables that turned out to be non-local. */ @@ -713,7 +713,7 @@ propagate (void) bool write_all = false; node = order[i]; - if (node->symbol.alias) + if (node->alias) continue; node_info = get_reference_vars_info (node); @@ -723,7 +723,7 @@ propagate (void) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "Starting cycle with %s/%i\n", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); vec<cgraph_node_ptr> cycle_nodes = ipa_get_nodes_in_cycle (node); @@ -732,7 +732,7 @@ propagate (void) { if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, " Visiting %s/%i\n", - cgraph_node_asm_name (w), w->symbol.order); + cgraph_node_asm_name (w), w->order); get_read_write_all_from_node (w, read_all, write_all); if (read_all && write_all) break; @@ -759,7 +759,7 @@ propagate (void) { ipa_reference_vars_info_t w_ri = get_reference_vars_info (w); ipa_reference_local_vars_info_t w_l = &w_ri->local; - int flags = flags_from_decl_or_type (w->symbol.decl); + int flags = flags_from_decl_or_type (w->decl); if (!(flags & ECF_CONST)) read_all = union_static_var_sets (node_g->statics_read, @@ -791,12 +791,12 @@ propagate (void) struct cgraph_node *w; node = order[i]; - if (node->symbol.alias) + if (node->alias) continue; fprintf (dump_file, "\nFunction name:%s/%i:", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); ipa_reference_vars_info_t node_info = get_reference_vars_info (node); ipa_reference_global_vars_info_t node_g = &node_info->global; @@ -808,7 +808,7 @@ propagate (void) ipa_reference_local_vars_info_t w_l = &w_ri->local; if (w != node) fprintf (dump_file, "\n next cycle: %s/%i ", - cgraph_node_asm_name (w), w->symbol.order); + cgraph_node_asm_name (w), w->order); fprintf (dump_file, "\n locals read: "); dump_static_vars_set_to_file (dump_file, w_l->statics_read); fprintf (dump_file, "\n locals written: "); @@ -832,9 +832,9 @@ propagate (void) ipa_reference_optimization_summary_t opt; node_info = get_reference_vars_info (node); - if (!node->symbol.alias + if (!node->alias && (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE - || (flags_from_decl_or_type (node->symbol.decl) & ECF_LEAF))) + || (flags_from_decl_or_type (node->decl) & ECF_LEAF))) { node_g = &node_info->global; @@ -891,7 +891,7 @@ write_node_summary_p (struct cgraph_node *node, ipa_reference_optimization_summary_t info; /* See if we have (non-empty) info. */ - if (!node->symbol.definition || node->global.inlined_to) + if (!node->definition || node->global.inlined_to) return false; info = get_reference_optimization_summary (node); if (!info || (bitmap_empty_p (info->statics_not_read) @@ -905,7 +905,7 @@ write_node_summary_p (struct cgraph_node *node, In future we might also want to include summaries of functions references by initializers of constant variables references in current unit. */ if (!reachable_from_this_partition_p (node, encoder) - && !referenced_from_this_partition_p (&node->symbol.ref_list, encoder)) + && !referenced_from_this_partition_p (&node->ref_list, encoder)) return false; /* See if the info has non-empty intersections with vars we want to encode. */ @@ -971,10 +971,10 @@ ipa_reference_write_optimization_summary (void) symtab_node snode = lto_symtab_encoder_deref (encoder, i); varpool_node *vnode = dyn_cast <varpool_node> (snode); if (vnode - && bitmap_bit_p (all_module_statics, DECL_UID (vnode->symbol.decl)) - && referenced_from_this_partition_p (&vnode->symbol.ref_list, encoder)) + && bitmap_bit_p (all_module_statics, DECL_UID (vnode->decl)) + && referenced_from_this_partition_p (&vnode->ref_list, encoder)) { - tree decl = vnode->symbol.decl; + tree decl = vnode->decl; bitmap_set_bit (ltrans_statics, DECL_UID (decl)); splay_tree_insert (reference_vars_to_consider, DECL_UID (decl), (splay_tree_value)decl); @@ -1086,7 +1086,7 @@ ipa_reference_read_optimization_summary (void) if (dump_file) fprintf (dump_file, "\nFunction name:%s/%i:\n static not read:", - cgraph_node_asm_name (node), node->symbol.order); + cgraph_node_asm_name (node), node->order); /* Set the statics not read. */ v_count = streamer_read_hwi (ib); |