Concretize three gimple_return_ accessors
commit74bb6f309e731887aa273603453a025b888f94cd
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 19 Dec 2013 20:58:15 +0000 (19 15:58 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:25:12 +0000 (24 17:25 -0400)
tree3b55eddec840a67221a0d961ba4c29a0f57e26d3
parent5527040642bcc719feff949571e3faacce26a410
Concretize three gimple_return_ accessors

This corresponds to:
  [PATCH 68/89] Concretize three gimple_return_ accessors
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01233.html
from the original 89-patch kit

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

gcc/
* gimple.h (gimple_return_retval_ptr): Require a const_gimple_return
rather than a const_gimple.
(gimple_return_retval): Likewise.
(gimple_return_set_retval): Require a gimple_return.

* cfgexpand.c (expand_gimple_stmt_1): Add a checked cast to
gimple_return.
(expand_gimple_basic_block): Likewise.
* tree-complex.c (expand_complex_move): Likewise.
(expand_complex_comparison): Likewise.
* tree-inline.c (remap_gimple_stmt): Likewise.
* tree-sra.c (scan_function): Likewise.
(sra_modify_function_body): Likewise.
(ipa_sra_modify_function_body): Likewise.
* tree-ssa-structalias.c (find_func_aliases): Likewise.

* gimple-ssa-isolate-paths.c (isolate_path): Strengthen local
"ret" from gimple to gimple_return.
(find_implicit_erroneous_behaviour): Replace a check for code
GIMPLE_RETURN with a dyn_cast and a new local.
(find_explicit_erroneous_behaviour): Likewise.
* gimple-walk.c (walk_stmt_load_store_addr_ops): Likewise.
* gimple.c (infer_nonnull_range): Likewise.
* ipa-split.c (find_return_bb): Likewise.
(find_retval): Likewise.
(split_function): Likewise.
* omp-low.c (ipa_simd_modify_function_body): Likewise.
* tree-cfg.c (pass_warn_function_return::execute): Likewise.
* tree-nrv.c (tree_nrv): Likewise.
* tree-ssa-alias.c (ref_maybe_used_by_stmt_p): Likewise.
* tree-ssa-dce.c (propagate_necessity): Likewise.
* tree-ssa-structalias.c (find_func_clobbers): Likewise.
* tree-tailcall.c (find_tail_calls): Likewise.

* predict.c (apply_return_prediction): Rework the search for
return_stmt so that the latter can have type gimple_return.
19 files changed:
gcc/ChangeLog.gimple-classes
gcc/cfgexpand.c
gcc/gimple-ssa-isolate-paths.c
gcc/gimple-walk.c
gcc/gimple.c
gcc/gimple.h
gcc/ipa-split.c
gcc/omp-low.c
gcc/predict.c
gcc/tree-cfg.c
gcc/tree-complex.c
gcc/tree-inline.c
gcc/tree-nrv.c
gcc/tree-sra.c
gcc/tree-ssa-alias.c
gcc/tree-ssa-dce.c
gcc/tree-ssa-structalias.c
gcc/tree-tailcall.c
gcc/ubsan.c