Use gimple_call for callgraph edges
commit91b34a0536596372e02b8f68f4e5bfc3e1c04df4
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 2 Apr 2014 17:21:21 +0000 (2 13:21 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:52 +0000 (24 17:24 -0400)
tree946ffbb1b314e03a19af0f9cc2aa97469a148cb7
parent679fa905dff614d39e9950e606d9d582fb454494
Use gimple_call for callgraph edges

This corresponds to:
  [PATCH 55/89] Use gimple_call for callgraph edges
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01221.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> OK once prereqs go in.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00867.html

gcc/
* cgraph.h (cgraph_edge::call_stmt): Strengthen field from plain
gimple to a gimple_call.
(cgraph_node::set_call_stmt_including_clones): Likewise for param
"new_stmt".
(cgraph_node::create_edge): Likewise for param "call_stmt".
(cgraph_node::create_indirect_edge): Likewise.
(cgraph_node::create_edge_including_clones): Likewise for param
"stmt".
(cgraph_edge::set_call_stmt): Likewise for param "new_stmt".
(cgraph_edge::clone): Likewise for param "call_stmt".
(symbol_table::create_edge): Likewise.

* cgraph.c (cgraph_edge::set_call_stmt): Require a gimple_call
rather than a plain gimple.
(symbol_table::create_edge): Likewise.
(cgraph_node::create_edge): Likewise.
(cgraph_node::create_indirect_edge): Likewise.
(cgraph_edge::redirect_call_stmt_to_callee): Strengthen local
"new_stmt" from gimple to gimple_call.
(cgraph_update_edges_for_call_stmt_node): Add checked casts to
gimple_call.

* cgraphbuild.c (pass_build_cgraph_edges::execute): Replace
is_gimple_call with dyn_cast<gimple_call> and new local
"call_stmt".
(cgraph_edge::rebuild_edges): Likewise.

* cgraphclones.c (cgraph_edge::clone): Require a gimple_call
rather than a plain gimple.
(cgraph_node::set_call_stmt_including_clones): Likewise.
(cgraph_node::create_edge_including_clones): Likewise.

* lto-streamer-in.c (fixup_call_stmt_edges_1): Add checked casts
to gimple_call.

* omp-low.c (simd_clone_adjust): Strengthen local "call" from
gimple to gimple_call.

* trans-mem.c (ipa_tm_insert_irr_call): Likewise for "g".
(ipa_tm_insert_gettmclone_call): Likewise; also strengthen "g2"
to gimple_assign.

* tree-emutls.c (gen_emutls_addr): Strengthen local "x" from
gimple to gimple_call.

* tree-inline.c (copy_bb): Replace is_gimple_call with
dyn_cast<gimple_call> and new local "call_stmt".

* value-prof.c (gimple_ic): Require and return a gimple_call,
rather than a plain gimple.
* value-prof.h (gimple_ic): Likewise.
12 files changed:
gcc/ChangeLog.gimple-classes
gcc/cgraph.c
gcc/cgraph.h
gcc/cgraphbuild.c
gcc/cgraphclones.c
gcc/lto-streamer-in.c
gcc/omp-low.c
gcc/trans-mem.c
gcc/tree-emutls.c
gcc/tree-inline.c
gcc/value-prof.c
gcc/value-prof.h