diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-04 21:28:49 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-04 20:28:49 +0000 |
commit | 0b986c6ac777aa4ecbfa29549148ef8ab95595e1 (patch) | |
tree | 47e63aafd9dc2bb56b66e8efb608e43a446ccad6 /gcc/cgraph.c | |
parent | d303ff9764d326120bfd05eb75e82e66fd12ade3 (diff) | |
download | gcc-0b986c6ac777aa4ecbfa29549148ef8ab95595e1.zip gcc-0b986c6ac777aa4ecbfa29549148ef8ab95595e1.tar.gz gcc-0b986c6ac777aa4ecbfa29549148ef8ab95595e1.tar.bz2 |
re PR middle-end/64922 (runtime error: member call on misaligned address for type 'struct _Rep')
PR middle-end/64922
* gimple.c: Include gimple-ssa.h.
(maybe_remove_unused_call_args): New function.
* gimple.h (maybe_remove_unused_call_args): Declare.
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Use it.
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Likewise.
* gimple-fold.c (gimple_fold_call): Likewise.
From-SVN: r220417
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 89d0d2f..8ea8ae9 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1324,7 +1324,8 @@ cgraph_edge::redirect_call_stmt_to_callee (void) (int64_t)e->count); gcc_assert (e2->speculative); push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl)); - new_stmt = gimple_ic (e->call_stmt, dyn_cast<cgraph_node *> (ref->referred), + new_stmt = gimple_ic (e->call_stmt, + dyn_cast<cgraph_node *> (ref->referred), e->count || e2->count ? RDIV (e->count * REG_BR_PROB_BASE, e->count + e2->count) @@ -1464,6 +1465,9 @@ cgraph_edge::redirect_call_stmt_to_callee (void) update_stmt_fn (DECL_STRUCT_FUNCTION (e->caller->decl), new_stmt); } + maybe_remove_unused_call_args (DECL_STRUCT_FUNCTION (e->caller->decl), + new_stmt); + e->caller->set_call_stmt_including_clones (e->call_stmt, new_stmt, false); if (symtab->dump_file) |