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/ipa-prop.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/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index a81bb3c..f21ab89 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1614,12 +1614,10 @@ update_jump_functions_after_inlining (struct cgraph_edge *cs, } /* If TARGET is an addr_expr of a function declaration, make it the destination - of an indirect edge IE and return the edge. Otherwise, return NULL. Delta, - if non-NULL, is an integer constant that must be added to this pointer - (first parameter). */ + of an indirect edge IE and return the edge. Otherwise, return NULL. */ struct cgraph_edge * -ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, tree delta) +ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target) { struct cgraph_node *callee; @@ -1632,11 +1630,11 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, tree delta) return NULL; ipa_check_create_node_params (); - /* We can not make edges to inline clones. It is bug that someone removed the cgraph - node too early. */ + /* We can not make edges to inline clones. It is bug that someone removed + the cgraph node too early. */ gcc_assert (!callee->global.inlined_to); - cgraph_make_edge_direct (ie, callee, delta ? tree_low_cst (delta, 0) : 0); + cgraph_make_edge_direct (ie, callee); if (dump_file) { fprintf (dump_file, "ipa-prop: Discovered %s call to a known target " @@ -1648,13 +1646,6 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, tree delta) print_gimple_stmt (dump_file, ie->call_stmt, 2, TDF_SLIM); else fprintf (dump_file, "with uid %i\n", ie->lto_stmt_uid); - - if (delta) - { - fprintf (dump_file, " Thunk delta is "); - print_generic_expr (dump_file, delta, 0); - fprintf (dump_file, "\n"); - } } callee = cgraph_function_or_thunk_node (callee, NULL); @@ -1683,7 +1674,7 @@ try_make_edge_direct_simple_call (struct cgraph_edge *ie, else return NULL; - return ipa_make_edge_direct_to_target (ie, target, NULL_TREE); + return ipa_make_edge_direct_to_target (ie, target); } /* Try to find a destination for indirect edge IE that corresponds to a @@ -1695,7 +1686,7 @@ static struct cgraph_edge * try_make_edge_direct_virtual_call (struct cgraph_edge *ie, struct ipa_jump_func *jfunc) { - tree binfo, type, target, delta; + tree binfo, type, target; HOST_WIDE_INT token; if (jfunc->type == IPA_JF_KNOWN_TYPE) @@ -1710,12 +1701,12 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, type = ie->indirect_info->otr_type; binfo = get_binfo_at_offset (binfo, ie->indirect_info->anc_offset, type); if (binfo) - target = gimple_get_virt_method_for_binfo (token, binfo, &delta); + target = gimple_get_virt_method_for_binfo (token, binfo); else return NULL; if (target) - return ipa_make_edge_direct_to_target (ie, target, delta); + return ipa_make_edge_direct_to_target (ie, target); else return NULL; } |