Concretize gimple_switch_index and gimple_switch_index_ptr
commit3bdef1388370db0770b62e1cfbb0fc612034fe08
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 20 Dec 2013 17:53:13 +0000 (20 12:53 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:25:18 +0000 (24 17:25 -0400)
tree97c14cde4a8c71655610fba9a37f9718e54a0956
parentea8bd2eaa829c9969aa56b117221803ff4d28a5b
Concretize gimple_switch_index and gimple_switch_index_ptr

This corresponds to:
  [PATCH 72/89] Concretize gimple_switch_index and gimple_switch_index_ptr
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01185.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> OK once prereqs go in and will obviously need updating for const
> changes as well.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00860.html

gcc/
* gimple.h (gimple_switch_index): Require a const_gimple_switch rather
than a plain const_gimple.
(gimple_switch_index_ptr): Likewise.

* gimplify-me.c (gimple_regimplify_operands): Add checked cast to
gimple_switch within "case GIMPLE_SWITCH".
* tree-cfgcleanup.c (cleanup_control_expr_graph): Likewise.
* tree-ssa-ccp.c (ccp_fold): Likewise.
* tree-ssa-dom.c (optimize_stmt): Likewise.

* tree-ssa-ccp.c (evaluate_stmt): Add checked cast to
gimple_switch within region guarded by check for GIMPLE_SWITCH.
* tree-ssa-dom.c (record_edge_info): Likewise.
(eliminate_redundant_computations): Likewise.
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
* tree-ssa-threadedge.c (simplify_control_stmt_condition): Likewise.

* tree-ssa-dom.c (initialize_hash_element): Replace check for
code GIMPLE_SWITCH with a dyn_cast<gimple_switch>.
(propagate_rhs_into_lhs): Likewise.
* tree-ssa-propagate.c (may_propagate_copy_into_stmt): Likewise.
(propagate_tree_value_into_stmt): Likewise.
gcc/ChangeLog.gimple-classes
gcc/gimple.h
gcc/gimplify-me.c
gcc/tree-cfgcleanup.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa-dom.c
gcc/tree-ssa-loop-ivcanon.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-propagate.c
gcc/tree-ssa-sccvn.c
gcc/tree-ssa-threadedge.c