diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-09-02 15:26:30 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-09-02 15:26:30 +0200 |
commit | 81fa35bd5991d39abb342bd655fbe8fc7b9b4026 (patch) | |
tree | 40b78961e6d8224638e16b90b5477c67f9a4ee1c /gcc/lto-cgraph.c | |
parent | 5d882cc1dafe2546b34f1845f943b91f024dbac4 (diff) | |
download | gcc-81fa35bd5991d39abb342bd655fbe8fc7b9b4026.zip gcc-81fa35bd5991d39abb342bd655fbe8fc7b9b4026.tar.gz gcc-81fa35bd5991d39abb342bd655fbe8fc7b9b4026.tar.bz2 |
cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
2011-09-02 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
* gimple-fold.c (gimple_get_virt_method_for_binfo): Rewritten to use
BINFO_VTABLE. Parameter delta removed, all callers updated.
* tree.c (free_lang_data_in_binfo): Clear BINFO_VIRTUALs instead
BINFO_VTABLE.
* cgraph.c (cgraph_make_edge_direct): Removed parameter delta, updated
all calls.
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Removed
handling of thunk_delta.
* ipa-cp.c (get_indirect_edge_target): Removed parameter delta.
(devirtualization_time_bonus): Do not handle thunk deltas.
(ipcp_discover_new_direct_edges): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
(try_make_edge_direct_simple_call): Likewise.
(try_make_edge_direct_virtual_call): Likewise.
* lto-cgraph.c (output_cgraph_opt_summary_p): Likewise. Mark
parameter set as unused.
(output_edge_opt_summary): Likewise. Mark both parameters as unused.
* lto-cgraph.c (output_cgraph_opt_summary_p): Likewise. Mark
parameter set as unused.
(output_edge_opt_summary): Likewise. Mark both parameters as unused.
(input_edge_opt_summary): Likewise.
* lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not stream
BINFO_VIRTUALS at all.
* lto-streamer-in.c (lto_input_ts_binfo_tree_pointers): Likewise.
* testsuite/g++.dg/ipa/devirt-3.C: Added a distraction method.
* testsuite/g++.dg/ipa/ivinline-7.C: Added a test for direct call
discovery, xfailed test for inlining.
* testsuite/g++.dg/ipa/ivinline-9.C: Likewise.
From-SVN: r178472
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 5bcc342..72d084b 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -1501,22 +1501,9 @@ input_cgraph (void) /* True when we need optimization summary for NODE. */ static int -output_cgraph_opt_summary_p (struct cgraph_node *node, cgraph_node_set set) +output_cgraph_opt_summary_p (struct cgraph_node *node, + cgraph_node_set set ATTRIBUTE_UNUSED) { - struct cgraph_edge *e; - - if (cgraph_node_in_set_p (node, set)) - { - for (e = node->callees; e; e = e->next_callee) - if (e->indirect_info - && e->indirect_info->thunk_delta != 0) - return true; - - for (e = node->indirect_calls; e; e = e->next_callee) - if (e->indirect_info->thunk_delta != 0) - return true; - } - return (node->clone_of && (node->clone.tree_map || node->clone.args_to_skip @@ -1525,13 +1512,9 @@ output_cgraph_opt_summary_p (struct cgraph_node *node, cgraph_node_set set) /* Output optimization summary for EDGE to OB. */ static void -output_edge_opt_summary (struct output_block *ob, - struct cgraph_edge *edge) +output_edge_opt_summary (struct output_block *ob ATTRIBUTE_UNUSED, + struct cgraph_edge *edge ATTRIBUTE_UNUSED) { - if (edge->indirect_info) - streamer_write_hwi (ob, edge->indirect_info->thunk_delta); - else - streamer_write_hwi (ob, 0); } /* Output optimization summary for NODE to OB. */ @@ -1631,17 +1614,9 @@ output_cgraph_opt_summary (cgraph_node_set set) /* Input optimisation summary of EDGE. */ static void -input_edge_opt_summary (struct cgraph_edge *edge, - struct lto_input_block *ib_main) +input_edge_opt_summary (struct cgraph_edge *edge ATTRIBUTE_UNUSED, + struct lto_input_block *ib_main ATTRIBUTE_UNUSED) { - HOST_WIDE_INT thunk_delta; - thunk_delta = streamer_read_hwi (ib_main); - if (thunk_delta != 0) - { - gcc_assert (!edge->indirect_info); - edge->indirect_info = cgraph_allocate_init_indirect_info (); - edge->indirect_info->thunk_delta = thunk_delta; - } } /* Input optimisation summary of NODE. */ |