tree-vrp.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-vrp.c (stmt_overflow_infinity): Replace is_gimple_assign
	with a dyn_cast, introducing local "assign_stmt" and using it in
	place of "stmt" for typesafety.
	(gimple_assign_nonnegative_warnv_p): Strengthen param "stmt" from
	gimple to gassign *.
	(gimple_stmt_nonnegative_warnv_p): Add a checked cast within
	case GIMPLE_ASSIGN.
	(gimple_assign_nonzero_warnv_p): Strengthen param "stmt" from
	gimple to gassign *.
	(gimple_stmt_nonzero_warnv_p): Add a checked cast within
	case GIMPLE_ASSIGN.
	(vrp_stmt_computes_nonzero): Replace is_gimple_assign with a
	dyn_cast, introducing local "assign_stmt" and using it in place of
	"stmt" for typesafety.
	(register_edge_assert_for_2): Likewise five times, three times
	using new locals gassign * "def_assign" in place of gimple
	"def_stmt", once using new local gassign * "use_assign" in
	place of gimple "use_stmt", and once using new local
	gassign * "def_assign2" in place of gimple "def_stmt2".  Add a
	checked cast in region guarded by is_gimple_assign.
	(register_edge_assert_for_1): Strengthen local "op_def" from
	gimple to gassign * by replacing a check against GIMPLE_ASSIGN with
	a dyn_cast.
	(register_edge_assert_for): Strengthen locals "def_stmt" from
	gimple to gassign * by replacing is_gimple_assign calls with
	dyn_casts.
	(find_assert_locations_1): Likewise.
	(search_for_addr_array): Strengthen local "g" from gimple to
	gassign * by replacing a check against GIMPLE_ASSIGN with a
	dyn_cast.
	(all_imm_uses_in_stmt_or_feed_cond): Replace an is_gimple_assign
	with a dyn_cast, introducing a local gassign * "use_assign", using
	it in place of "use_stmt" for typesafety.  Putting the decl within
	the while conditional requires converting the && clauses into
	if/break statements within the while body, thus inverting their
	conditions.
	(maybe_set_nonzero_bits): Replace an is_gimple_assign with a
	dyn_cast, introducing a local gassign * "assign_stmt", using it in
	place of "stmt" for typesafety.  Similarly, after the call to
	gimple_assign_cast_p (stmt2), introduce a local gassign *
	"assign_stmt2" and use it in place of "stmt2" for typesafety.
	(remove_range_assertions): Strengthen local "stmt" from gimple to
	gassign * by replacing is_gimple_assign with a dyn_cast.
	(simplify_truth_ops_using_ranges): Strengthen param "stmt" from
	gimple to gassign *.
	(simplify_div_or_mod_using_ranges): Likewise.
	(simplify_abs_using_ranges): Likewise.
	(simplify_bit_ops_using_ranges): Likewise.
	(simplify_cond_using_ranges): Strengthen local "def_stmt" from
	gimple to gassign * by replacing an is_gimple_assign with a
	dyn_cast.
	(simplify_conversion_using_ranges): Strengthen param "stmt" from
	gimple to gassign *.  Likewise for local "def_stmt", by replacing
	an is_gimple_assign with a dyn_cast.
	(simplify_float_conversion_using_ranges): Strengthen param "stmt" from
	gimple to gassign *.
	(simplify_stmt_using_ranges): Replace is_gimple_assign with a
	dyn_cast, introducing local gassign * "assign_stmt", using it in
	place of "stmt" for typesafety.
	(fold_predicate_in): Likewise.
tree-complex.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-complex.c (init_dont_simulate_again): Within case
	GIMPLE_ASSIGN, introduce local gassign *"assign_stmt" and use it
	in place of "stmt".
	(complex_visit_stmt): Add checked casts to gassign *.
	(expand_complex_move): Replace is_gimple_assign with a dyn_cast,
	introducing local gassign * "assign_stmt", using it in place of
	"stmt" for typesafety.  Within the non-call branch, introduce
	local gassign * "assign_stmt", using it in place of "stmt" for
	typesafety.  Add checked casts.
	(expand_complex_libcall): Strengthen local "old_stmt" from gimple
	to gassign *.
	(expand_complex_div_wide): Split local "stmt" into local gassign *
	"stmt1" and gcond * "stmt2".
	(expand_complex_comparison): Within case GIMPLE_ASSIGN, add a
	checked cast.
	(expand_complex_operations_1): In two places, replace an
	is_gimple_assign with a dyn_cast, introducing locals named
	"assign_stmt" and using them in place of "stmt" for typesafety.
	The first of these requires breaking an if into two if statements
	and reindenting.
tree-inline.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-inline.c (remap_gimple_stmt): Introduce local "assign_stmt"
	in region guarded by gimple_clobber_p (stmt) and use it in place
	of "stmt" for typesafety.
	(copy_bb): Replace is_gimple_assign with a dyn_cast, introducing
	local "assign_stmt", using it in place of "stmt" for typesafety.
	(insert_init_stmt): Add local gassign * "init_assign" via a
	checked cast and use it in place of "init_stmt" for typesafety.
	Add checked cast.
	(estimate_num_insns): Within case GIMPLE_ASSIGN, add local
	"assign_stmt", using it in place of "stmt" for typesafety.
	(expand_call_inline): Replace is_gimple_assign with a dyn_cast,
	introducing local "assign_stmt", using it in place of "stmt" for
	typesafety.
tree-into-ssa.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-into-ssa.c (create_new_def_for): Add a checked cast.
tree-loop-distribution.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-loop-distribution.c (generate_memset_builtin): Strengthen
	locals "stmt" and "fn_call" from gimple to gassign * and gcall *
	respectively.
	(classify_partition): Strengthen locals "stmt", "store", "load"
	from gimple to gassign *.
tree-predcom.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-predcom.c (name_for_ref): Replace is_gimple_assign with a
	dyn_cast, introducing local gassign * "ref_assign", using it place
	of ref->stmt for typesafety.
	(find_looparound_phi): Likewise.  Strengthen local "init_stmt"
	from gimple to gassign *, replacing a check against GIMPLE_ASSIGN
	with a dyn_cast.
	(replace_ref_with): Introduce local "assign_stmt" via a checked
	cast in the region, where we know "stmt" is a GIMPLE_ASSIGN,
	replacing the latter with the former for typesafety.
	(initialize_root_vars): Add a checked cast.
	(remove_stmt): Add checked casts.
	(find_use_stmt): Strengthen return type from gimple to gassign *.
	Replace check for GIMPLE_ASSIGN with a dyn_cast, introducing
	local "assign_stmt" and using it in place of "stmt" for
	typesafety.
	(find_associative_operation_root): Strengthen return type, param
	"stmt" and local "next" from gimple to gassign *.
	(find_common_use_stmt): Likewise for return type and locals
	"stmt1" and "stmt2".
	(combinable_refs_p): Likewise for local "stmt".
	(remove_name_from_operation): Likewise for param "stmt".
	(reassociate_to_the_same_stmt): Likewise for locals "stmt1",
	"stmt2", "root1", "root2", "s1", "s2".  Introduce local gimple
	"stmt" and use in place of "s1" when updating gsi_stmt (bsi).
tree-scalar-evolution.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Strengthen
	param "stmt" from gimple to gassign *.
	(follow_ssa_edge): Add checked cast within case GIMPLE_ASSIGN.
	(interpret_rhs_expr): Replace is_gimple_assign with a dyn_cast,
	strengthening local "def" from gimple to gassign *.
	(interpret_gimple_assign): Strengthen param "stmt" from gimple to
	gassign *.
	(analyze_scalar_evolution_1): Add checked cast within case
	GIMPLE_ASSIGN.
tree-sra.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-sra.c (build_accesses_from_assign): Strengthen param "stmt"
	from gimple to gassign *.
	(scan_function): Add checked cast within case GIMPLE_ASSIGN.
	(sra_modify_constructor_assign): Strengthen param "stmt" from
	gimple to gassign *.
	(sra_modify_assign): Likewise.
	(sra_modify_function_body): Add checked cast within case
	GIMPLE_ASSIGN.
	(ptr_parm_has_direct_uses): Introduce local "assign_stmt" from
	result of gimple_assign_single_p, using it in place of "stmt" for
	typesafety.
	(replace_removed_params_ssa_names): Add checked casts.
	(sra_ipa_modify_assign): Strengthen param "stmt" from gimple to
	gassign *.
	(ipa_sra_modify_function_body): Add checked cast within case
	GIMPLE_ASSIGN.
tree-switch-conversion.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-switch-conversion.c (struct switch_conv_info): Strengthen
	fields "arr_ref_first" and "arr_ref_last" from gimple to
	gassign *.
tree-ssa-ifcombine.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-ifcombine.c (get_name_for_bit_test): Replace
	is_gimple_assign with a dyn_cast, strengthening local "def_stmt"
	from gimple to gassign *.
	(recognize_single_bit_test): Replace various is_gimple_assign with
	dyn_cast, introducing local gassign * "assign_stmt", using in
	place of "stmt" for typesafety.  Likewise, strengthen local "tmp"
	from gimple to gassign *.
	(recognize_bits_test): Likewise, strengthening local "stmt" from
	gimple to gassign *.
tree-ssa-live.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-live.c (remove_unused_locals): Add a checked cast in
	region guarded by gimple_clobber_p.
tree-ssa-math-opts.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-math-opts.c (is_division_by): Replace is_gimple_assign
	with dyn_cast, introducing local gassign * "use_assign", using it
	in place of "use_stmt" for typesafety.
	(replace_reciprocal): Add a checked cast.
	(pass_cse_reciprocals::execute): Replace is_gimple_assign
	with dyn_cast, introducing local gassign * "assign_stmt", using it
	to eliminate "stmt" for typesafety.  Likewise replace local gimple
	"stmt2" with new local gassign * "assign_stmt2". Reintroduce local
	gimple "stmt" near the end for the FOR_EACH_IMM_USE_STMT loop,
	adding a checked cast.
	(find_bswap_or_nop_1): Strengthen return type and locals
	"source_stmt1" and "source_stmt2" from gimple to gassign *.
	Replace is_gimple_assign with a dyn_cast, introducing local
	gassign * "assign_stmt", using it in place of "stmt for
	typesafety.
	(find_bswap_or_nop): Strengthen return type and local
	"source_stmt" from gimple to gassign *.
	(bswap_replace): Likewise for params "cur_stmt" and "src_stmt".
	(pass_optimize_bswap::execute): Likewise for locals "src_stmt" and
	"cur_stmt", replacing an is_gimple_assign with a dyn_cast.
	(widening_mult_conversion_strippable_p): Likewise for param
	"stmt".
	(is_widening_mult_rhs_p): Replace is_gimple_assign with a
	dyn_cast, introducing local gassign * "assign_stmt" and using it
	in place of "stmt" for typesafety.
	(is_widening_mult_p): Strengthen param "stmt" from gimple to
	gassign *.
	(convert_mult_to_widen): Likewise.
	(convert_plusminus_to_widen): Likewise, also for locals
	"conv1_stmt", "conv2_stmt", "conv_stmt".  Replace is_gimple_assign
	calls with dyn_casts, using them to introduce local gassign *
	"rhs1_assign" and "rhs2_assign", using them in place of
	"rhs1_stmt" and "rhs2_stmt" in the regions where we know we have
	a GIMPLE_ASSIGN, adding gcc_assert to ensure that the gassign *
	is equal to their plain gimple counterparts where we assume this.
	(convert_mult_to_fma): Replace is_gimple_assigns with dyn_casts,
	introducing locals gassign * "use_assign" and using them in place
	of "use_stmt" for typesafety.  Similarly for the region where
	"use_stmt" is known to be a GIMPLE_ASSIGN, via a checked cast.
	(pass_optimize_widening_mul::execute): Replace is_gimple_assign
	with dyn_cast, introducing local gassign * "assign_stmt", using it
	to eliminate "stmt" for typesafety.
tree-ssa-loop-*: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-loop-ch.c (pass_ch::execute): Add checked cast.
	* tree-ssa-loop-im.c (movement_possibility): Add checked casts.
	(stmt_cost): Likewise.
	(simple_mem_ref_in_stmt): Capture result of
	gimple_assign_single_p as a new local gassign * "assign_stmt",
	using it in place of "stmt" for typesafety.
	(rewrite_reciprocal): Strengthen return type from gimple to
	gassign *.
	(rewrite_bittest): Likewise.  Replace check against GIMPLE_ASSIGN
	with a dyn_cast, introducing local gassign * "assign_stmt1", using
	it in place of "stmt1" for typesafety.  More tightly-scope "stmt2".
	(invariantness_dom_walker::before_dom_children):  Replace an
	is_gimple_assign with a dyn_cast, introducing local gassign *
	 "assign_stmt" and using it in place of "stmt" for typesafety.
	(sm_set_flag_if_changed::operator): Add a checked cast.
	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Introduce
	local gassign * "assign_stmt" via a dyn_cast, using it to replace
	a pair of checks against GIMPLE_ASSIGN, and in place of "stmt" for
	typesafety.
	(propagate_into_all_uses): Replace an is_gimple_assign with a
	dyn_cast, introducing local gassign * "use_assign", using it in
	place of "use_stmt" for typesafety.
	(propagate_constants_for_unrolling): Strengthen local "stmt" from
	gimple to gassign * by replacing an is_gimple_assign with a
	dyn_cast.
	* tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Replace a check
	against GIMPLE_ASSIGN with a dyn_cast, introducing local gassign *
	"assign_stmt", using it in place of "stmt" for typesafety.
	(extract_cond_operands): Add a checked cast.
	(find_interesting_uses_stmt): Replace an is_gimple_assign with a
	dyn_cast, introducing local "assign_stmt" and using it in place of
	"stmt" for typesafety.
	(difference_cannot_overflow_p): Strengthen local "stmt" from
	gimple to gassign * by replacing a check against GIMPLE_ASSIGN
	with a dyn_cast.
	(rewrite_use_nonlinear_expr): Introduce local gassign *
	"use_assign" via an as_a, and use in place of use->stmt for
	typesafety.  Add an as_a within case GIMPLE_ASSIGN.
	(adjust_iv_update_pos): Add an as_a.
	* tree-ssa-loop-niter.c (expand_simple_operations): Replace a
	check against GIMPLE_ASSIGN with a dyn_cast, introducing local
	"assign_stmt", using it in place of "stmt" for typesafety.
	(chain_of_csts_start): Likewise.
	(get_val_for): Introduce local gassign * "assign_stmt" via an
	as_a, using it in place of "stmt" for typesafety.
	(derive_constant_upper_bound_assign): Strengthen param "stmt" from
	gimple to gassign *.
	(derive_constant_upper_bound_ops): Add an as_a.
	(infer_loop_bounds_from_array): Replace is_gimple_assign with a
	dyn_cast, introducing a local "assign_stmt", using it in place of
	"stmt" for typesafety.
	(infer_loop_bounds_from_pointer_arith): Likewise.
	(infer_loop_bounds_from_signedness): Likewise, replacing a check
	against GIMPLE_ASSIGN.
	* tree-ssa-loop-prefetch.c (gather_memory_references): Introduce
	local gassign * "assign_stmt" via an as_a, using it in place of
	"stmt" for typesafety.
	(mark_nontemporal_store): Add an as_a.
tree-ssa-phiopt.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-phiopt.c (jump_function_from_stmt): Strengthen param
	"stmt" from gimple to gassign *.
	(rhs_is_fed_for_value_replacement): Replace is_gimple_assign with
	a dyn_cast, strengthening local "def1" from gimple to gassign *.
	(operand_equal_for_value_replacement):  Likewise for local "def".
	(value_replacement): Likewise for local "stmt".  Rename local
	"assign" to "last", reintroducing "assign" as a gassign * via a
	dyn_cast.
	(minmax_replacement): Likewise.
	(abs_replacement): Likewise.
	(neg_replacement): Likewise.
	(nontrapping_dom_walker::before_dom_children): Add checked casts.
	(cond_store_replacement): Rename local "assign" to "last",
	reintroducing "assign" as a gassign * via a
	gimple_assign_single_p.
	(cond_if_else_store_replacement_1): Rename params "then_assign"
	and "else_assign" to "then_stmt" and "else_stmt", reintroducing
	them as gassign * via the results of gimple_assign_single_p.
	(hoist_adjacent_loads): Add checked casts.
tree-ssa-phiprop.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-phiprop.c (phiprop_insert_phi): Strengthen param
	"use_stmt" from gimple to gassign *.  Add checked cast.
	(propagate_with_phi): Add checked casts.  Replace is_gimple_assign
	with a dyn_cast, introducing local "use_assign" and using it in
	place of "use_stmt" for typesafety.
tree-ssa-pre.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-pre.c (compute_avail): Within case GIMPLE_ASSIGN,
	introduce local "assign_stmt" via an as_a and use it in place of
	"stmt" for typesafety.
	(eliminate_dom_walker::before_dom_children): Introduce local
	gassign * "assign_stmt", using it to capture the result of
	gimple_assign_single_p, using it in place of "stmt" for
	typesafety.  Add a checked cast.
tree-ssa-propagate.c: Use gassign

gcc/ChangeLog.gimple-classes:
	* tree-ssa-propagate.c
	(substitute_and_fold_dom_walker::before_dom_children): Add checked
	cast.  Replace is_gimple_assign with a dyn_cast, introducing local
	"assign_stmt" and using it in place of "stmt" for typesafety.
	(may_propagate_copy_into_stmt): Add checked casts.
	(propagate_tree_value_into_stmt): Add checked cast.