aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-01-03 14:06:54 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2011-01-03 14:06:54 +0100
commitce47fda3ce6adfe86f725930dedbfb1f775ddd45 (patch)
treea0198b9cc6e29df5e3c9c571f5a99db84117cc75 /gcc/cgraphunit.c
parentfd0bcb5af982e58e40c5fad1eb0d1a54316b2807 (diff)
downloadgcc-ce47fda3ce6adfe86f725930dedbfb1f775ddd45.zip
gcc-ce47fda3ce6adfe86f725930dedbfb1f775ddd45.tar.gz
gcc-ce47fda3ce6adfe86f725930dedbfb1f775ddd45.tar.bz2
re PR tree-optimization/46984 (g++.dg/torture/pr45699.C FAILs with -fno-early-inlining -flto)
2011-01-03 Martin Jambor <mjambor@suse.cz> PR tree-optimization/46984 * cgraph.h (cgraph_indirect_call_info): make field thunk_delta HOST_WIDE_INT. (cgraph_create_indirect_edge): Fixed line length. (cgraph_indirect_call_info): Declare. (cgraph_make_edge_direct) Update declaration. * cgraph.c (cgraph_allocate_init_indirect_info): New function. (cgraph_create_indirect_edge): Use it. (cgraph_make_edge_direct): Made delta HOST_WIDE_INT. Updated all callees. * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Update for the new thunk_delta representation. * ipa-prop.c (ipa_make_edge_direct_to_target): Convert delta to HOST_WIDE_INT. (ipa_write_indirect_edge_info): Remove streaming of thunk_delta. (ipa_read_indirect_edge_info): Likewise. * lto-cgraph.c (output_edge_opt_summary): New function. (output_node_opt_summary): Call it on all outgoing edges. (input_edge_opt_summary): New function. (input_node_opt_summary): Call it on all outgoing edges. * testsuite/g++.dg/ipa/pr46984.C: New test. From-SVN: r168420
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 013cf63..36ba75a 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2168,22 +2168,20 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
}
}
- if (e->indirect_info && e->indirect_info->thunk_delta
- && integer_nonzerop (e->indirect_info->thunk_delta)
+ if (e->indirect_info &&
+ e->indirect_info->thunk_delta != 0
&& (!e->callee->clone.combined_args_to_skip
|| !bitmap_bit_p (e->callee->clone.combined_args_to_skip, 0)))
{
if (cgraph_dump_file)
- {
- fprintf (cgraph_dump_file, " Thunk delta is ");
- print_generic_expr (cgraph_dump_file,
- e->indirect_info->thunk_delta, 0);
- fprintf (cgraph_dump_file, "\n");
- }
+ fprintf (cgraph_dump_file, " Thunk delta is "
+ HOST_WIDE_INT_PRINT_DEC "\n", e->indirect_info->thunk_delta);
gsi = gsi_for_stmt (e->call_stmt);
gsi_computed = true;
- gimple_adjust_this_by_delta (&gsi, e->indirect_info->thunk_delta);
- e->indirect_info->thunk_delta = NULL_TREE;
+ gimple_adjust_this_by_delta (&gsi,
+ build_int_cst (sizetype,
+ e->indirect_info->thunk_delta));
+ e->indirect_info->thunk_delta = 0;
}
if (e->callee->clone.combined_args_to_skip)