On 04/21/14 10:56, David Malcolm wrote:
gcc/ * coretypes.h (gimple_call): New typedef. (const_gimple_call): New typedef.* gimple.h (gimple_statement_base::as_a_gimple_call): New. (gimple_statement_base::dyn_cast_gimple_call): New. (gimple_call_reset_alias_info): Require a gimple_call rather than a plain gimple. (gimple_call_set_internal_fn): Likewise. (gimple_call_set_chain): Likewise. (gimple_call_set_return_slot_opt): Likewise; remove redundant GIMPLE_CHECK. (gimple_call_set_from_thunk): Likewise. (gimple_call_from_thunk_p): Likewise. (gimple_call_set_va_arg_pack): Likewise. (gimple_call_va_arg_pack_p): Likewise. (gimple_call_set_alloca_for_var): Likewise. (gimple_call_alloca_for_var_p): Likewise. (gimple_build_call_vec): Return a gimple_call rather than a gimple. (gimple_build_call): Likewise. (gimple_build_call_valist): Likewise. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_build_call_from_tree): Likewise. (gimple_call_copy_skip_args): Likewise. (gimple_call_return_flags): Require a const_gimple_call rather than a plain const_gimple. (gimple_call_chain_ptr): Likewise. (gimple_expr_type): Introduce local "call_stmt", once we know we have a GIMPLE_CALL. * asan.c (get_mem_refs_of_builtin_call): Require a const_gimple_call rather than a plain const_gimple. (has_stmt_been_instrumented_p): Add checked cast to gimple_call in region where stmt is known to be a GIMPLE_CALL (owing to it being a builtin call). (instrument_strlen_call): Add checked cast to gimple_call. (instrument_builtin_call): Likewise. * builtins.c (validate_gimple_arglist): Require a const_gimple_call rather than a plain const_gimple. (gimple_fold_builtin_sprintf_chk): Require a gimple_call rather than a plain gimple. (gimple_fold_builtin_snprintf_chk): Likewise. (gimple_fold_builtin_varargs): Likewise. (fold_call_stmt): Likewise. * builtins.h (validate_gimple_arglist): Require a const_gimple_call rather than a plain const_gimple. * cfgexpand.c (expand_call_stmt): Require a gimple_call rather than a plain gimple. (expand_gimple_stmt_1): Add a checked cast to gimple_call within GIMPLE_CALL case of switch statement. * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Strengthen "new_stmt" from gimple to gimple_call; add checked cast. * cgraphunit.c (expand_thunk): Strengthen local "call" from gimple to a gimple_call. * gimple-fold.c (gimple_fold_builtin): Require a gimple_call rather than a plain gimple. (gimple_fold_call): Strengthen local "call" from gimple to a gimple_call. (gimple_fold_stmt_to_constant_1): Add a checked cast to gimple_call within GIMPLE_CALL case of switch statement. * gimple-fold.h (gimple_fold_builtin): Require a gimple_call rather than a plain gimple. * gimple-pretty-print.c (dump_gimple_call_args): Likewise. (dump_gimple_call): Likewise. (pp_gimple_stmt_1): Add a checked cast to gimple_call within GIMPLE_CALL case of switch statement. * gimple-streamer-in.c (input_gimple_stmt): Replace is_gimple_call within dyn_cast_gimple_call and a new local. Add a checked cast to gimple_call when resetting alias information. * gimple-walk.c (walk_gimple_op): Add a checked cast to gimple_call within GIMPLE_CALL case of switch statement. * gimple.c (gimple_call_reset_alias_info): Require a gimple_call rather than a plain gimple. (gimple_build_call_1): Return a gimple_call rather than a gimple. (gimple_build_call_vec): Likewise. (gimple_build_call): Likewise. (gimple_build_call_valist): Likewise. (gimple_build_call_internal_1): Likewise. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_build_call_from_tree): Likewise. (gimple_call_copy_skip_args): Likewise. (gimple_call_return_flags): Require a const_gimple_call rather than a plain const_gimple. * gimplify.c (gimplify_call_expr): Convert local from gimple to gimple_call. (gimplify_modify_expr_to_memcpy): Likewise. (gimplify_modify_expr_to_memset): Likewise. (gimplify_expr): Likewise. (gimplify_function_tree): Likewise. (gimplify_modify_expr): Add checked cast to gimple_call. * internal-fn.def: Update comment to indicate that each expand_NAME now takes a gimple_call, rather than just a gimple. * internal-fn.c (expand_LOAD_LANES): Require a gimple_call rather than a plain gimple. (expand_STORE_LANES): Likewise. (expand_ANNOTATE): Likewise. (expand_GOMP_SIMD_LANE): Likewise. (expand_GOMP_SIMD_VF): Likewise. (expand_GOMP_SIMD_LAST_LANE): Likewise. (expand_UBSAN_NULL): Likewise. (ubsan_expand_si_overflow_addsub_check): Likewise. (ubsan_expand_si_overflow_neg_check): Likewise. (ubsan_expand_si_overflow_mul_check): Likewise. (expand_UBSAN_CHECK_ADD): Likewise. (expand_UBSAN_CHECK_SUB): Likewise. (expand_UBSAN_CHECK_MUL): Likewise. (expand_LOOP_VECTORIZED): Likewise. (expand_MASK_LOAD): Likewise. (expand_MASK_STORE): Likewise. (expand_ABNORMAL_DISPATCHER): Likewise. (expand_BUILTIN_EXPECT): Likewise. (internal_fn_expanders): Likewise. (expand_internal_call): Likewise. * internal-fn.h (expand_internal_call): Likewise. * ipa-prop.c (ipa_modify_call_arguments): Convert local from gimple to gimple_call. * ipa-pure-const.c (check_call): Require a gimple_call rather than just a gimple. (check_stmt): Add checked cast to gimple_call within GIMPLE_CALL case of switch statement. * ipa-split.c (split_function): Convert local from gimple to gimple_call. * omp-low.c (build_omp_barrier): Likewise. (lower_rec_input_clauses): Likewise. * trans-mem.c (build_tm_load): Return a gimple_call rather than a plain gimple. (build_tm_store): Likewise. (expand_transaction): Convert local from gimple to gimple_call. * tree-call-cdce.c (check_pow): Require a gimple_call rather than just a gimple. (check_builtin_call): Likewise. (is_call_dce_candidate): Likewise. (gen_conditions_for_pow): Likewise. (gen_shrink_wrap_conditions): Likewise. (shrink_wrap_one_built_in_call): Likewise. (shrink_wrap_conditional_dead_built_in_calls): Require a vec<gimple_call> rather than a vec<gimple>. (tree_call_cdce): Convert local "cond_dead_built_in_calls" from an auto_vec<gimple> to an auto_vec<gimple_call>; convert invocation of is_gimple_call to dyn_cast_gimple_call and new local. * tree-cfg.c (notice_special_calls): Require a gimple_call rather than just a gimple. * tree-cfg.h (notice_special_calls): Require a gimple_call rather than just a gimple. * tree-complex.c (expand_complex_libcall): Convert local from gimple to gimple_call. * tree-inline.c (remap_gimple_stmt): Add checked cast to gimple_call. (copy_bb): Likewise; convert local from gimple to gimple_call. (inline_forbidden_p_stmt): Add checked cast to gimple_call. * tree-nested.c (init_tmp_var_with_call): Require a gimple_call rather than a gimple. (convert_nl_goto_reference): Convert local from gimple to gimple_call. (convert_tramp_reference_op): Likewise. (convert_gimple_call): Add checked cast to gimple_call. * tree-nrv.c (dest_safe_for_nrv_p): Require a gimple_call rather than a gimple. (execute_return_slot_opt): Convert local from gimple to gimple_call. Convert is_gimple_call to dyn_cast_gimple_call and new local. * tree-object-size.c (alloc_object_size): Require a const_gimple_call rather than a plain const_gimple. (pass_through_call): Likewise. (call_object_size): Require a gimple_call rather than a plain gimple. (collect_object_sizes_for): Add checked cast to gimple_call within GIMPLE_CALL case of switch statement. (check_for_plus_in_loops_1): Likewise. (compute_object_sizes): Add checked cast to gimple_call. * tree-profile.c (gimple_gen_interval_profiler): Convert local from gimple_call to gimple. (gimple_gen_pow2_profiler): Likewise. (gimple_gen_one_value_profiler): Likewise. (gimple_gen_time_profiler): Likewise. (gimple_gen_average_profiler): Likewise. (gimple_gen_ior_profiler): Likewise. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Require a gimple_call rather than a plain gimple. (ref_maybe_used_by_call_p): Likewise. (ref_maybe_used_by_stmt_p): Add checked cast to gimple_call. (call_may_clobber_ref_p_1): Require a gimple_call rather than a plain gimple. (call_may_clobber_ref_p): Likewise. (stmt_may_clobber_ref_p_1): Add checked cast to gimple_call. * tree-ssa-alias.h (call_may_clobber_ref_p): Require a gimple_call rather than a plain gimple. * tree-ssa-ccp.c (execute_fold_all_builtins): Add checked cast to gimple_call. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise. * tree-ssa-loop-prefetch.c (emit_mfence_after_loop): Convert local from gimple to gimple_call. * tree-ssa-math-opts.c (build_and_insert_call): Likewise. (execute_optimize_bswap): Likewise. * tree-ssa-operands.c (maybe_add_call_vops): Require a gimple_call rather than a plain gimple. (parse_ssa_operands): Add checked cast to gimple_call within GIMPLE_CALL case of switch statement. * tree-ssa-pre.c (compute_avail): Add checked cast to gimple_call. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Require a gimple_call rather than a plain gimple. (create_reference_ops_from_call): Likewise. (valueize_shared_reference_ops_from_call): Likewise. (visit_reference_op_call): Likewise. (visit_use): Replace is_gimple_call with dyn_cast_gimple_call and a new local. * tree-ssa-sccvn.h (copy_reference_ops_from_call): Require a gimple_call rather than a plain gimple. * tree-ssa-structalias.c (get_call_vi): Likewise. (lookup_call_use_vi): Likewise. (lookup_call_clobber_vi): Likewise. (get_call_use_vi): Likewise. (get_call_clobber_vi): Likewise. (handle_rhs_call): Likewise. (handle_lhs_call): Likewise. (handle_const_call): Likewise. (handle_pure_call): Likewise. (get_fi_for_callee): Likewise. (find_func_aliases_for_builtin_call): Likewise. (find_func_aliases_for_call): Likewise. (find_func_aliases): Add checked cast to gimple_call. (find_func_clobbers): Replace is_gimple_call with dyn_cast_gimple_call and a new local. (compute_points_to_sets): Likewise. (ipa_pta_execute): Likewise. * tree-ssa-threadedge.c (record_temporary_equivalences_from_stmts_at_dest): Add checked cast to gimple_call. * tree-tailcall.c (find_tail_calls): Convert local from gimple to gimple_call. Add checked cast to gimple_call. * tree-vect-data-refs.c (vect_setup_realignment): Split local new_stmt into two with more tight scopes, one as a gimple_assign, the other as a gimple_call. * tree-vect-patterns.c (vect_recog_pow_pattern): Convert local to a gimple_bind. * tree-vect-stmts.c (vectorizable_function): Require a gimple_call rather than a plain gimple. (vectorizable_call): Convert "stmt" to a gimple_call, by renaming parameter, and making stmt be the result of a dyn_cast. * tree-vectorizer.h (vectorizable_function): Require a gimple_call rather than a plain gimple. * tree.h (fold_call_stmt): Likewise. (gimple_fold_builtin_snprintf_chk): Likewise. * value-prof.c (check_ic_target): Likewise. (gimple_ic_transform): Replace check for GIMPLE_CALL with dyn_cast_gimple_call. (interesting_stringop_to_profile_p): Require a gimple_call rather than a plain gimple. (gimple_stringop_fixed_value): Likewise. (gimple_stringops_transform): Replace check for GIMPLE_CALL with dyn_cast_gimple_call. (gimple_stringops_values_to_profile): Likewise. * vtable-verify.c (verify_bb_vtables): Convert local from a gimple to a gimple_call.
OK once the const/renaming changes are done. jeff
