diff options
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index a1ee77b..2233349 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -423,7 +423,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, translation units into SET during IPA-inlining. We make them as local static nodes to prevent clashes with other local statics. */ if (boundary_p && node->analyzed - && symtab_get_symbol_partitioning_class (node) == SYMBOL_PARTITION) + && node->get_partitioning_class () == SYMBOL_PARTITION) { /* Inline clones can not be part of boundary. gcc_assert (!node->global.inlined_to); @@ -523,7 +523,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, bp_pack_value (&bp, node->implicit_section, 1); bp_pack_value (&bp, node->address_taken, 1); bp_pack_value (&bp, tag == LTO_symtab_analyzed_node - && symtab_get_symbol_partitioning_class (node) == SYMBOL_PARTITION + && node->get_partitioning_class () == SYMBOL_PARTITION && (reachable_from_other_partition_p (node, encoder) || referenced_from_other_partition_p (node, encoder)), 1); bp_pack_value (&bp, node->lowered, 1); @@ -600,7 +600,7 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, varpool_node *node, /* Constant pool initializers can be de-unified into individual ltrans units. FIXME: Alternatively at -Os we may want to avoid generating for them the local labels and share them across LTRANS partitions. */ - if (symtab_get_symbol_partitioning_class (node) != SYMBOL_PARTITION) + if (node->get_partitioning_class () != SYMBOL_PARTITION) { bp_pack_value (&bp, 0, 1); /* used_from_other_parition. */ bp_pack_value (&bp, 0, 1); /* in_other_partition. */ @@ -837,7 +837,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder) if (DECL_ABSTRACT_ORIGIN (node->decl)) { struct cgraph_node *origin_node - = cgraph_get_node (DECL_ABSTRACT_ORIGIN (node->decl)); + = cgraph_node::get (DECL_ABSTRACT_ORIGIN (node->decl)); add_node_to (encoder, origin_node, true); } } @@ -960,8 +960,7 @@ output_symtab (void) if (cgraph_node *cnode = dyn_cast <cgraph_node *> (node)) lto_output_node (ob, cnode, encoder); else - lto_output_varpool_node (ob, varpool (node), encoder); - + lto_output_varpool_node (ob, dyn_cast<varpool_node *> (node), encoder); } /* Go over the nodes in SET again to write edges. */ @@ -1130,18 +1129,18 @@ input_node (struct lto_file_decl_data *file_data, if (clone_ref != LCC_NOT_FOUND) { - node = cgraph_clone_node (cgraph (nodes[clone_ref]), fn_decl, - 0, CGRAPH_FREQ_BASE, false, - vNULL, false, NULL, NULL); + node = dyn_cast<cgraph_node *> (nodes[clone_ref])->create_clone (fn_decl, + 0, CGRAPH_FREQ_BASE, false, + vNULL, false, NULL, NULL); } else { /* Declaration of functions can be already merged with a declaration from other input file. We keep cgraph unmerged until after streaming of ipa passes is done. Alays forcingly create a fresh node. */ - node = cgraph_create_empty_node (); + node = cgraph_node::create_empty (); node->decl = fn_decl; - symtab_register_node (node); + node->register_symbol (); } node->order = order; @@ -1185,7 +1184,7 @@ input_node (struct lto_file_decl_data *file_data, input_overwrite_node (file_data, node, tag, &bp); /* Store a reference for now, and fix up later to be a pointer. */ - node->global.inlined_to = (cgraph_node_ptr) (intptr_t) ref; + node->global.inlined_to = (cgraph_node *) (intptr_t) ref; if (group) { @@ -1245,7 +1244,7 @@ input_varpool_node (struct lto_file_decl_data *file_data, of ipa passes is done. Alays forcingly create a fresh node. */ node = varpool_create_empty_node (); node->decl = var_decl; - symtab_register_node (node); + node->register_symbol (); node->order = order; if (order >= symtab_order) @@ -1339,13 +1338,13 @@ input_edge (struct lto_input_block *ib, vec<symtab_node *> nodes, struct bitpack_d bp; int ecf_flags = 0; - caller = cgraph (nodes[streamer_read_hwi (ib)]); + caller = dyn_cast<cgraph_node *> (nodes[streamer_read_hwi (ib)]); if (caller == NULL || caller->decl == NULL_TREE) internal_error ("bytecode stream: no caller found while reading edge"); if (!indirect) { - callee = cgraph (nodes[streamer_read_hwi (ib)]); + callee = dyn_cast<cgraph_node *> (nodes[streamer_read_hwi (ib)]); if (callee == NULL || callee->decl == NULL_TREE) internal_error ("bytecode stream: no callee found while reading edge"); } @@ -1360,9 +1359,9 @@ input_edge (struct lto_input_block *ib, vec<symtab_node *> nodes, freq = (int) bp_unpack_var_len_unsigned (&bp); if (indirect) - edge = cgraph_create_indirect_edge (caller, NULL, 0, count, freq); + edge = caller->create_indirect_edge (NULL, 0, count, freq); else - edge = cgraph_create_edge (caller, callee, NULL, count, freq); + edge = caller->create_edge (callee, NULL, count, freq); edge->indirect_inlining_edge = bp_unpack_value (&bp, 1); edge->speculative = bp_unpack_value (&bp, 1); @@ -1450,7 +1449,8 @@ input_cgraph_1 (struct lto_file_decl_data *file_data, /* Fixup inlined_to from reference to pointer. */ if (ref != LCC_NOT_FOUND) - cgraph (node)->global.inlined_to = cgraph (nodes[ref]); + dyn_cast<cgraph_node *> (node)->global.inlined_to + = dyn_cast<cgraph_node *> (nodes[ref]); else cnode->global.inlined_to = NULL; } @@ -1917,7 +1917,7 @@ input_cgraph_opt_section (struct lto_file_decl_data *file_data, for (i = 0; i < count; i++) { int ref = streamer_read_uhwi (&ib_main); - input_node_opt_summary (cgraph (nodes[ref]), + input_node_opt_summary (dyn_cast<cgraph_node *> (nodes[ref]), &ib_main, data_in); } lto_free_section_data (file_data, LTO_section_cgraph_opt_sum, NULL, data, |