From 1a91d9148a5896f3a849909cc7648284c7f6fa4c Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Wed, 19 Nov 2014 17:00:54 +0000 Subject: Merger of git branch "gimple-classes-v2-option-3" gcc/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * coretypes.h (struct gcond): Add forward decl. (struct gdebug): Likewise. (struct ggoto): Likewise. (struct glabel): Likewise. (struct gswitch): Likewise. (struct gassign): Likewise. (struct gasm): Likewise. (struct gcall): Likewise. (struct gtransaction): Likewise. (struct greturn): Likewise. (struct gbind): Likewise. (struct gcatch): Likewise. (struct geh_filter): Likewise. (struct geh_mnt): Likewise. (struct geh_else): Likewise. (struct gresx): Likewise. (struct geh_dispatch): Likewise. (struct gphi): Likewise. (struct gtry): Likewise. (struct gomp_atomic_load): Likewise. (struct gomp_atomic_store): Likewise. (struct gomp_continue): Likewise. (struct gomp_critical): Likewise. (struct gomp_for): Likewise. (struct gomp_parallel): Likewise. (struct gomp_task): Likewise. (struct gomp_sections): Likewise. (struct gomp_single): Likewise. (struct gomp_target): Likewise. (struct gomp_teams): Likewise. * doc/gimple.texi (Class hierarchy of GIMPLE statements): Update for renaming of gimple subclasses. * gdbhooks.py: Update. * gimple-iterator.c (gsi_for_phi): New. (gsi_start_phis): Strengthen return type from gimple_stmt_iterator to gphi_iterator. * gimple-iterator.h (struct gphi_iterator): New subclass of gimple_stmt_iterator. (gsi_for_phi): New prototype. (gsi_start_phis): Strengthen return type from gimple_stmt_iterator to gphi_iterator. (gsi_next_nonvirtual_phi): Strengthen param from gimple_stmt_iterator * to gphi_iterator *, and local "phi" from gimple to gphi *. * gsstruct.def: Update for renamings of classes. * gimple.c (gimple_build_return): Strengthen return type from gimple to greturn *. (gimple_call_reset_alias_info): Strengthen param to gcall *. (gimple_build_call_1): Strengthen return type from gimple to gcall *. (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_build_assign_stat): Strengthen return type from gimple to gassign *. (gimple_build_assign_with_ops): Likewise. (gimple_build_assign_with_ops): Likewise. (gimple_build_cond): Strengthen return type from gimple to gcond *. (gimple_build_cond_from_tree): Likewise. (gimple_cond_set_condition_from_tree): Require a gcond *. (gimple_build_label): Strengthen return type from gimple to glabel *. (gimple_build_goto): Strengthen return type from gimple to ggoto *. (gimple_build_bind): Strengthen return type from gimple to gbind *. (gimple_build_asm_1): Strengthen return type from gimple to gasm *. (gimple_build_asm_vec): Likewise. (gimple_build_catch): Strengthen return type from gimple to gcatch *. (gimple_build_eh_filter): Strengthen return type from gimple to geh_filter *. (gimple_build_eh_must_not_throw): Strengthen return type from gimple to geh_mnt *. (gimple_build_eh_else): Strengthen return type from gimple to geh_else *. (gimple_build_try): Update for renaming of gimple_statement_try to gtry. (gimple_build_resx): Strengthen return type from gimple to gresx *. (gimple_build_switch_nlabels): Strengthen return type from gimple to gswitch *. (gimple_build_switch): Likewise. (gimple_build_eh_dispatch): Strengthen return type from gimple to geh_dispatch *. (gimple_build_debug_bind_stat): Strengthen return type from gimple to gdebug *. (gimple_build_debug_source_bind_stat): Strengthen return type from gimple to gdebug *. (gimple_build_omp_critical): Strengthen return type from gimple to gomp_critical *. (gimple_build_omp_for): Strengthen return type from gimple to gomp_for *. (gimple_build_omp_parallel): Strengthen return type from gimple to gomp_parallel *. (gimple_build_omp_task): Strengthen return type from gimple to gomp_task *. (gimple_build_omp_continue): Strengthen return type from gimple to gomp_continue *. (gimple_build_omp_sections): Strengthen return type from gimple to gomp_sections *. (gimple_build_omp_single): Strengthen return type from gimple to gomp_single *. (gimple_build_omp_target): Strengthen return type from gimple to gomp_target *. (gimple_build_omp_teams): Strengthen return type from gimple to gomp_teams *. (gimple_build_omp_atomic_load): Strengthen return type from gimple to gomp_atomic_load *. (gimple_build_omp_atomic_store): Strengthen return type from gimple to gomp_atomic_store *. (gimple_build_transaction): Strengthen return type from gimple to gtransaction *. (empty_stmt_p): Replace check for GIMPLE_BIND with a dyn_cast. (gimple_call_fnspec): Require a const gcall *. (gimple_call_arg_flags): Likewise. (gimple_call_return_flags): Likewise. (gimple_set_bb): Add a checked cast. (gimple_copy): Within the cases, add locals of the appropriate subclass and use in place of "stmt" and "copy" for typesafety. (gimple_has_side_effects): Add a checked cast. (gimple_could_trap_p_1): Likewise. (gimple_call_copy_skip_args): Require a gcall *, and return one. (gimple_asm_clobbers_memory_p): Require a const gasm *. (infer_nonnull_range): Replace a check for GIMPLE_RETURN with a dyn_cast, introducing local "return_stmt" and using ti in place of "stmt". * gimple.h (gimple_vec): Eliminate this typedef. (struct gimple_statement_call): Rename to... (struct gcall): ...this. (struct gimple_statement_bind): Rename to... (struct gbind): ...this. (struct gimple_statement_catch): Rename to... (struct gcatch): ...this. (struct gimple_statement_eh_filter): Rename to... (struct geh_filter): ...this. (struct gimple_statement_eh_else): Rename to... (struct geh_else): ...this. (struct gimple_statement_eh_mnt): Rename to... (struct geh_mnt): ...this. (struct gimple_statement_phi): Rename to... (struct gphi): ...this. (struct gimple_statement_resx): Rename to... (struct gresx): ...this. (struct gimple_statement_eh_dispatch): Rename to... (struct geh_dispatch): ...this. (struct gimple_statement_try): Rename to... (struct gtry): ...this. (struct gimple_statement_asm): Rename to... (struct gasm): ...this. (struct gimple_statement_omp_critical): Rename to... (struct gomp_critical): ...this. (struct gimple_statement_omp_for): Rename to... (struct gomp_for): ...this. (struct gimple_statement_omp_parallel): Rename to... (struct gomp_parallel): ...this. (struct gimple_statement_omp_target): Rename to... (struct gomp_target): ...this. (struct gimple_statement_omp_task): Rename to... (struct gomp_task): ...this. (struct gimple_statement_omp_sections): Rename to... (struct gomp_sections): ...this. (struct gimple_statement_omp_continue): Rename to... (struct gomp_continue): ...this. (struct gimple_statement_omp_single): Rename to... (struct gomp_single): ...this. (struct gimple_statement_omp_teams): Rename to... (struct gomp_teams): ...this. (struct gimple_statement_omp_atomic_load): Rename to... (struct gomp_atomic_load): ...this. (struct gimple_statement_omp_atomic_store :): Rename to... (struct gomp_atomic_store :): ...this. (struct gimple_statement_transaction): Rename to... (struct gtransaction): ...this. (struct gcond): New subclass. (struct gdebug): New subclass. (struct ggoto): New subclass. (struct glabel): New subclass. (struct gswitch): New subclass. (struct gassign): New subclass. (struct greturn): New subclass. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): New. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (is_a_helper ::test): Rename to... (is_a_helper ::test): ...this. (gimple_build_return): Strengthen return type to greturn *. (gimple_call_reset_alias_info): Require a gcall *. (gimple_build_call_vec): Return a gcall *. (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_build_assign_stat): Return a gassign *. (gimple_build_assign_with_ops): Likewise. (gimple_build_cond): Return a gcond *. (gimple_build_cond_from_tree): Likewise. (gimple_cond_set_condition_from_tree): Require a gcond *. (gimple_build_label): Return a glabel *. (gimple_build_goto): Return a ggoto *. (gimple_build_bind): Return a gbind *. (gimple_build_asm_vec): Return a gasm *. (gimple_build_catch): Return a gcatch *. (gimple_build_eh_filter): Return a geh_filter *. (gimple_build_eh_must_not_throw): Return a geh_mnt *. (gimple_build_eh_else): Return a geh_else *. (gimple_build_try): Return a gtry *. (gimple_build_resx): Return a gresx *. (gimple_build_switch_nlabels): Return a gswitch *. (gimple_build_switch): Return a gswitch *. (gimple_build_eh_dispatch): Return a geh_dispatch *. (gimple_build_debug_bind_stat): Return a gdebug *. (gimple_build_debug_source_bind_stat): Return a gdebug *. (gimple_build_omp_critical): Return a gomp_critical *. (gimple_build_omp_for): Return a gomp_for *. (gimple_build_omp_parallel): Return a gomp_parallel *. (gimple_build_omp_task): Return a gomp_task *. (gimple_build_omp_continue): Return a gomp_continue *. (gimple_build_omp_sections): Return a gomp_sections *. (gimple_build_omp_single): Return a gomp_single *. (gimple_build_omp_target): Return a gomp_target *. (gimple_build_omp_teams): Return a gomp_teams *. (gimple_build_omp_atomic_load): Return a gomp_atomic_load *. (gimple_build_omp_atomic_store): Return a gomp_atomic_store *. (gimple_build_transaction): Return a gtransaction *. (gimple_call_arg_flags): Require a const gcall *. (gimple_call_return_flags): Likewise. (gimple_call_copy_skip_args): Require and return a gcall *. (gimple_asm_clobbers_memory_p): Require a const gasm *. (gimple_seq_first_stmt_as_a_bind): New. (gimple_assign_nontemporal_move_p): Require a const gassign * rather than a const_gimple. (gimple_call_internal_fn): Update for renaming to gcall. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Require a gcall * rather than a gimple. (gimple_call_set_fn): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_set_chain): Likewise. (gimple_call_set_tail): Likewise. (gimple_call_tail_p): Likewise. (gimple_call_set_return_slot_opt): Likewise. (gimple_call_return_slot_opt_p): Likewise. (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_nothrow): Likewise. (gimple_call_nothrow_p): Likewise. (gimple_call_set_alloca_for_var): Likewise. (gimple_call_alloca_for_var_p): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_call_return_type): Require a const gcall * rather than a const_gimple. (gimple_call_chain_ptr): Likewise. (gimple_call_copy_flags): Require a pair of gcall *. (gimple_cond_set_code): Require a gcond * rather than a gimple (gimple_cond_set_lhs): Likewise. (gimple_cond_set_rhs): Likewise. (gimple_cond_set_true_label): Likewise. (gimple_cond_set_false_label): Likewise. (gimple_cond_make_false): Likewise. (gimple_cond_make_true): Likewise. (gimple_cond_lhs_ptr): Require a const gcond * rather than a const_gimple. (gimple_cond_rhs_ptr): Likewise. (gimple_cond_true_label): Likewise. (gimple_cond_false_label): Likewise. (gimple_cond_true_p): Likewise. (gimple_cond_false_p): Likewise. (gimple_cond_set_condition): Likewise. (gimple_label_label): Require a const glabel *. (gimple_label_set_label): Require a glabel *. (gimple_goto_set_dest): Require a ggoto *. (gimple_bind_vars): Require a const gbind *. (gimple_bind_block): Likewise. (gimple_bind_set_vars): Require a gbind *. (gimple_bind_append_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_body): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_add_seq): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Require a const gasm *. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_asm_volatile_p): Likewise. (gimple_asm_input_p): Likewise. (gimple_asm_set_input_op): Require a gasm *. (gimple_asm_set_output_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_set_volatile): Likewise. (gimple_asm_set_input): Likewise. (gimple_catch_types): Require a const gcatch *. (gimple_catch_types_ptr): Require a gcatch *. (gimple_catch_handler_ptr): Likewise. (gimple_catch_handler): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Update for renaming of subclass to geh_filter. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Require a geh_filter *. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Require a geh_mnt *. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Require a geh_else *. (gimple_eh_else_n_body): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_e_body): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_set_kind): Require a gtry *. (gimple_try_set_catch_is_cleanup): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_try_eval_ptr): Update for renaming of subclass to gtry. (gimple_try_cleanup_ptr): Likewise. (gimple_phi_capacity): Update for renaming of subclass to gphi. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_result): Require a gphi *. (gimple_phi_set_arg): Likewise. (gimple_phi_arg_def_ptr): Likewise. (gimple_phi_arg_edge): Likewise. (gimple_phi_arg_location): Likewise. (gimple_phi_arg_location_from_edge): Likewise. (gimple_phi_arg_set_location): Likewise. (gimple_phi_arg_has_location): Likewise. (gimple_resx_region): Require a const gresx *. (gimple_resx_set_region): Require a gresx *. (gimple_eh_dispatch_region): Require a const geh_dispatch *. (gimple_eh_dispatch_set_region): Require a geh_dispatch *. (gimple_switch_num_labels): Require a const gswitch *. (gimple_switch_set_num_labels): Likewise. (gimple_switch_index): Likewise. (gimple_switch_index_ptr): Likewise. (gimple_switch_label): Likewise. (gimple_switch_default_label): Likewise. (gimple_switch_set_index): Require a gswitch *. (gimple_switch_set_label): Likewise. (gimple_switch_set_default_label): Likewise. (gimple_omp_critical_name): Require a const gomp_critical *. (gimple_omp_critical_name_ptr): Require a gomp_critical *. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_set_kind): Require a gomp_for *. (gimple_omp_for_set_combined_p): Likewise. (gimple_omp_for_set_combined_into_p): Likewise. (gimple_omp_for_clauses): Update for renaming of subclass to gomp_for. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Update for renaming of subclass to gomp_parallel. (gimple_omp_parallel_clauses_ptr): Require a gomp_parallel *. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_parallel_child_fn): Require a const gomp_parallel *. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_task_clauses): Update for renaming of subclass to gomp_task. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Whitespace fixes. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Update for renaming of subclass to gomp_task. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Update for renaming of subclass to gomp_single. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Update for renaming of subclass to gomp_target. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Require a gomp_target *. (gimple_omp_target_set_kind): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_target_child_fn): Require a const gomp_target *. (gimple_omp_target_data_arg): Likewise. (gimple_omp_teams_clauses): Update for renaming of subclass to gomp_teams. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Require a gomp_teams *. (gimple_omp_sections_clauses): Update for renaming of subclass to gomp_sections. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Require a gomp_atomic_store *. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_store_val): Require a const gomp_atomic_store *. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Require a gomp_atomic_load *. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Require a const gomp_continue *. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_def_ptr): Require a gomp_continue *. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Require a gtransaction *. (gimple_transaction_body): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_label): Require a const gtransaction *. (gimple_transaction_subcode): Likewise. (gimple_transaction_set_body): Require a gtransaction *. (gimple_transaction_set_label): Likewise. (gimple_transaction_set_subcode): Likewise. (gimple_return_retval_ptr): Require a const greturn *. (gimple_return_retval): Likewise. (gimple_return_set_retval): Require a greturn *. (gimple_expr_type): Introduce local "call_stmt" and use in place of "stmt" for typesafety. * asan.c: Use gimple subclasses. * auto-profile.c: Likewise. * builtins.c: Likewise. * builtins.h: Likewise. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * expr.h: Likewise. * gimple-builder.c: Likewise. * gimple-builder.h: Likewise. * gimple-fold.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * gimplify.h: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * internal-fn.c: Likewise. * internal-fn.def:: Likewise. * internal-fn.h: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf-gimple.h: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-prop.c: Likewise. * ipa-prop.h: Likewise. * ipa-pure-const.c: Likewise. * ipa-split.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * omp-low.c: Likewise. * predict.c: Likewise. * sanopt.c: Likewise. * sese.c: Likewise. * ssa-iterators.h: Likewise. * stmt.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfg.h: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp.c: Likewise. * tree-chkp.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-eh.c: Likewise. * tree-eh.h: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-inline.h: Likewise. * tree-into-ssa.c: Likewise. * tree-into-ssa.h: Likewise. * tree-loop-distribution.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-phinodes.h: Likewise. * tree-predcom.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-scalar-evolution.h * tree-sra.cn_function): * tree-ssa-alias.c: Likewise. * tree-ssa-alias.h: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-propagate.h: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sccvn.h: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c * tree-ssa-structalias.c * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadedge.h: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-stdarg.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * vtable-verify.c: Likewise. gcc/c-family/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack" from being just a vec to a vec. gcc/java/ChangeLog: Merger of git branch "gimple-classes-v2-option-3". * ChangeLog.gimple-classes: New. * java-gimplify.c (java_gimplify_block): Strengthen local "outer" from gimple to gbind *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217787 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gimple.h | 1380 +++++++++++++++++++++++++++------------------------------- 1 file changed, 636 insertions(+), 744 deletions(-) (limited to 'gcc/gimple.h') diff --git a/gcc/gimple.h b/gcc/gimple.h index 23b4b6b0623..9380211bdd9 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -24,10 +24,6 @@ along with GCC; see the file COPYING3. If not see typedef gimple gimple_seq_node; -/* For each block, the PHI nodes that need to be rewritten are stored into - these vectors. */ -typedef vec gimple_vec; - enum gimple_code { #define DEFGSCODE(SYM, STRING, STRUCT) SYM, #include "gimple.def" @@ -273,7 +269,7 @@ struct GTY((tag("GSS_WITH_MEM_OPS"))) /* Call statements that take both memory and register operands. */ struct GTY((tag("GSS_CALL"))) - gimple_statement_call : public gimple_statement_with_memory_ops_base + gcall : public gimple_statement_with_memory_ops_base { /* [ WORD 1-9 ] : base class */ @@ -310,7 +306,7 @@ struct GTY((tag("GSS_OMP"))) /* GIMPLE_BIND */ struct GTY((tag("GSS_BIND"))) - gimple_statement_bind : public gimple_statement_base + gbind : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -334,7 +330,7 @@ struct GTY((tag("GSS_BIND"))) /* GIMPLE_CATCH */ struct GTY((tag("GSS_CATCH"))) - gimple_statement_catch : public gimple_statement_base + gcatch : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -349,7 +345,7 @@ struct GTY((tag("GSS_CATCH"))) /* GIMPLE_EH_FILTER */ struct GTY((tag("GSS_EH_FILTER"))) - gimple_statement_eh_filter : public gimple_statement_base + geh_filter : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -365,7 +361,7 @@ struct GTY((tag("GSS_EH_FILTER"))) /* GIMPLE_EH_ELSE */ struct GTY((tag("GSS_EH_ELSE"))) - gimple_statement_eh_else : public gimple_statement_base + geh_else : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -376,7 +372,7 @@ struct GTY((tag("GSS_EH_ELSE"))) /* GIMPLE_EH_MUST_NOT_THROW */ struct GTY((tag("GSS_EH_MNT"))) - gimple_statement_eh_mnt : public gimple_statement_base + geh_mnt : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -387,7 +383,7 @@ struct GTY((tag("GSS_EH_MNT"))) /* GIMPLE_PHI */ struct GTY((tag("GSS_PHI"))) - gimple_statement_phi : public gimple_statement_base + gphi : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -416,14 +412,14 @@ struct GTY((tag("GSS_EH_CTRL"))) }; struct GTY((tag("GSS_EH_CTRL"))) - gimple_statement_resx : public gimple_statement_eh_ctrl + gresx : public gimple_statement_eh_ctrl { /* No extra fields; adds invariant: stmt->code == GIMPLE_RESX. */ }; struct GTY((tag("GSS_EH_CTRL"))) - gimple_statement_eh_dispatch : public gimple_statement_eh_ctrl + geh_dispatch : public gimple_statement_eh_ctrl { /* No extra fields; adds invariant: stmt->code == GIMPLE_EH_DISPATH. */ @@ -433,7 +429,7 @@ struct GTY((tag("GSS_EH_CTRL"))) /* GIMPLE_TRY */ struct GTY((tag("GSS_TRY"))) - gimple_statement_try : public gimple_statement_base + gtry : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -481,7 +477,7 @@ struct GTY((tag("GSS_WCE"))) /* GIMPLE_ASM */ struct GTY((tag("GSS_ASM"))) - gimple_statement_asm : public gimple_statement_with_memory_ops_base + gasm : public gimple_statement_with_memory_ops_base { /* [ WORD 1-9 ] : base class */ @@ -506,7 +502,7 @@ struct GTY((tag("GSS_ASM"))) /* GIMPLE_OMP_CRITICAL */ struct GTY((tag("GSS_OMP_CRITICAL"))) - gimple_statement_omp_critical : public gimple_statement_omp + gomp_critical : public gimple_statement_omp { /* [ WORD 1-7 ] : base class */ @@ -536,7 +532,7 @@ struct GTY(()) gimple_omp_for_iter { /* GIMPLE_OMP_FOR */ struct GTY((tag("GSS_OMP_FOR"))) - gimple_statement_omp_for : public gimple_statement_omp + gomp_for : public gimple_statement_omp { /* [ WORD 1-7 ] : base class */ @@ -587,14 +583,14 @@ struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT"))) /* GIMPLE_OMP_PARALLEL */ struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT"))) - gimple_statement_omp_parallel : public gimple_statement_omp_taskreg + gomp_parallel : public gimple_statement_omp_taskreg { /* No extra fields; adds invariant: stmt->code == GIMPLE_OMP_PARALLEL. */ }; struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT"))) - gimple_statement_omp_target : public gimple_statement_omp_parallel_layout + gomp_target : public gimple_statement_omp_parallel_layout { /* No extra fields; adds invariant: stmt->code == GIMPLE_OMP_TARGET. */ @@ -603,7 +599,7 @@ struct GTY((tag("GSS_OMP_PARALLEL_LAYOUT"))) /* GIMPLE_OMP_TASK */ struct GTY((tag("GSS_OMP_TASK"))) - gimple_statement_omp_task : public gimple_statement_omp_taskreg + gomp_task : public gimple_statement_omp_taskreg { /* [ WORD 1-10 ] : base class */ @@ -625,7 +621,7 @@ struct GTY((tag("GSS_OMP_TASK"))) /* GIMPLE_OMP_SECTIONS */ struct GTY((tag("GSS_OMP_SECTIONS"))) - gimple_statement_omp_sections : public gimple_statement_omp + gomp_sections : public gimple_statement_omp { /* [ WORD 1-7 ] : base class */ @@ -644,7 +640,7 @@ struct GTY((tag("GSS_OMP_SECTIONS"))) do not need the body field. */ struct GTY((tag("GSS_OMP_CONTINUE"))) - gimple_statement_omp_continue : public gimple_statement_base + gomp_continue : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -667,14 +663,14 @@ struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) }; struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) - gimple_statement_omp_single : public gimple_statement_omp_single_layout + gomp_single : public gimple_statement_omp_single_layout { /* No extra fields; adds invariant: stmt->code == GIMPLE_OMP_SINGLE. */ }; struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) - gimple_statement_omp_teams : public gimple_statement_omp_single_layout + gomp_teams : public gimple_statement_omp_single_layout { /* No extra fields; adds invariant: stmt->code == GIMPLE_OMP_TEAMS. */ @@ -686,7 +682,7 @@ struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) contains a sequence, which we don't need here. */ struct GTY((tag("GSS_OMP_ATOMIC_LOAD"))) - gimple_statement_omp_atomic_load : public gimple_statement_base + gomp_atomic_load : public gimple_statement_base { /* [ WORD 1-6 ] : base class */ @@ -707,7 +703,7 @@ struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT"))) }; struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT"))) - gimple_statement_omp_atomic_store : + gomp_atomic_store : public gimple_statement_omp_atomic_store_layout { /* No extra fields; adds invariant: @@ -751,7 +747,7 @@ struct GTY((tag("GSS_OMP_ATOMIC_STORE_LAYOUT"))) #define GTMA_HAS_NO_INSTRUMENTATION (1u << 7) struct GTY((tag("GSS_TRANSACTION"))) - gimple_statement_transaction : public gimple_statement_with_memory_ops_base + gtransaction : public gimple_statement_with_memory_ops_base { /* [ WORD 1-9 ] : base class */ @@ -769,10 +765,80 @@ enum gimple_statement_structure_enum { }; #undef DEFGSSTRUCT +/* A statement with the invariant that + stmt->code == GIMPLE_COND + i.e. a conditional jump statement. */ + +struct GTY((tag("GSS_WITH_OPS"))) + gcond : public gimple_statement_with_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_DEBUG + i.e. a debug statement. */ + +struct GTY((tag("GSS_WITH_OPS"))) + gdebug : public gimple_statement_with_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_GOTO + i.e. a goto statement. */ + +struct GTY((tag("GSS_WITH_OPS"))) + ggoto : public gimple_statement_with_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_LABEL + i.e. a label statement. */ + +struct GTY((tag("GSS_WITH_OPS"))) + glabel : public gimple_statement_with_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_SWITCH + i.e. a switch statement. */ + +struct GTY((tag("GSS_WITH_OPS"))) + gswitch : public gimple_statement_with_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_ASSIGN + i.e. an assignment statement. */ + +struct GTY((tag("GSS_WITH_MEM_OPS"))) + gassign : public gimple_statement_with_memory_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */ +}; + +/* A statement with the invariant that + stmt->code == GIMPLE_RETURN + i.e. a return statement. */ + +struct GTY((tag("GSS_WITH_MEM_OPS"))) + greturn : public gimple_statement_with_memory_ops +{ + /* no additional fields; this uses the layout for GSS_WITH_MEM_OPS. */ +}; + template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_ASM; } @@ -780,7 +846,15 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_ASSIGN; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_BIND; } @@ -788,7 +862,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_CALL; } @@ -796,7 +870,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_CATCH; } @@ -804,7 +878,39 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_COND; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_DEBUG; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_GOTO; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_LABEL; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_RESX; } @@ -812,7 +918,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_EH_DISPATCH; } @@ -820,7 +926,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_EH_ELSE; } @@ -828,7 +934,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_EH_FILTER; } @@ -836,7 +942,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_EH_MUST_NOT_THROW; } @@ -844,7 +950,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_ATOMIC_LOAD; } @@ -852,7 +958,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_ATOMIC_STORE; } @@ -868,7 +974,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_CONTINUE; } @@ -876,7 +982,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_CRITICAL; } @@ -884,7 +990,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_FOR; } @@ -900,7 +1006,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_PARALLEL; } @@ -908,7 +1014,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_TARGET; } @@ -916,7 +1022,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_SECTIONS; } @@ -924,7 +1030,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_SINGLE; } @@ -932,7 +1038,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_TEAMS; } @@ -940,7 +1046,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_OMP_TASK; } @@ -948,7 +1054,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_PHI; } @@ -956,7 +1062,23 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_RETURN; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gs->code == GIMPLE_SWITCH; +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_TRANSACTION; } @@ -964,7 +1086,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (gimple gs) +is_a_helper ::test (gimple gs) { return gs->code == GIMPLE_TRY; } @@ -980,7 +1102,7 @@ is_a_helper ::test (gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_ASM; } @@ -988,7 +1110,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_BIND; } @@ -996,7 +1118,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_CALL; } @@ -1004,7 +1126,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_CATCH; } @@ -1012,7 +1134,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_RESX; } @@ -1020,7 +1142,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_EH_DISPATCH; } @@ -1028,7 +1150,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_EH_FILTER; } @@ -1036,7 +1158,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_ATOMIC_LOAD; } @@ -1044,7 +1166,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_ATOMIC_STORE; } @@ -1060,7 +1182,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_CONTINUE; } @@ -1068,7 +1190,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_CRITICAL; } @@ -1076,7 +1198,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_FOR; } @@ -1092,7 +1214,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_PARALLEL; } @@ -1100,7 +1222,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_TARGET; } @@ -1108,7 +1230,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_SECTIONS; } @@ -1116,7 +1238,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_SINGLE; } @@ -1124,7 +1246,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_TEAMS; } @@ -1132,7 +1254,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_OMP_TASK; } @@ -1140,7 +1262,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_PHI; } @@ -1148,7 +1270,7 @@ is_a_helper ::test (const_gimple gs) template <> template <> inline bool -is_a_helper ::test (const_gimple gs) +is_a_helper ::test (const_gimple gs) { return gs->code == GIMPLE_TRANSACTION; } @@ -1166,67 +1288,68 @@ extern gimple currently_expanding_gimple_stmt; #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO) gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL); -gimple gimple_build_return (tree); -void gimple_call_reset_alias_info (gimple); -gimple gimple_build_call_vec (tree, vec ); -gimple gimple_build_call (tree, unsigned, ...); -gimple gimple_build_call_valist (tree, unsigned, va_list); -gimple gimple_build_call_internal (enum internal_fn, unsigned, ...); -gimple gimple_build_call_internal_vec (enum internal_fn, vec ); -gimple gimple_build_call_from_tree (tree); -gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL); +greturn *gimple_build_return (tree); +void gimple_call_reset_alias_info (gcall *); +gcall *gimple_build_call_vec (tree, vec ); +gcall *gimple_build_call (tree, unsigned, ...); +gcall *gimple_build_call_valist (tree, unsigned, va_list); +gcall *gimple_build_call_internal (enum internal_fn, unsigned, ...); +gcall *gimple_build_call_internal_vec (enum internal_fn, vec ); +gcall *gimple_build_call_from_tree (tree); +gassign *gimple_build_assign_stat (tree, tree MEM_STAT_DECL); #define gimple_build_assign(l,r) gimple_build_assign_stat (l, r MEM_STAT_INFO) -gimple gimple_build_assign_with_ops (enum tree_code, tree, - tree, tree, tree CXX_MEM_STAT_INFO); -gimple gimple_build_assign_with_ops (enum tree_code, tree, - tree, tree CXX_MEM_STAT_INFO); -gimple gimple_build_assign_with_ops (enum tree_code, tree, - tree CXX_MEM_STAT_INFO); -gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree); -gimple gimple_build_cond_from_tree (tree, tree, tree); -void gimple_cond_set_condition_from_tree (gimple, tree); -gimple gimple_build_label (tree label); -gimple gimple_build_goto (tree dest); +gassign *gimple_build_assign_with_ops (enum tree_code, tree, + tree, tree, tree CXX_MEM_STAT_INFO); +gassign *gimple_build_assign_with_ops (enum tree_code, tree, + tree, tree CXX_MEM_STAT_INFO); +gassign *gimple_build_assign_with_ops (enum tree_code, tree, + tree CXX_MEM_STAT_INFO); +gcond *gimple_build_cond (enum tree_code, tree, tree, tree, tree); +gcond *gimple_build_cond_from_tree (tree, tree, tree); +void gimple_cond_set_condition_from_tree (gcond *, tree); +glabel *gimple_build_label (tree label); +ggoto *gimple_build_goto (tree dest); gimple gimple_build_nop (void); -gimple gimple_build_bind (tree, gimple_seq, tree); -gimple gimple_build_asm_vec (const char *, vec *, - vec *, vec *, - vec *); -gimple gimple_build_catch (tree, gimple_seq); -gimple gimple_build_eh_filter (tree, gimple_seq); -gimple gimple_build_eh_must_not_throw (tree); -gimple gimple_build_eh_else (gimple_seq, gimple_seq); -gimple_statement_try *gimple_build_try (gimple_seq, gimple_seq, +gbind *gimple_build_bind (tree, gimple_seq, tree); +gasm *gimple_build_asm_vec (const char *, vec *, + vec *, vec *, + vec *); +gcatch *gimple_build_catch (tree, gimple_seq); +geh_filter *gimple_build_eh_filter (tree, gimple_seq); +geh_mnt *gimple_build_eh_must_not_throw (tree); +geh_else *gimple_build_eh_else (gimple_seq, gimple_seq); +gtry *gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags); gimple gimple_build_wce (gimple_seq); -gimple gimple_build_resx (int); -gimple gimple_build_switch_nlabels (unsigned, tree, tree); -gimple gimple_build_switch (tree, tree, vec ); -gimple gimple_build_eh_dispatch (int); -gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL); +gresx *gimple_build_resx (int); +gswitch *gimple_build_switch_nlabels (unsigned, tree, tree); +gswitch *gimple_build_switch (tree, tree, vec ); +geh_dispatch *gimple_build_eh_dispatch (int); +gdebug *gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL); #define gimple_build_debug_bind(var,val,stmt) \ gimple_build_debug_bind_stat ((var), (val), (stmt) MEM_STAT_INFO) -gimple gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL); +gdebug *gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL); #define gimple_build_debug_source_bind(var,val,stmt) \ gimple_build_debug_source_bind_stat ((var), (val), (stmt) MEM_STAT_INFO) -gimple gimple_build_omp_critical (gimple_seq, tree); -gimple gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq); -gimple gimple_build_omp_parallel (gimple_seq, tree, tree, tree); -gimple gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, tree, tree); +gomp_critical *gimple_build_omp_critical (gimple_seq, tree); +gomp_for *gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq); +gomp_parallel *gimple_build_omp_parallel (gimple_seq, tree, tree, tree); +gomp_task *gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, + tree, tree); gimple gimple_build_omp_section (gimple_seq); gimple gimple_build_omp_master (gimple_seq); gimple gimple_build_omp_taskgroup (gimple_seq); -gimple gimple_build_omp_continue (tree, tree); +gomp_continue *gimple_build_omp_continue (tree, tree); gimple gimple_build_omp_ordered (gimple_seq); gimple gimple_build_omp_return (bool); -gimple gimple_build_omp_sections (gimple_seq, tree); +gomp_sections *gimple_build_omp_sections (gimple_seq, tree); gimple gimple_build_omp_sections_switch (void); -gimple gimple_build_omp_single (gimple_seq, tree); -gimple gimple_build_omp_target (gimple_seq, int, tree); -gimple gimple_build_omp_teams (gimple_seq, tree); -gimple gimple_build_omp_atomic_load (tree, tree); -gimple gimple_build_omp_atomic_store (tree); -gimple gimple_build_transaction (gimple_seq, tree); +gomp_single *gimple_build_omp_single (gimple_seq, tree); +gomp_target *gimple_build_omp_target (gimple_seq, int, tree); +gomp_teams *gimple_build_omp_teams (gimple_seq, tree); +gomp_atomic_load *gimple_build_omp_atomic_load (tree, tree); +gomp_atomic_store *gimple_build_omp_atomic_store (tree); +gtransaction *gimple_build_transaction (gimple_seq, tree); gimple gimple_build_predict (enum br_predictor, enum prediction); extern void gimple_seq_add_stmt (gimple_seq *, gimple); extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple); @@ -1239,8 +1362,8 @@ bool empty_body_p (gimple_seq); gimple_seq gimple_seq_copy (gimple_seq); bool gimple_call_same_target_p (const_gimple, const_gimple); int gimple_call_flags (const_gimple); -int gimple_call_arg_flags (const_gimple, unsigned); -int gimple_call_return_flags (const_gimple); +int gimple_call_arg_flags (const gcall *, unsigned); +int gimple_call_return_flags (const gcall *); bool gimple_assign_copy_p (gimple); bool gimple_assign_ssa_name_copy_p (gimple); bool gimple_assign_unary_nop_p (gimple); @@ -1258,7 +1381,7 @@ bool gimple_assign_rhs_could_trap_p (gimple); extern void dump_gimple_statistics (void); unsigned get_gimple_rhs_num_ops (enum tree_code); extern tree canonicalize_cond_expr_cond (tree); -gimple gimple_call_copy_skip_args (gimple, bitmap); +gcall *gimple_call_copy_skip_args (gcall *, bitmap); extern bool gimple_compare_field_offset (tree, tree); extern tree gimple_unsigned_type (tree); extern tree gimple_signed_type (tree); @@ -1268,7 +1391,7 @@ extern bool gimple_builtin_call_types_compatible_p (const_gimple, tree); extern bool gimple_call_builtin_p (const_gimple); extern bool gimple_call_builtin_p (const_gimple, enum built_in_class); extern bool gimple_call_builtin_p (const_gimple, enum built_in_function); -extern bool gimple_asm_clobbers_memory_p (const_gimple); +extern bool gimple_asm_clobbers_memory_p (const gasm *); extern void dump_decl_set (FILE *, bitmap); extern bool nonfreeing_call_p (gimple); extern bool infer_nonnull_range (gimple, tree, bool, bool); @@ -1325,6 +1448,16 @@ gimple_seq_first_stmt (gimple_seq s) return n; } +/* Return the first statement in GIMPLE sequence S as a gbind *, + verifying that it has code GIMPLE_BIND in a checked build. */ + +static inline gbind * +gimple_seq_first_stmt_as_a_bind (gimple_seq s) +{ + gimple_seq_node n = gimple_seq_first (s); + return as_a (n); +} + /* Return the last node in GIMPLE sequence S. */ @@ -2338,9 +2471,8 @@ gimple_assign_set_rhs_with_ops (gimple_stmt_iterator *gsi, enum tree_code code, /* Returns true if GS is a nontemporal move. */ static inline bool -gimple_assign_nontemporal_move_p (const_gimple gs) +gimple_assign_nontemporal_move_p (const gassign *gs) { - GIMPLE_CHECK (gs, GIMPLE_ASSIGN); return gs->nontemporal_move; } @@ -2542,7 +2674,7 @@ static inline enum internal_fn gimple_call_internal_fn (const_gimple gs) { gcc_gimple_checking_assert (gimple_call_internal_p (gs)); - return static_cast (gs)->u.internal_fn; + return static_cast (gs)->u.internal_fn; } /* If CTRL_ALTERING_P is true, mark GIMPLE_CALL S to be a stmt @@ -2574,20 +2706,18 @@ gimple_call_ctrl_altering_p (const_gimple gs) static inline tree gimple_call_fntype (const_gimple gs) { - const gimple_statement_call *call_stmt = - as_a (gs); + const gcall *call_stmt = as_a (gs); if (gimple_call_internal_p (gs)) return NULL_TREE; return call_stmt->u.fntype; } -/* Set the type of the function called by GS to FNTYPE. */ +/* Set the type of the function called by CALL_STMT to FNTYPE. */ static inline void -gimple_call_set_fntype (gimple gs, tree fntype) +gimple_call_set_fntype (gcall *call_stmt, tree fntype) { - gimple_statement_call *call_stmt = as_a (gs); - gcc_gimple_checking_assert (!gimple_call_internal_p (gs)); + gcc_gimple_checking_assert (!gimple_call_internal_p (call_stmt)); call_stmt->u.fntype = fntype; } @@ -2616,9 +2746,8 @@ gimple_call_fn_ptr (const_gimple gs) /* Set FN to be the function called by call statement GS. */ static inline void -gimple_call_set_fn (gimple gs, tree fn) +gimple_call_set_fn (gcall *gs, tree fn) { - GIMPLE_CHECK (gs, GIMPLE_CALL); gcc_gimple_checking_assert (!gimple_call_internal_p (gs)); gimple_set_op (gs, 1, fn); } @@ -2635,13 +2764,12 @@ gimple_call_set_fndecl (gimple gs, tree decl) } -/* Set internal function FN to be the function called by call statement GS. */ +/* Set internal function FN to be the function called by call statement CALL_STMT. */ static inline void -gimple_call_set_internal_fn (gimple gs, enum internal_fn fn) +gimple_call_set_internal_fn (gcall *call_stmt, enum internal_fn fn) { - gimple_statement_call *call_stmt = as_a (gs); - gcc_gimple_checking_assert (gimple_call_internal_p (gs)); + gcc_gimple_checking_assert (gimple_call_internal_p (call_stmt)); call_stmt->u.internal_fn = fn; } @@ -2660,7 +2788,7 @@ gimple_call_fndecl (const_gimple gs) /* Return the type returned by call statement GS. */ static inline tree -gimple_call_return_type (const_gimple gs) +gimple_call_return_type (const gcall *gs) { tree type = gimple_call_fntype (gs); @@ -2683,23 +2811,20 @@ gimple_call_chain (const_gimple gs) } -/* Return a pointer to the static chain for call statement GS. */ +/* Return a pointer to the static chain for call statement CALL_STMT. */ static inline tree * -gimple_call_chain_ptr (const_gimple gs) +gimple_call_chain_ptr (const gcall *call_stmt) { - GIMPLE_CHECK (gs, GIMPLE_CALL); - return gimple_op_ptr (gs, 2); + return gimple_op_ptr (call_stmt, 2); } -/* Set CHAIN to be the static chain for call statement GS. */ +/* Set CHAIN to be the static chain for call statement CALL_STMT. */ static inline void -gimple_call_set_chain (gimple gs, tree chain) +gimple_call_set_chain (gcall *call_stmt, tree chain) { - GIMPLE_CHECK (gs, GIMPLE_CALL); - - gimple_set_op (gs, 2, chain); + gimple_set_op (call_stmt, 2, chain); } @@ -2751,9 +2876,8 @@ gimple_call_set_arg (gimple gs, unsigned index, tree arg) candidate for tail call optimization. */ static inline void -gimple_call_set_tail (gimple s, bool tail_p) +gimple_call_set_tail (gcall *s, bool tail_p) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (tail_p) s->subcode |= GF_CALL_TAILCALL; else @@ -2764,9 +2888,8 @@ gimple_call_set_tail (gimple s, bool tail_p) /* Return true if GIMPLE_CALL S is marked as a tail call. */ static inline bool -gimple_call_tail_p (gimple s) +gimple_call_tail_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (s->subcode & GF_CALL_TAILCALL) != 0; } @@ -2776,9 +2899,8 @@ gimple_call_tail_p (gimple s) expansion as the return slot for calls that return in memory. */ static inline void -gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p) +gimple_call_set_return_slot_opt (gcall *s, bool return_slot_opt_p) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (return_slot_opt_p) s->subcode |= GF_CALL_RETURN_SLOT_OPT; else @@ -2789,9 +2911,8 @@ gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p) /* Return true if S is marked for return slot optimization. */ static inline bool -gimple_call_return_slot_opt_p (gimple s) +gimple_call_return_slot_opt_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0; } @@ -2800,9 +2921,8 @@ gimple_call_return_slot_opt_p (gimple s) thunk to the thunked-to function. */ static inline void -gimple_call_set_from_thunk (gimple s, bool from_thunk_p) +gimple_call_set_from_thunk (gcall *s, bool from_thunk_p) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (from_thunk_p) s->subcode |= GF_CALL_FROM_THUNK; else @@ -2813,9 +2933,8 @@ gimple_call_set_from_thunk (gimple s, bool from_thunk_p) /* Return true if GIMPLE_CALL S is a jump from a thunk. */ static inline bool -gimple_call_from_thunk_p (gimple s) +gimple_call_from_thunk_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (s->subcode & GF_CALL_FROM_THUNK) != 0; } @@ -2824,9 +2943,8 @@ gimple_call_from_thunk_p (gimple s) argument pack in its argument list. */ static inline void -gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p) +gimple_call_set_va_arg_pack (gcall *s, bool pass_arg_pack_p) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (pass_arg_pack_p) s->subcode |= GF_CALL_VA_ARG_PACK; else @@ -2838,9 +2956,8 @@ gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p) argument pack in its argument list. */ static inline bool -gimple_call_va_arg_pack_p (gimple s) +gimple_call_va_arg_pack_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (s->subcode & GF_CALL_VA_ARG_PACK) != 0; } @@ -2859,9 +2976,8 @@ gimple_call_noreturn_p (gimple s) even if the called function can throw in other cases. */ static inline void -gimple_call_set_nothrow (gimple s, bool nothrow_p) +gimple_call_set_nothrow (gcall *s, bool nothrow_p) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (nothrow_p) s->subcode |= GF_CALL_NOTHROW; else @@ -2871,9 +2987,8 @@ gimple_call_set_nothrow (gimple s, bool nothrow_p) /* Return true if S is a nothrow call. */ static inline bool -gimple_call_nothrow_p (gimple s) +gimple_call_nothrow_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (gimple_call_flags (s) & ECF_NOTHROW) != 0; } @@ -2883,9 +2998,8 @@ gimple_call_nothrow_p (gimple s) stack growth even when they occur in loops. */ static inline void -gimple_call_set_alloca_for_var (gimple s, bool for_var) +gimple_call_set_alloca_for_var (gcall *s, bool for_var) { - GIMPLE_CHECK (s, GIMPLE_CALL); if (for_var) s->subcode |= GF_CALL_ALLOCA_FOR_VAR; else @@ -2895,41 +3009,36 @@ gimple_call_set_alloca_for_var (gimple s, bool for_var) /* Return true of S is a call to builtin_alloca emitted for VLA objects. */ static inline bool -gimple_call_alloca_for_var_p (gimple s) +gimple_call_alloca_for_var_p (gcall *s) { - GIMPLE_CHECK (s, GIMPLE_CALL); return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0; } /* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL. */ static inline void -gimple_call_copy_flags (gimple dest_call, gimple orig_call) +gimple_call_copy_flags (gcall *dest_call, gcall *orig_call) { - GIMPLE_CHECK (dest_call, GIMPLE_CALL); - GIMPLE_CHECK (orig_call, GIMPLE_CALL); dest_call->subcode = orig_call->subcode; } /* Return a pointer to the points-to solution for the set of call-used - variables of the call CALL. */ + variables of the call CALL_STMT. */ static inline struct pt_solution * -gimple_call_use_set (gimple call) +gimple_call_use_set (gcall *call_stmt) { - gimple_statement_call *call_stmt = as_a (call); return &call_stmt->call_used; } /* Return a pointer to the points-to solution for the set of call-used - variables of the call CALL. */ + variables of the call CALL_STMT. */ static inline struct pt_solution * -gimple_call_clobber_set (gimple call) +gimple_call_clobber_set (gcall *call_stmt) { - gimple_statement_call *call_stmt = as_a (call); return &call_stmt->call_clobbered; } @@ -2959,9 +3068,8 @@ gimple_cond_code (const_gimple gs) /* Set CODE to be the predicate code for the conditional statement GS. */ static inline void -gimple_cond_set_code (gimple gs, enum tree_code code) +gimple_cond_set_code (gcond *gs, enum tree_code code) { - GIMPLE_CHECK (gs, GIMPLE_COND); gs->subcode = code; } @@ -2979,9 +3087,8 @@ gimple_cond_lhs (const_gimple gs) statement GS. */ static inline tree * -gimple_cond_lhs_ptr (const_gimple gs) +gimple_cond_lhs_ptr (const gcond *gs) { - GIMPLE_CHECK (gs, GIMPLE_COND); return gimple_op_ptr (gs, 0); } @@ -2989,9 +3096,8 @@ gimple_cond_lhs_ptr (const_gimple gs) conditional statement GS. */ static inline void -gimple_cond_set_lhs (gimple gs, tree lhs) +gimple_cond_set_lhs (gcond *gs, tree lhs) { - GIMPLE_CHECK (gs, GIMPLE_COND); gimple_set_op (gs, 0, lhs); } @@ -3009,9 +3115,8 @@ gimple_cond_rhs (const_gimple gs) conditional GS. */ static inline tree * -gimple_cond_rhs_ptr (const_gimple gs) +gimple_cond_rhs_ptr (const gcond *gs) { - GIMPLE_CHECK (gs, GIMPLE_COND); return gimple_op_ptr (gs, 1); } @@ -3020,9 +3125,8 @@ gimple_cond_rhs_ptr (const_gimple gs) conditional statement GS. */ static inline void -gimple_cond_set_rhs (gimple gs, tree rhs) +gimple_cond_set_rhs (gcond *gs, tree rhs) { - GIMPLE_CHECK (gs, GIMPLE_COND); gimple_set_op (gs, 1, rhs); } @@ -3031,9 +3135,8 @@ gimple_cond_set_rhs (gimple gs, tree rhs) predicate evaluates to true. */ static inline tree -gimple_cond_true_label (const_gimple gs) +gimple_cond_true_label (const gcond *gs) { - GIMPLE_CHECK (gs, GIMPLE_COND); return gimple_op (gs, 2); } @@ -3042,9 +3145,8 @@ gimple_cond_true_label (const_gimple gs) predicate evaluates to true. */ static inline void -gimple_cond_set_true_label (gimple gs, tree label) +gimple_cond_set_true_label (gcond *gs, tree label) { - GIMPLE_CHECK (gs, GIMPLE_COND); gimple_set_op (gs, 2, label); } @@ -3053,9 +3155,8 @@ gimple_cond_set_true_label (gimple gs, tree label) predicate evaluates to false. */ static inline void -gimple_cond_set_false_label (gimple gs, tree label) +gimple_cond_set_false_label (gcond *gs, tree label) { - GIMPLE_CHECK (gs, GIMPLE_COND); gimple_set_op (gs, 3, label); } @@ -3064,9 +3165,9 @@ gimple_cond_set_false_label (gimple gs, tree label) predicate evaluates to false. */ static inline tree -gimple_cond_false_label (const_gimple gs) +gimple_cond_false_label (const gcond *gs) { - GIMPLE_CHECK (gs, GIMPLE_COND); + return gimple_op (gs, 3); } @@ -3074,7 +3175,7 @@ gimple_cond_false_label (const_gimple gs) /* Set the conditional COND_STMT to be of the form 'if (1 == 0)'. */ static inline void -gimple_cond_make_false (gimple gs) +gimple_cond_make_false (gcond *gs) { gimple_cond_set_lhs (gs, boolean_true_node); gimple_cond_set_rhs (gs, boolean_false_node); @@ -3085,7 +3186,7 @@ gimple_cond_make_false (gimple gs) /* Set the conditional COND_STMT to be of the form 'if (1 == 1)'. */ static inline void -gimple_cond_make_true (gimple gs) +gimple_cond_make_true (gcond *gs) { gimple_cond_set_lhs (gs, boolean_true_node); gimple_cond_set_rhs (gs, boolean_true_node); @@ -3096,7 +3197,7 @@ gimple_cond_make_true (gimple gs) 'if (0 == 0)', 'if (1 != 0)' or 'if (0 != 1)' */ static inline bool -gimple_cond_true_p (const_gimple gs) +gimple_cond_true_p (const gcond *gs) { tree lhs = gimple_cond_lhs (gs); tree rhs = gimple_cond_rhs (gs); @@ -3121,7 +3222,7 @@ gimple_cond_true_p (const_gimple gs) 'if (0 != 0)', 'if (1 == 0)' or 'if (0 == 1)' */ static inline bool -gimple_cond_false_p (const_gimple gs) +gimple_cond_false_p (const gcond *gs) { tree lhs = gimple_cond_lhs (gs); tree rhs = gimple_cond_rhs (gs); @@ -3145,7 +3246,8 @@ gimple_cond_false_p (const_gimple gs) /* Set the code, LHS and RHS of GIMPLE_COND STMT from CODE, LHS and RHS. */ static inline void -gimple_cond_set_condition (gimple stmt, enum tree_code code, tree lhs, tree rhs) +gimple_cond_set_condition (gcond *stmt, enum tree_code code, tree lhs, + tree rhs) { gimple_cond_set_code (stmt, code); gimple_cond_set_lhs (stmt, lhs); @@ -3155,9 +3257,8 @@ gimple_cond_set_condition (gimple stmt, enum tree_code code, tree lhs, tree rhs) /* Return the LABEL_DECL node used by GIMPLE_LABEL statement GS. */ static inline tree -gimple_label_label (const_gimple gs) +gimple_label_label (const glabel *gs) { - GIMPLE_CHECK (gs, GIMPLE_LABEL); return gimple_op (gs, 0); } @@ -3166,9 +3267,8 @@ gimple_label_label (const_gimple gs) GS. */ static inline void -gimple_label_set_label (gimple gs, tree label) +gimple_label_set_label (glabel *gs, tree label) { - GIMPLE_CHECK (gs, GIMPLE_LABEL); gimple_set_op (gs, 0, label); } @@ -3186,9 +3286,8 @@ gimple_goto_dest (const_gimple gs) /* Set DEST to be the destination of the unconditonal jump GS. */ static inline void -gimple_goto_set_dest (gimple gs, tree dest) +gimple_goto_set_dest (ggoto *gs, tree dest) { - GIMPLE_CHECK (gs, GIMPLE_GOTO); gimple_set_op (gs, 0, dest); } @@ -3196,10 +3295,8 @@ gimple_goto_set_dest (gimple gs, tree dest) /* Return the variables declared in the GIMPLE_BIND statement GS. */ static inline tree -gimple_bind_vars (const_gimple gs) +gimple_bind_vars (const gbind *bind_stmt) { - const gimple_statement_bind *bind_stmt = - as_a (gs); return bind_stmt->vars; } @@ -3208,9 +3305,8 @@ gimple_bind_vars (const_gimple gs) statement GS. */ static inline void -gimple_bind_set_vars (gimple gs, tree vars) +gimple_bind_set_vars (gbind *bind_stmt, tree vars) { - gimple_statement_bind *bind_stmt = as_a (gs); bind_stmt->vars = vars; } @@ -3219,24 +3315,22 @@ gimple_bind_set_vars (gimple gs, tree vars) statement GS. */ static inline void -gimple_bind_append_vars (gimple gs, tree vars) +gimple_bind_append_vars (gbind *bind_stmt, tree vars) { - gimple_statement_bind *bind_stmt = as_a (gs); bind_stmt->vars = chainon (bind_stmt->vars, vars); } static inline gimple_seq * -gimple_bind_body_ptr (gimple gs) +gimple_bind_body_ptr (gbind *bind_stmt) { - gimple_statement_bind *bind_stmt = as_a (gs); return &bind_stmt->body; } /* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS. */ static inline gimple_seq -gimple_bind_body (gimple gs) +gimple_bind_body (gbind *gs) { return *gimple_bind_body_ptr (gs); } @@ -3246,9 +3340,8 @@ gimple_bind_body (gimple gs) statement GS. */ static inline void -gimple_bind_set_body (gimple gs, gimple_seq seq) +gimple_bind_set_body (gbind *bind_stmt, gimple_seq seq) { - gimple_statement_bind *bind_stmt = as_a (gs); bind_stmt->body = seq; } @@ -3256,9 +3349,8 @@ gimple_bind_set_body (gimple gs, gimple_seq seq) /* Append a statement to the end of a GIMPLE_BIND's body. */ static inline void -gimple_bind_add_stmt (gimple gs, gimple stmt) +gimple_bind_add_stmt (gbind *bind_stmt, gimple stmt) { - gimple_statement_bind *bind_stmt = as_a (gs); gimple_seq_add_stmt (&bind_stmt->body, stmt); } @@ -3266,9 +3358,8 @@ gimple_bind_add_stmt (gimple gs, gimple stmt) /* Append a sequence of statements to the end of a GIMPLE_BIND's body. */ static inline void -gimple_bind_add_seq (gimple gs, gimple_seq seq) +gimple_bind_add_seq (gbind *bind_stmt, gimple_seq seq) { - gimple_statement_bind *bind_stmt = as_a (gs); gimple_seq_add_seq (&bind_stmt->body, seq); } @@ -3277,10 +3368,8 @@ gimple_bind_add_seq (gimple gs, gimple_seq seq) GS. This is analogous to the BIND_EXPR_BLOCK field in trees. */ static inline tree -gimple_bind_block (const_gimple gs) +gimple_bind_block (const gbind *bind_stmt) { - const gimple_statement_bind *bind_stmt = - as_a (gs); return bind_stmt->block; } @@ -3289,288 +3378,251 @@ gimple_bind_block (const_gimple gs) statement GS. */ static inline void -gimple_bind_set_block (gimple gs, tree block) +gimple_bind_set_block (gbind *bind_stmt, tree block) { - gimple_statement_bind *bind_stmt = as_a (gs); gcc_gimple_checking_assert (block == NULL_TREE || TREE_CODE (block) == BLOCK); bind_stmt->block = block; } -/* Return the number of input operands for GIMPLE_ASM GS. */ +/* Return the number of input operands for GIMPLE_ASM ASM_STMT. */ static inline unsigned -gimple_asm_ninputs (const_gimple gs) +gimple_asm_ninputs (const gasm *asm_stmt) { - const gimple_statement_asm *asm_stmt = - as_a (gs); return asm_stmt->ni; } -/* Return the number of output operands for GIMPLE_ASM GS. */ +/* Return the number of output operands for GIMPLE_ASM ASM_STMT. */ static inline unsigned -gimple_asm_noutputs (const_gimple gs) +gimple_asm_noutputs (const gasm *asm_stmt) { - const gimple_statement_asm *asm_stmt = - as_a (gs); return asm_stmt->no; } -/* Return the number of clobber operands for GIMPLE_ASM GS. */ +/* Return the number of clobber operands for GIMPLE_ASM ASM_STMT. */ static inline unsigned -gimple_asm_nclobbers (const_gimple gs) +gimple_asm_nclobbers (const gasm *asm_stmt) { - const gimple_statement_asm *asm_stmt = - as_a (gs); return asm_stmt->nc; } -/* Return the number of label operands for GIMPLE_ASM GS. */ +/* Return the number of label operands for GIMPLE_ASM ASM_STMT. */ static inline unsigned -gimple_asm_nlabels (const_gimple gs) +gimple_asm_nlabels (const gasm *asm_stmt) { - const gimple_statement_asm *asm_stmt = - as_a (gs); return asm_stmt->nl; } -/* Return input operand INDEX of GIMPLE_ASM GS. */ +/* Return input operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree -gimple_asm_input_op (const_gimple gs, unsigned index) +gimple_asm_input_op (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->ni); - return gimple_op (gs, index + asm_stmt->no); + return gimple_op (asm_stmt, index + asm_stmt->no); } -/* Return a pointer to input operand INDEX of GIMPLE_ASM GS. */ +/* Return a pointer to input operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree * -gimple_asm_input_op_ptr (const_gimple gs, unsigned index) +gimple_asm_input_op_ptr (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->ni); - return gimple_op_ptr (gs, index + asm_stmt->no); + return gimple_op_ptr (asm_stmt, index + asm_stmt->no); } -/* Set IN_OP to be input operand INDEX in GIMPLE_ASM GS. */ +/* Set IN_OP to be input operand INDEX in GIMPLE_ASM ASM_STMT. */ static inline void -gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op) +gimple_asm_set_input_op (gasm *asm_stmt, unsigned index, tree in_op) { - gimple_statement_asm *asm_stmt = as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->ni && TREE_CODE (in_op) == TREE_LIST); - gimple_set_op (gs, index + asm_stmt->no, in_op); + gimple_set_op (asm_stmt, index + asm_stmt->no, in_op); } -/* Return output operand INDEX of GIMPLE_ASM GS. */ +/* Return output operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree -gimple_asm_output_op (const_gimple gs, unsigned index) +gimple_asm_output_op (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->no); - return gimple_op (gs, index); + return gimple_op (asm_stmt, index); } -/* Return a pointer to output operand INDEX of GIMPLE_ASM GS. */ +/* Return a pointer to output operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree * -gimple_asm_output_op_ptr (const_gimple gs, unsigned index) +gimple_asm_output_op_ptr (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->no); - return gimple_op_ptr (gs, index); + return gimple_op_ptr (asm_stmt, index); } -/* Set OUT_OP to be output operand INDEX in GIMPLE_ASM GS. */ +/* Set OUT_OP to be output operand INDEX in GIMPLE_ASM ASM_STMT. */ static inline void -gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op) +gimple_asm_set_output_op (gasm *asm_stmt, unsigned index, tree out_op) { - gimple_statement_asm *asm_stmt = as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->no && TREE_CODE (out_op) == TREE_LIST); - gimple_set_op (gs, index, out_op); + gimple_set_op (asm_stmt, index, out_op); } -/* Return clobber operand INDEX of GIMPLE_ASM GS. */ +/* Return clobber operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree -gimple_asm_clobber_op (const_gimple gs, unsigned index) +gimple_asm_clobber_op (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->nc); - return gimple_op (gs, index + asm_stmt->ni + asm_stmt->no); + return gimple_op (asm_stmt, index + asm_stmt->ni + asm_stmt->no); } -/* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM GS. */ +/* Set CLOBBER_OP to be clobber operand INDEX in GIMPLE_ASM ASM_STMT. */ static inline void -gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op) +gimple_asm_set_clobber_op (gasm *asm_stmt, unsigned index, tree clobber_op) { - gimple_statement_asm *asm_stmt = as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->nc && TREE_CODE (clobber_op) == TREE_LIST); - gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->no, clobber_op); + gimple_set_op (asm_stmt, index + asm_stmt->ni + asm_stmt->no, clobber_op); } -/* Return label operand INDEX of GIMPLE_ASM GS. */ +/* Return label operand INDEX of GIMPLE_ASM ASM_STMT. */ static inline tree -gimple_asm_label_op (const_gimple gs, unsigned index) +gimple_asm_label_op (const gasm *asm_stmt, unsigned index) { - const gimple_statement_asm *asm_stmt = - as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->nl); - return gimple_op (gs, index + asm_stmt->ni + asm_stmt->nc); + return gimple_op (asm_stmt, index + asm_stmt->ni + asm_stmt->nc); } -/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS. */ +/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM ASM_STMT. */ static inline void -gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op) +gimple_asm_set_label_op (gasm *asm_stmt, unsigned index, tree label_op) { - gimple_statement_asm *asm_stmt = as_a (gs); gcc_gimple_checking_assert (index < asm_stmt->nl && TREE_CODE (label_op) == TREE_LIST); - gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->nc, label_op); + gimple_set_op (asm_stmt, index + asm_stmt->ni + asm_stmt->nc, label_op); } /* Return the string representing the assembly instruction in - GIMPLE_ASM GS. */ + GIMPLE_ASM ASM_STMT. */ static inline const char * -gimple_asm_string (const_gimple gs) +gimple_asm_string (const gasm *asm_stmt) { - const gimple_statement_asm *asm_stmt = - as_a (gs); return asm_stmt->string; } -/* Return true if GS is an asm statement marked volatile. */ +/* Return true ASM_STMT ASM_STMT is an asm statement marked volatile. */ static inline bool -gimple_asm_volatile_p (const_gimple gs) +gimple_asm_volatile_p (const gasm *asm_stmt) { - GIMPLE_CHECK (gs, GIMPLE_ASM); - return (gs->subcode & GF_ASM_VOLATILE) != 0; + return (asm_stmt->subcode & GF_ASM_VOLATILE) != 0; } -/* If VOLATLE_P is true, mark asm statement GS as volatile. */ +/* If VOLATLE_P is true, mark asm statement ASM_STMT as volatile. */ static inline void -gimple_asm_set_volatile (gimple gs, bool volatile_p) +gimple_asm_set_volatile (gasm *asm_stmt, bool volatile_p) { - GIMPLE_CHECK (gs, GIMPLE_ASM); if (volatile_p) - gs->subcode |= GF_ASM_VOLATILE; + asm_stmt->subcode |= GF_ASM_VOLATILE; else - gs->subcode &= ~GF_ASM_VOLATILE; + asm_stmt->subcode &= ~GF_ASM_VOLATILE; } -/* If INPUT_P is true, mark asm GS as an ASM_INPUT. */ +/* If INPUT_P is true, mark asm ASM_STMT as an ASM_INPUT. */ static inline void -gimple_asm_set_input (gimple gs, bool input_p) +gimple_asm_set_input (gasm *asm_stmt, bool input_p) { - GIMPLE_CHECK (gs, GIMPLE_ASM); if (input_p) - gs->subcode |= GF_ASM_INPUT; + asm_stmt->subcode |= GF_ASM_INPUT; else - gs->subcode &= ~GF_ASM_INPUT; + asm_stmt->subcode &= ~GF_ASM_INPUT; } -/* Return true if asm GS is an ASM_INPUT. */ +/* Return true if asm ASM_STMT is an ASM_INPUT. */ static inline bool -gimple_asm_input_p (const_gimple gs) +gimple_asm_input_p (const gasm *asm_stmt) { - GIMPLE_CHECK (gs, GIMPLE_ASM); - return (gs->subcode & GF_ASM_INPUT) != 0; + return (asm_stmt->subcode & GF_ASM_INPUT) != 0; } -/* Return the types handled by GIMPLE_CATCH statement GS. */ +/* Return the types handled by GIMPLE_CATCH statement CATCH_STMT. */ static inline tree -gimple_catch_types (const_gimple gs) +gimple_catch_types (const gcatch *catch_stmt) { - const gimple_statement_catch *catch_stmt = - as_a (gs); return catch_stmt->types; } -/* Return a pointer to the types handled by GIMPLE_CATCH statement GS. */ +/* Return a pointer to the types handled by GIMPLE_CATCH statement CATCH_STMT. */ static inline tree * -gimple_catch_types_ptr (gimple gs) +gimple_catch_types_ptr (gcatch *catch_stmt) { - gimple_statement_catch *catch_stmt = as_a (gs); return &catch_stmt->types; } /* Return a pointer to the GIMPLE sequence representing the body of - the handler of GIMPLE_CATCH statement GS. */ + the handler of GIMPLE_CATCH statement CATCH_STMT. */ static inline gimple_seq * -gimple_catch_handler_ptr (gimple gs) +gimple_catch_handler_ptr (gcatch *catch_stmt) { - gimple_statement_catch *catch_stmt = as_a (gs); return &catch_stmt->handler; } /* Return the GIMPLE sequence representing the body of the handler of - GIMPLE_CATCH statement GS. */ + GIMPLE_CATCH statement CATCH_STMT. */ static inline gimple_seq -gimple_catch_handler (gimple gs) +gimple_catch_handler (gcatch *catch_stmt) { - return *gimple_catch_handler_ptr (gs); + return *gimple_catch_handler_ptr (catch_stmt); } -/* Set T to be the set of types handled by GIMPLE_CATCH GS. */ +/* Set T to be the set of types handled by GIMPLE_CATCH CATCH_STMT. */ static inline void -gimple_catch_set_types (gimple gs, tree t) +gimple_catch_set_types (gcatch *catch_stmt, tree t) { - gimple_statement_catch *catch_stmt = as_a (gs); catch_stmt->types = t; } -/* Set HANDLER to be the body of GIMPLE_CATCH GS. */ +/* Set HANDLER to be the body of GIMPLE_CATCH CATCH_STMT. */ static inline void -gimple_catch_set_handler (gimple gs, gimple_seq handler) +gimple_catch_set_handler (gcatch *catch_stmt, gimple_seq handler) { - gimple_statement_catch *catch_stmt = as_a (gs); catch_stmt->handler = handler; } @@ -3580,8 +3632,7 @@ gimple_catch_set_handler (gimple gs, gimple_seq handler) static inline tree gimple_eh_filter_types (const_gimple gs) { - const gimple_statement_eh_filter *eh_filter_stmt = - as_a (gs); + const geh_filter *eh_filter_stmt = as_a (gs); return eh_filter_stmt->types; } @@ -3592,8 +3643,7 @@ gimple_eh_filter_types (const_gimple gs) static inline tree * gimple_eh_filter_types_ptr (gimple gs) { - gimple_statement_eh_filter *eh_filter_stmt = - as_a (gs); + geh_filter *eh_filter_stmt = as_a (gs); return &eh_filter_stmt->types; } @@ -3604,8 +3654,7 @@ gimple_eh_filter_types_ptr (gimple gs) static inline gimple_seq * gimple_eh_filter_failure_ptr (gimple gs) { - gimple_statement_eh_filter *eh_filter_stmt = - as_a (gs); + geh_filter *eh_filter_stmt = as_a (gs); return &eh_filter_stmt->failure; } @@ -3620,89 +3669,78 @@ gimple_eh_filter_failure (gimple gs) } -/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER GS. */ +/* Set TYPES to be the set of types handled by GIMPLE_EH_FILTER + EH_FILTER_STMT. */ static inline void -gimple_eh_filter_set_types (gimple gs, tree types) +gimple_eh_filter_set_types (geh_filter *eh_filter_stmt, tree types) { - gimple_statement_eh_filter *eh_filter_stmt = - as_a (gs); eh_filter_stmt->types = types; } /* Set FAILURE to be the sequence of statements to execute on failure - for GIMPLE_EH_FILTER GS. */ + for GIMPLE_EH_FILTER EH_FILTER_STMT. */ static inline void -gimple_eh_filter_set_failure (gimple gs, gimple_seq failure) +gimple_eh_filter_set_failure (geh_filter *eh_filter_stmt, + gimple_seq failure) { - gimple_statement_eh_filter *eh_filter_stmt = - as_a (gs); eh_filter_stmt->failure = failure; } /* Get the function decl to be called by the MUST_NOT_THROW region. */ static inline tree -gimple_eh_must_not_throw_fndecl (gimple gs) +gimple_eh_must_not_throw_fndecl (geh_mnt *eh_mnt_stmt) { - gimple_statement_eh_mnt *eh_mnt_stmt = as_a (gs); return eh_mnt_stmt->fndecl; } /* Set the function decl to be called by GS to DECL. */ static inline void -gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl) +gimple_eh_must_not_throw_set_fndecl (geh_mnt *eh_mnt_stmt, + tree decl) { - gimple_statement_eh_mnt *eh_mnt_stmt = as_a (gs); eh_mnt_stmt->fndecl = decl; } /* GIMPLE_EH_ELSE accessors. */ static inline gimple_seq * -gimple_eh_else_n_body_ptr (gimple gs) +gimple_eh_else_n_body_ptr (geh_else *eh_else_stmt) { - gimple_statement_eh_else *eh_else_stmt = - as_a (gs); return &eh_else_stmt->n_body; } static inline gimple_seq -gimple_eh_else_n_body (gimple gs) +gimple_eh_else_n_body (geh_else *eh_else_stmt) { - return *gimple_eh_else_n_body_ptr (gs); + return *gimple_eh_else_n_body_ptr (eh_else_stmt); } static inline gimple_seq * -gimple_eh_else_e_body_ptr (gimple gs) +gimple_eh_else_e_body_ptr (geh_else *eh_else_stmt) { - gimple_statement_eh_else *eh_else_stmt = - as_a (gs); return &eh_else_stmt->e_body; } static inline gimple_seq -gimple_eh_else_e_body (gimple gs) +gimple_eh_else_e_body (geh_else *eh_else_stmt) { - return *gimple_eh_else_e_body_ptr (gs); + return *gimple_eh_else_e_body_ptr (eh_else_stmt); } static inline void -gimple_eh_else_set_n_body (gimple gs, gimple_seq seq) +gimple_eh_else_set_n_body (geh_else *eh_else_stmt, gimple_seq seq) { - gimple_statement_eh_else *eh_else_stmt = - as_a (gs); eh_else_stmt->n_body = seq; } static inline void -gimple_eh_else_set_e_body (gimple gs, gimple_seq seq) +gimple_eh_else_set_e_body (geh_else *eh_else_stmt, gimple_seq seq) { - gimple_statement_eh_else *eh_else_stmt = - as_a (gs); eh_else_stmt->e_body = seq; } @@ -3722,9 +3760,8 @@ gimple_try_kind (const_gimple gs) /* Set the kind of try block represented by GIMPLE_TRY GS. */ static inline void -gimple_try_set_kind (gimple gs, enum gimple_try_flags kind) +gimple_try_set_kind (gtry *gs, enum gimple_try_flags kind) { - GIMPLE_CHECK (gs, GIMPLE_TRY); gcc_gimple_checking_assert (kind == GIMPLE_TRY_CATCH || kind == GIMPLE_TRY_FINALLY); if (gimple_try_kind (gs) != kind) @@ -3748,7 +3785,7 @@ gimple_try_catch_is_cleanup (const_gimple gs) static inline gimple_seq * gimple_try_eval_ptr (gimple gs) { - gimple_statement_try *try_stmt = as_a (gs); + gtry *try_stmt = as_a (gs); return &try_stmt->eval; } @@ -3768,7 +3805,7 @@ gimple_try_eval (gimple gs) static inline gimple_seq * gimple_try_cleanup_ptr (gimple gs) { - gimple_statement_try *try_stmt = as_a (gs); + gtry *try_stmt = as_a (gs); return &try_stmt->cleanup; } @@ -3786,7 +3823,7 @@ gimple_try_cleanup (gimple gs) /* Set the GIMPLE_TRY_CATCH_IS_CLEANUP flag. */ static inline void -gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup) +gimple_try_set_catch_is_cleanup (gtry *g, bool catch_is_cleanup) { gcc_gimple_checking_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH); if (catch_is_cleanup) @@ -3797,23 +3834,21 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup) /* Set EVAL to be the sequence of statements to use as the body for - GIMPLE_TRY GS. */ + GIMPLE_TRY TRY_STMT. */ static inline void -gimple_try_set_eval (gimple gs, gimple_seq eval) +gimple_try_set_eval (gtry *try_stmt, gimple_seq eval) { - gimple_statement_try *try_stmt = as_a (gs); try_stmt->eval = eval; } /* Set CLEANUP to be the sequence of statements to use as the cleanup - body for GIMPLE_TRY GS. */ + body for GIMPLE_TRY TRY_STMT. */ static inline void -gimple_try_set_cleanup (gimple gs, gimple_seq cleanup) +gimple_try_set_cleanup (gtry *try_stmt, gimple_seq cleanup) { - gimple_statement_try *try_stmt = as_a (gs); try_stmt->cleanup = cleanup; } @@ -3872,8 +3907,7 @@ gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p) static inline unsigned gimple_phi_capacity (const_gimple gs) { - const gimple_statement_phi *phi_stmt = - as_a (gs); + const gphi *phi_stmt = as_a (gs); return phi_stmt->capacity; } @@ -3885,8 +3919,7 @@ gimple_phi_capacity (const_gimple gs) static inline unsigned gimple_phi_num_args (const_gimple gs) { - const gimple_statement_phi *phi_stmt = - as_a (gs); + const gphi *phi_stmt = as_a (gs); return phi_stmt->nargs; } @@ -3896,8 +3929,7 @@ gimple_phi_num_args (const_gimple gs) static inline tree gimple_phi_result (const_gimple gs) { - const gimple_statement_phi *phi_stmt = - as_a (gs); + const gphi *phi_stmt = as_a (gs); return phi_stmt->result; } @@ -3906,19 +3938,18 @@ gimple_phi_result (const_gimple gs) static inline tree * gimple_phi_result_ptr (gimple gs) { - gimple_statement_phi *phi_stmt = as_a (gs); + gphi *phi_stmt = as_a (gs); return &phi_stmt->result; } -/* Set RESULT to be the SSA name created by GIMPLE_PHI GS. */ +/* Set RESULT to be the SSA name created by GIMPLE_PHI PHI. */ static inline void -gimple_phi_set_result (gimple gs, tree result) +gimple_phi_set_result (gphi *phi, tree result) { - gimple_statement_phi *phi_stmt = as_a (gs); - phi_stmt->result = result; + phi->result = result; if (result && TREE_CODE (result) == SSA_NAME) - SSA_NAME_DEF_STMT (result) = gs; + SSA_NAME_DEF_STMT (result) = phi; } @@ -3928,20 +3959,19 @@ gimple_phi_set_result (gimple gs, tree result) static inline struct phi_arg_d * gimple_phi_arg (gimple gs, unsigned index) { - gimple_statement_phi *phi_stmt = as_a (gs); + gphi *phi_stmt = as_a (gs); gcc_gimple_checking_assert (index <= phi_stmt->capacity); return &(phi_stmt->args[index]); } /* Set PHIARG to be the argument corresponding to incoming edge INDEX - for GIMPLE_PHI GS. */ + for GIMPLE_PHI PHI. */ static inline void -gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg) +gimple_phi_set_arg (gphi *phi, unsigned index, struct phi_arg_d * phiarg) { - gimple_statement_phi *phi_stmt = as_a (gs); - gcc_gimple_checking_assert (index <= phi_stmt->nargs); - phi_stmt->args[index] = *phiarg; + gcc_gimple_checking_assert (index <= phi->nargs); + phi->args[index] = *phiarg; } /* Return the PHI nodes for basic block BB, or NULL if there are no @@ -3972,98 +4002,92 @@ gimple_phi_arg_def (gimple gs, size_t index) } -/* Return a pointer to the tree operand for argument I of PHI node GS. */ +/* Return a pointer to the tree operand for argument I of phi node PHI. */ static inline tree * -gimple_phi_arg_def_ptr (gimple gs, size_t index) +gimple_phi_arg_def_ptr (gphi *phi, size_t index) { - return &gimple_phi_arg (gs, index)->def; + return &gimple_phi_arg (phi, index)->def; } -/* Return the edge associated with argument I of phi node GS. */ +/* Return the edge associated with argument I of phi node PHI. */ static inline edge -gimple_phi_arg_edge (gimple gs, size_t i) +gimple_phi_arg_edge (gphi *phi, size_t i) { - return EDGE_PRED (gimple_bb (gs), i); + return EDGE_PRED (gimple_bb (phi), i); } -/* Return the source location of gimple argument I of phi node GS. */ +/* Return the source location of gimple argument I of phi node PHI. */ static inline source_location -gimple_phi_arg_location (gimple gs, size_t i) +gimple_phi_arg_location (gphi *phi, size_t i) { - return gimple_phi_arg (gs, i)->locus; + return gimple_phi_arg (phi, i)->locus; } -/* Return the source location of the argument on edge E of phi node GS. */ +/* Return the source location of the argument on edge E of phi node PHI. */ static inline source_location -gimple_phi_arg_location_from_edge (gimple gs, edge e) +gimple_phi_arg_location_from_edge (gphi *phi, edge e) { - return gimple_phi_arg (gs, e->dest_idx)->locus; + return gimple_phi_arg (phi, e->dest_idx)->locus; } -/* Set the source location of gimple argument I of phi node GS to LOC. */ +/* Set the source location of gimple argument I of phi node PHI to LOC. */ static inline void -gimple_phi_arg_set_location (gimple gs, size_t i, source_location loc) +gimple_phi_arg_set_location (gphi *phi, size_t i, source_location loc) { - gimple_phi_arg (gs, i)->locus = loc; + gimple_phi_arg (phi, i)->locus = loc; } -/* Return TRUE if argument I of phi node GS has a location record. */ +/* Return TRUE if argument I of phi node PHI has a location record. */ static inline bool -gimple_phi_arg_has_location (gimple gs, size_t i) +gimple_phi_arg_has_location (gphi *phi, size_t i) { - return gimple_phi_arg_location (gs, i) != UNKNOWN_LOCATION; + return gimple_phi_arg_location (phi, i) != UNKNOWN_LOCATION; } -/* Return the region number for GIMPLE_RESX GS. */ +/* Return the region number for GIMPLE_RESX RESX_STMT. */ static inline int -gimple_resx_region (const_gimple gs) +gimple_resx_region (const gresx *resx_stmt) { - const gimple_statement_resx *resx_stmt = - as_a (gs); return resx_stmt->region; } -/* Set REGION to be the region number for GIMPLE_RESX GS. */ +/* Set REGION to be the region number for GIMPLE_RESX RESX_STMT. */ static inline void -gimple_resx_set_region (gimple gs, int region) +gimple_resx_set_region (gresx *resx_stmt, int region) { - gimple_statement_resx *resx_stmt = as_a (gs); resx_stmt->region = region; } -/* Return the region number for GIMPLE_EH_DISPATCH GS. */ +/* Return the region number for GIMPLE_EH_DISPATCH EH_DISPATCH_STMT. */ static inline int -gimple_eh_dispatch_region (const_gimple gs) +gimple_eh_dispatch_region (const geh_dispatch *eh_dispatch_stmt) { - const gimple_statement_eh_dispatch *eh_dispatch_stmt = - as_a (gs); return eh_dispatch_stmt->region; } -/* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS. */ +/* Set REGION to be the region number for GIMPLE_EH_DISPATCH + EH_DISPATCH_STMT. */ static inline void -gimple_eh_dispatch_set_region (gimple gs, int region) +gimple_eh_dispatch_set_region (geh_dispatch *eh_dispatch_stmt, int region) { - gimple_statement_eh_dispatch *eh_dispatch_stmt = - as_a (gs); eh_dispatch_stmt->region = region; } /* Return the number of labels associated with the switch statement GS. */ static inline unsigned -gimple_switch_num_labels (const_gimple gs) +gimple_switch_num_labels (const gswitch *gs) { unsigned num_ops; GIMPLE_CHECK (gs, GIMPLE_SWITCH); @@ -4076,7 +4100,7 @@ gimple_switch_num_labels (const_gimple gs) /* Set NLABELS to be the number of labels for the switch statement GS. */ static inline void -gimple_switch_set_num_labels (gimple g, unsigned nlabels) +gimple_switch_set_num_labels (gswitch *g, unsigned nlabels) { GIMPLE_CHECK (g, GIMPLE_SWITCH); gimple_set_num_ops (g, nlabels + 1); @@ -4086,9 +4110,8 @@ gimple_switch_set_num_labels (gimple g, unsigned nlabels) /* Return the index variable used by the switch statement GS. */ static inline tree -gimple_switch_index (const_gimple gs) +gimple_switch_index (const gswitch *gs) { - GIMPLE_CHECK (gs, GIMPLE_SWITCH); return gimple_op (gs, 0); } @@ -4096,9 +4119,8 @@ gimple_switch_index (const_gimple gs) /* Return a pointer to the index variable for the switch statement GS. */ static inline tree * -gimple_switch_index_ptr (const_gimple gs) +gimple_switch_index_ptr (const gswitch *gs) { - GIMPLE_CHECK (gs, GIMPLE_SWITCH); return gimple_op_ptr (gs, 0); } @@ -4106,7 +4128,7 @@ gimple_switch_index_ptr (const_gimple gs) /* Set INDEX to be the index variable for switch statement GS. */ static inline void -gimple_switch_set_index (gimple gs, tree index) +gimple_switch_set_index (gswitch *gs, tree index) { GIMPLE_CHECK (gs, GIMPLE_SWITCH); gcc_gimple_checking_assert (SSA_VAR_P (index) || CONSTANT_CLASS_P (index)); @@ -4118,7 +4140,7 @@ gimple_switch_set_index (gimple gs, tree index) labels in a switch statement. */ static inline tree -gimple_switch_label (const_gimple gs, unsigned index) +gimple_switch_label (const gswitch *gs, unsigned index) { GIMPLE_CHECK (gs, GIMPLE_SWITCH); gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 1); @@ -4128,7 +4150,7 @@ gimple_switch_label (const_gimple gs, unsigned index) /* Set the label number INDEX to LABEL. 0 is always the default label. */ static inline void -gimple_switch_set_label (gimple gs, unsigned index, tree label) +gimple_switch_set_label (gswitch *gs, unsigned index, tree label) { GIMPLE_CHECK (gs, GIMPLE_SWITCH); gcc_gimple_checking_assert (gimple_num_ops (gs) > index + 1 @@ -4140,7 +4162,7 @@ gimple_switch_set_label (gimple gs, unsigned index, tree label) /* Return the default label for a switch statement. */ static inline tree -gimple_switch_default_label (const_gimple gs) +gimple_switch_default_label (const gswitch *gs) { tree label = gimple_switch_label (gs, 0); gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label)); @@ -4150,7 +4172,7 @@ gimple_switch_default_label (const_gimple gs) /* Set the default label for a switch statement. */ static inline void -gimple_switch_set_default_label (gimple gs, tree label) +gimple_switch_set_default_label (gswitch *gs, tree label) { gcc_checking_assert (!CASE_LOW (label) && !CASE_HIGH (label)); gimple_switch_set_label (gs, 0, label); @@ -4362,36 +4384,30 @@ gimple_omp_set_body (gimple gs, gimple_seq body) } -/* Return the name associated with OMP_CRITICAL statement GS. */ +/* Return the name associated with OMP_CRITICAL statement CRIT_STMT. */ static inline tree -gimple_omp_critical_name (const_gimple gs) +gimple_omp_critical_name (const gomp_critical *crit_stmt) { - const gimple_statement_omp_critical *omp_critical_stmt = - as_a (gs); - return omp_critical_stmt->name; + return crit_stmt->name; } /* Return a pointer to the name associated with OMP critical statement GS. */ static inline tree * -gimple_omp_critical_name_ptr (gimple gs) +gimple_omp_critical_name_ptr (gomp_critical *crit_stmt) { - gimple_statement_omp_critical *omp_critical_stmt = - as_a (gs); - return &omp_critical_stmt->name; + return &crit_stmt->name; } /* Set NAME to be the name associated with OMP critical statement GS. */ static inline void -gimple_omp_critical_set_name (gimple gs, tree name) +gimple_omp_critical_set_name (gomp_critical *crit_stmt, tree name) { - gimple_statement_omp_critical *omp_critical_stmt = - as_a (gs); - omp_critical_stmt->name = name; + crit_stmt->name = name; } @@ -4408,9 +4424,8 @@ gimple_omp_for_kind (const_gimple g) /* Set the OMP for kind. */ static inline void -gimple_omp_for_set_kind (gimple g, int kind) +gimple_omp_for_set_kind (gomp_for *g, int kind) { - GIMPLE_CHECK (g, GIMPLE_OMP_FOR); g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK) | (kind & GF_OMP_FOR_KIND_MASK); } @@ -4431,9 +4446,8 @@ gimple_omp_for_combined_p (const_gimple g) value of COMBINED_P. */ static inline void -gimple_omp_for_set_combined_p (gimple g, bool combined_p) +gimple_omp_for_set_combined_p (gomp_for *g, bool combined_p) { - GIMPLE_CHECK (g, GIMPLE_OMP_FOR); if (combined_p) g->subcode |= GF_OMP_FOR_COMBINED; else @@ -4456,9 +4470,8 @@ gimple_omp_for_combined_into_p (const_gimple g) value of COMBINED_P. */ static inline void -gimple_omp_for_set_combined_into_p (gimple g, bool combined_p) +gimple_omp_for_set_combined_into_p (gomp_for *g, bool combined_p) { - GIMPLE_CHECK (g, GIMPLE_OMP_FOR); if (combined_p) g->subcode |= GF_OMP_FOR_COMBINED_INTO; else @@ -4471,8 +4484,7 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p) static inline tree gimple_omp_for_clauses (const_gimple gs) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); return omp_for_stmt->clauses; } @@ -4482,8 +4494,7 @@ gimple_omp_for_clauses (const_gimple gs) static inline tree * gimple_omp_for_clauses_ptr (gimple gs) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); return &omp_for_stmt->clauses; } @@ -4493,8 +4504,7 @@ gimple_omp_for_clauses_ptr (gimple gs) static inline void gimple_omp_for_set_clauses (gimple gs, tree clauses) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); omp_for_stmt->clauses = clauses; } @@ -4504,8 +4514,7 @@ gimple_omp_for_set_clauses (gimple gs, tree clauses) static inline size_t gimple_omp_for_collapse (gimple gs) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); return omp_for_stmt->collapse; } @@ -4515,8 +4524,7 @@ gimple_omp_for_collapse (gimple gs) static inline tree gimple_omp_for_index (const_gimple gs, size_t i) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return omp_for_stmt->iter[i].index; } @@ -4527,8 +4535,7 @@ gimple_omp_for_index (const_gimple gs, size_t i) static inline tree * gimple_omp_for_index_ptr (gimple gs, size_t i) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return &omp_for_stmt->iter[i].index; } @@ -4539,8 +4546,7 @@ gimple_omp_for_index_ptr (gimple gs, size_t i) static inline void gimple_omp_for_set_index (gimple gs, size_t i, tree index) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); omp_for_stmt->iter[i].index = index; } @@ -4551,8 +4557,7 @@ gimple_omp_for_set_index (gimple gs, size_t i, tree index) static inline tree gimple_omp_for_initial (const_gimple gs, size_t i) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return omp_for_stmt->iter[i].initial; } @@ -4563,8 +4568,7 @@ gimple_omp_for_initial (const_gimple gs, size_t i) static inline tree * gimple_omp_for_initial_ptr (gimple gs, size_t i) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return &omp_for_stmt->iter[i].initial; } @@ -4575,8 +4579,7 @@ gimple_omp_for_initial_ptr (gimple gs, size_t i) static inline void gimple_omp_for_set_initial (gimple gs, size_t i, tree initial) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); omp_for_stmt->iter[i].initial = initial; } @@ -4587,8 +4590,7 @@ gimple_omp_for_set_initial (gimple gs, size_t i, tree initial) static inline tree gimple_omp_for_final (const_gimple gs, size_t i) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return omp_for_stmt->iter[i].final; } @@ -4599,8 +4601,7 @@ gimple_omp_for_final (const_gimple gs, size_t i) static inline tree * gimple_omp_for_final_ptr (gimple gs, size_t i) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return &omp_for_stmt->iter[i].final; } @@ -4611,8 +4612,7 @@ gimple_omp_for_final_ptr (gimple gs, size_t i) static inline void gimple_omp_for_set_final (gimple gs, size_t i, tree final) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); omp_for_stmt->iter[i].final = final; } @@ -4623,8 +4623,7 @@ gimple_omp_for_set_final (gimple gs, size_t i, tree final) static inline tree gimple_omp_for_incr (const_gimple gs, size_t i) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return omp_for_stmt->iter[i].incr; } @@ -4635,8 +4634,7 @@ gimple_omp_for_incr (const_gimple gs, size_t i) static inline tree * gimple_omp_for_incr_ptr (gimple gs, size_t i) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return &omp_for_stmt->iter[i].incr; } @@ -4647,8 +4645,7 @@ gimple_omp_for_incr_ptr (gimple gs, size_t i) static inline void gimple_omp_for_set_incr (gimple gs, size_t i, tree incr) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); omp_for_stmt->iter[i].incr = incr; } @@ -4660,8 +4657,7 @@ gimple_omp_for_set_incr (gimple gs, size_t i, tree incr) static inline gimple_seq * gimple_omp_for_pre_body_ptr (gimple gs) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); return &omp_for_stmt->pre_body; } @@ -4682,8 +4678,7 @@ gimple_omp_for_pre_body (gimple gs) static inline void gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); omp_for_stmt->pre_body = pre_body; } @@ -4693,98 +4688,83 @@ gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body) static inline tree gimple_omp_parallel_clauses (const_gimple gs) { - const gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); + const gomp_parallel *omp_parallel_stmt = as_a (gs); return omp_parallel_stmt->clauses; } -/* Return a pointer to the clauses associated with OMP_PARALLEL GS. */ +/* Return a pointer to the clauses associated with OMP_PARALLEL_STMT. */ static inline tree * -gimple_omp_parallel_clauses_ptr (gimple gs) +gimple_omp_parallel_clauses_ptr (gomp_parallel *omp_parallel_stmt) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); return &omp_parallel_stmt->clauses; } -/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL - GS. */ +/* Set CLAUSES to be the list of clauses associated with OMP_PARALLEL_STMT. */ static inline void -gimple_omp_parallel_set_clauses (gimple gs, tree clauses) +gimple_omp_parallel_set_clauses (gomp_parallel *omp_parallel_stmt, + tree clauses) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); omp_parallel_stmt->clauses = clauses; } -/* Return the child function used to hold the body of OMP_PARALLEL GS. */ +/* Return the child function used to hold the body of OMP_PARALLEL_STMT. */ static inline tree -gimple_omp_parallel_child_fn (const_gimple gs) +gimple_omp_parallel_child_fn (const gomp_parallel *omp_parallel_stmt) { - const gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); return omp_parallel_stmt->child_fn; } /* Return a pointer to the child function used to hold the body of - OMP_PARALLEL GS. */ + OMP_PARALLEL_STMT. */ static inline tree * -gimple_omp_parallel_child_fn_ptr (gimple gs) +gimple_omp_parallel_child_fn_ptr (gomp_parallel *omp_parallel_stmt) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); return &omp_parallel_stmt->child_fn; } -/* Set CHILD_FN to be the child function for OMP_PARALLEL GS. */ +/* Set CHILD_FN to be the child function for OMP_PARALLEL_STMT. */ static inline void -gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn) +gimple_omp_parallel_set_child_fn (gomp_parallel *omp_parallel_stmt, + tree child_fn) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); omp_parallel_stmt->child_fn = child_fn; } /* Return the artificial argument used to send variables and values - from the parent to the children threads in OMP_PARALLEL GS. */ + from the parent to the children threads in OMP_PARALLEL_STMT. */ static inline tree -gimple_omp_parallel_data_arg (const_gimple gs) +gimple_omp_parallel_data_arg (const gomp_parallel *omp_parallel_stmt) { - const gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); return omp_parallel_stmt->data_arg; } -/* Return a pointer to the data argument for OMP_PARALLEL GS. */ +/* Return a pointer to the data argument for OMP_PARALLEL_STMT. */ static inline tree * -gimple_omp_parallel_data_arg_ptr (gimple gs) +gimple_omp_parallel_data_arg_ptr (gomp_parallel *omp_parallel_stmt) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); return &omp_parallel_stmt->data_arg; } -/* Set DATA_ARG to be the data argument for OMP_PARALLEL GS. */ +/* Set DATA_ARG to be the data argument for OMP_PARALLEL_STMT. */ static inline void -gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg) +gimple_omp_parallel_set_data_arg (gomp_parallel *omp_parallel_stmt, + tree data_arg) { - gimple_statement_omp_parallel *omp_parallel_stmt = - as_a (gs); omp_parallel_stmt->data_arg = data_arg; } @@ -4794,8 +4774,7 @@ gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg) static inline tree gimple_omp_task_clauses (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->clauses; } @@ -4805,8 +4784,7 @@ gimple_omp_task_clauses (const_gimple gs) static inline tree * gimple_omp_task_clauses_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->clauses; } @@ -4817,8 +4795,7 @@ gimple_omp_task_clauses_ptr (gimple gs) static inline void gimple_omp_task_set_clauses (gimple gs, tree clauses) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->clauses = clauses; } @@ -4828,8 +4805,7 @@ gimple_omp_task_set_clauses (gimple gs, tree clauses) static inline tree gimple_omp_task_child_fn (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->child_fn; } @@ -4839,8 +4815,7 @@ gimple_omp_task_child_fn (const_gimple gs) static inline tree * gimple_omp_task_child_fn_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->child_fn; } @@ -4850,8 +4825,7 @@ gimple_omp_task_child_fn_ptr (gimple gs) static inline void gimple_omp_task_set_child_fn (gimple gs, tree child_fn) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->child_fn = child_fn; } @@ -4862,8 +4836,7 @@ gimple_omp_task_set_child_fn (gimple gs, tree child_fn) static inline tree gimple_omp_task_data_arg (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->data_arg; } @@ -4873,8 +4846,7 @@ gimple_omp_task_data_arg (const_gimple gs) static inline tree * gimple_omp_task_data_arg_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->data_arg; } @@ -4884,8 +4856,7 @@ gimple_omp_task_data_arg_ptr (gimple gs) static inline void gimple_omp_task_set_data_arg (gimple gs, tree data_arg) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->data_arg = data_arg; } @@ -4895,8 +4866,8 @@ gimple_omp_task_set_data_arg (gimple gs, tree data_arg) static inline tree gimple_omp_taskreg_clauses (const_gimple gs) { - const gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + const gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return omp_taskreg_stmt->clauses; } @@ -4906,8 +4877,8 @@ gimple_omp_taskreg_clauses (const_gimple gs) static inline tree * gimple_omp_taskreg_clauses_ptr (gimple gs) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return &omp_taskreg_stmt->clauses; } @@ -4918,8 +4889,8 @@ gimple_omp_taskreg_clauses_ptr (gimple gs) static inline void gimple_omp_taskreg_set_clauses (gimple gs, tree clauses) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); omp_taskreg_stmt->clauses = clauses; } @@ -4929,8 +4900,8 @@ gimple_omp_taskreg_set_clauses (gimple gs, tree clauses) static inline tree gimple_omp_taskreg_child_fn (const_gimple gs) { - const gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + const gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return omp_taskreg_stmt->child_fn; } @@ -4940,8 +4911,8 @@ gimple_omp_taskreg_child_fn (const_gimple gs) static inline tree * gimple_omp_taskreg_child_fn_ptr (gimple gs) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return &omp_taskreg_stmt->child_fn; } @@ -4951,8 +4922,8 @@ gimple_omp_taskreg_child_fn_ptr (gimple gs) static inline void gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); omp_taskreg_stmt->child_fn = child_fn; } @@ -4963,8 +4934,8 @@ gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn) static inline tree gimple_omp_taskreg_data_arg (const_gimple gs) { - const gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + const gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return omp_taskreg_stmt->data_arg; } @@ -4974,8 +4945,8 @@ gimple_omp_taskreg_data_arg (const_gimple gs) static inline tree * gimple_omp_taskreg_data_arg_ptr (gimple gs) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); return &omp_taskreg_stmt->data_arg; } @@ -4985,8 +4956,8 @@ gimple_omp_taskreg_data_arg_ptr (gimple gs) static inline void gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg) { - gimple_statement_omp_taskreg *omp_taskreg_stmt = - as_a (gs); + gimple_statement_omp_taskreg *omp_taskreg_stmt + = as_a (gs); omp_taskreg_stmt->data_arg = data_arg; } @@ -4996,8 +4967,7 @@ gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg) static inline tree gimple_omp_task_copy_fn (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->copy_fn; } @@ -5007,8 +4977,7 @@ gimple_omp_task_copy_fn (const_gimple gs) static inline tree * gimple_omp_task_copy_fn_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->copy_fn; } @@ -5018,8 +4987,7 @@ gimple_omp_task_copy_fn_ptr (gimple gs) static inline void gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->copy_fn = copy_fn; } @@ -5029,8 +4997,7 @@ gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn) static inline tree gimple_omp_task_arg_size (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->arg_size; } @@ -5040,8 +5007,7 @@ gimple_omp_task_arg_size (const_gimple gs) static inline tree * gimple_omp_task_arg_size_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->arg_size; } @@ -5051,8 +5017,7 @@ gimple_omp_task_arg_size_ptr (gimple gs) static inline void gimple_omp_task_set_arg_size (gimple gs, tree arg_size) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->arg_size = arg_size; } @@ -5062,8 +5027,7 @@ gimple_omp_task_set_arg_size (gimple gs, tree arg_size) static inline tree gimple_omp_task_arg_align (const_gimple gs) { - const gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + const gomp_task *omp_task_stmt = as_a (gs); return omp_task_stmt->arg_align; } @@ -5073,8 +5037,7 @@ gimple_omp_task_arg_align (const_gimple gs) static inline tree * gimple_omp_task_arg_align_ptr (gimple gs) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); return &omp_task_stmt->arg_align; } @@ -5084,8 +5047,7 @@ gimple_omp_task_arg_align_ptr (gimple gs) static inline void gimple_omp_task_set_arg_align (gimple gs, tree arg_align) { - gimple_statement_omp_task *omp_task_stmt = - as_a (gs); + gomp_task *omp_task_stmt = as_a (gs); omp_task_stmt->arg_align = arg_align; } @@ -5095,8 +5057,7 @@ gimple_omp_task_set_arg_align (gimple gs, tree arg_align) static inline tree gimple_omp_single_clauses (const_gimple gs) { - const gimple_statement_omp_single *omp_single_stmt = - as_a (gs); + const gomp_single *omp_single_stmt = as_a (gs); return omp_single_stmt->clauses; } @@ -5106,19 +5067,16 @@ gimple_omp_single_clauses (const_gimple gs) static inline tree * gimple_omp_single_clauses_ptr (gimple gs) { - gimple_statement_omp_single *omp_single_stmt = - as_a (gs); + gomp_single *omp_single_stmt = as_a (gs); return &omp_single_stmt->clauses; } -/* Set CLAUSES to be the clauses associated with OMP_SINGLE GS. */ +/* Set CLAUSES to be the clauses associated with OMP_SINGLE_STMT. */ static inline void -gimple_omp_single_set_clauses (gimple gs, tree clauses) +gimple_omp_single_set_clauses (gomp_single *omp_single_stmt, tree clauses) { - gimple_statement_omp_single *omp_single_stmt = - as_a (gs); omp_single_stmt->clauses = clauses; } @@ -5128,8 +5086,7 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses) static inline tree gimple_omp_target_clauses (const_gimple gs) { - const gimple_statement_omp_target *omp_target_stmt = - as_a (gs); + const gomp_target *omp_target_stmt = as_a (gs); return omp_target_stmt->clauses; } @@ -5139,19 +5096,17 @@ gimple_omp_target_clauses (const_gimple gs) static inline tree * gimple_omp_target_clauses_ptr (gimple gs) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); + gomp_target *omp_target_stmt = as_a (gs); return &omp_target_stmt->clauses; } -/* Set CLAUSES to be the clauses associated with OMP_TARGET GS. */ +/* Set CLAUSES to be the clauses associated with OMP_TARGET_STMT. */ static inline void -gimple_omp_target_set_clauses (gimple gs, tree clauses) +gimple_omp_target_set_clauses (gomp_target *omp_target_stmt, + tree clauses) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); omp_target_stmt->clauses = clauses; } @@ -5169,55 +5124,47 @@ gimple_omp_target_kind (const_gimple g) /* Set the OMP target kind. */ static inline void -gimple_omp_target_set_kind (gimple g, int kind) +gimple_omp_target_set_kind (gomp_target *g, int kind) { - GIMPLE_CHECK (g, GIMPLE_OMP_TARGET); g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK) | (kind & GF_OMP_TARGET_KIND_MASK); } -/* Return the child function used to hold the body of OMP_TARGET GS. */ +/* Return the child function used to hold the body of OMP_TARGET_STMT. */ static inline tree -gimple_omp_target_child_fn (const_gimple gs) +gimple_omp_target_child_fn (const gomp_target *omp_target_stmt) { - const gimple_statement_omp_target *omp_target_stmt = - as_a (gs); return omp_target_stmt->child_fn; } /* Return a pointer to the child function used to hold the body of - OMP_TARGET GS. */ + OMP_TARGET_STMT. */ static inline tree * -gimple_omp_target_child_fn_ptr (gimple gs) +gimple_omp_target_child_fn_ptr (gomp_target *omp_target_stmt) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); return &omp_target_stmt->child_fn; } -/* Set CHILD_FN to be the child function for OMP_TARGET GS. */ +/* Set CHILD_FN to be the child function for OMP_TARGET_STMT. */ static inline void -gimple_omp_target_set_child_fn (gimple gs, tree child_fn) +gimple_omp_target_set_child_fn (gomp_target *omp_target_stmt, + tree child_fn) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); omp_target_stmt->child_fn = child_fn; } /* Return the artificial argument used to send variables and values - from the parent to the children threads in OMP_TARGET GS. */ + from the parent to the children threads in OMP_TARGET_STMT. */ static inline tree -gimple_omp_target_data_arg (const_gimple gs) +gimple_omp_target_data_arg (const gomp_target *omp_target_stmt) { - const gimple_statement_omp_target *omp_target_stmt = - as_a (gs); return omp_target_stmt->data_arg; } @@ -5225,21 +5172,18 @@ gimple_omp_target_data_arg (const_gimple gs) /* Return a pointer to the data argument for OMP_TARGET GS. */ static inline tree * -gimple_omp_target_data_arg_ptr (gimple gs) +gimple_omp_target_data_arg_ptr (gomp_target *omp_target_stmt) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); return &omp_target_stmt->data_arg; } -/* Set DATA_ARG to be the data argument for OMP_TARGET GS. */ +/* Set DATA_ARG to be the data argument for OMP_TARGET_STMT. */ static inline void -gimple_omp_target_set_data_arg (gimple gs, tree data_arg) +gimple_omp_target_set_data_arg (gomp_target *omp_target_stmt, + tree data_arg) { - gimple_statement_omp_target *omp_target_stmt = - as_a (gs); omp_target_stmt->data_arg = data_arg; } @@ -5249,8 +5193,7 @@ gimple_omp_target_set_data_arg (gimple gs, tree data_arg) static inline tree gimple_omp_teams_clauses (const_gimple gs) { - const gimple_statement_omp_teams *omp_teams_stmt = - as_a (gs); + const gomp_teams *omp_teams_stmt = as_a (gs); return omp_teams_stmt->clauses; } @@ -5260,19 +5203,16 @@ gimple_omp_teams_clauses (const_gimple gs) static inline tree * gimple_omp_teams_clauses_ptr (gimple gs) { - gimple_statement_omp_teams *omp_teams_stmt = - as_a (gs); + gomp_teams *omp_teams_stmt = as_a (gs); return &omp_teams_stmt->clauses; } -/* Set CLAUSES to be the clauses associated with OMP_TEAMS GS. */ +/* Set CLAUSES to be the clauses associated with OMP_TEAMS_STMT. */ static inline void -gimple_omp_teams_set_clauses (gimple gs, tree clauses) +gimple_omp_teams_set_clauses (gomp_teams *omp_teams_stmt, tree clauses) { - gimple_statement_omp_teams *omp_teams_stmt = - as_a (gs); omp_teams_stmt->clauses = clauses; } @@ -5282,8 +5222,7 @@ gimple_omp_teams_set_clauses (gimple gs, tree clauses) static inline tree gimple_omp_sections_clauses (const_gimple gs) { - const gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + const gomp_sections *omp_sections_stmt = as_a (gs); return omp_sections_stmt->clauses; } @@ -5293,8 +5232,7 @@ gimple_omp_sections_clauses (const_gimple gs) static inline tree * gimple_omp_sections_clauses_ptr (gimple gs) { - gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + gomp_sections *omp_sections_stmt = as_a (gs); return &omp_sections_stmt->clauses; } @@ -5305,8 +5243,7 @@ gimple_omp_sections_clauses_ptr (gimple gs) static inline void gimple_omp_sections_set_clauses (gimple gs, tree clauses) { - gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + gomp_sections *omp_sections_stmt = as_a (gs); omp_sections_stmt->clauses = clauses; } @@ -5317,8 +5254,7 @@ gimple_omp_sections_set_clauses (gimple gs, tree clauses) static inline tree gimple_omp_sections_control (const_gimple gs) { - const gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + const gomp_sections *omp_sections_stmt = as_a (gs); return omp_sections_stmt->control; } @@ -5329,8 +5265,7 @@ gimple_omp_sections_control (const_gimple gs) static inline tree * gimple_omp_sections_control_ptr (gimple gs) { - gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + gomp_sections *omp_sections_stmt = as_a (gs); return &omp_sections_stmt->control; } @@ -5341,8 +5276,7 @@ gimple_omp_sections_control_ptr (gimple gs) static inline void gimple_omp_sections_set_control (gimple gs, tree control) { - gimple_statement_omp_sections *omp_sections_stmt = - as_a (gs); + gomp_sections *omp_sections_stmt = as_a (gs); omp_sections_stmt->control = control; } @@ -5352,8 +5286,7 @@ gimple_omp_sections_set_control (gimple gs, tree control) static inline void gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond) { - gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (TREE_CODE_CLASS (cond) == tcc_comparison && i < omp_for_stmt->collapse); omp_for_stmt->iter[i].cond = cond; @@ -5365,8 +5298,7 @@ gimple_omp_for_set_cond (gimple gs, size_t i, enum tree_code cond) static inline enum tree_code gimple_omp_for_cond (const_gimple gs, size_t i) { - const gimple_statement_omp_for *omp_for_stmt = - as_a (gs); + const gomp_for *omp_for_stmt = as_a (gs); gcc_gimple_checking_assert (i < omp_for_stmt->collapse); return omp_for_stmt->iter[i].cond; } @@ -5375,255 +5307,215 @@ gimple_omp_for_cond (const_gimple gs, size_t i) /* Set the value being stored in an atomic store. */ static inline void -gimple_omp_atomic_store_set_val (gimple g, tree val) +gimple_omp_atomic_store_set_val (gomp_atomic_store *store_stmt, tree val) { - gimple_statement_omp_atomic_store *omp_atomic_store_stmt = - as_a (g); - omp_atomic_store_stmt->val = val; + store_stmt->val = val; } /* Return the value being stored in an atomic store. */ static inline tree -gimple_omp_atomic_store_val (const_gimple g) +gimple_omp_atomic_store_val (const gomp_atomic_store *store_stmt) { - const gimple_statement_omp_atomic_store *omp_atomic_store_stmt = - as_a (g); - return omp_atomic_store_stmt->val; + return store_stmt->val; } /* Return a pointer to the value being stored in an atomic store. */ static inline tree * -gimple_omp_atomic_store_val_ptr (gimple g) +gimple_omp_atomic_store_val_ptr (gomp_atomic_store *store_stmt) { - gimple_statement_omp_atomic_store *omp_atomic_store_stmt = - as_a (g); - return &omp_atomic_store_stmt->val; + return &store_stmt->val; } /* Set the LHS of an atomic load. */ static inline void -gimple_omp_atomic_load_set_lhs (gimple g, tree lhs) +gimple_omp_atomic_load_set_lhs (gomp_atomic_load *load_stmt, tree lhs) { - gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - omp_atomic_load_stmt->lhs = lhs; + load_stmt->lhs = lhs; } /* Get the LHS of an atomic load. */ static inline tree -gimple_omp_atomic_load_lhs (const_gimple g) +gimple_omp_atomic_load_lhs (const gomp_atomic_load *load_stmt) { - const gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - return omp_atomic_load_stmt->lhs; + return load_stmt->lhs; } /* Return a pointer to the LHS of an atomic load. */ static inline tree * -gimple_omp_atomic_load_lhs_ptr (gimple g) +gimple_omp_atomic_load_lhs_ptr (gomp_atomic_load *load_stmt) { - gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - return &omp_atomic_load_stmt->lhs; + return &load_stmt->lhs; } /* Set the RHS of an atomic load. */ static inline void -gimple_omp_atomic_load_set_rhs (gimple g, tree rhs) +gimple_omp_atomic_load_set_rhs (gomp_atomic_load *load_stmt, tree rhs) { - gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - omp_atomic_load_stmt->rhs = rhs; + load_stmt->rhs = rhs; } /* Get the RHS of an atomic load. */ static inline tree -gimple_omp_atomic_load_rhs (const_gimple g) +gimple_omp_atomic_load_rhs (const gomp_atomic_load *load_stmt) { - const gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - return omp_atomic_load_stmt->rhs; + return load_stmt->rhs; } /* Return a pointer to the RHS of an atomic load. */ static inline tree * -gimple_omp_atomic_load_rhs_ptr (gimple g) +gimple_omp_atomic_load_rhs_ptr (gomp_atomic_load *load_stmt) { - gimple_statement_omp_atomic_load *omp_atomic_load_stmt = - as_a (g); - return &omp_atomic_load_stmt->rhs; + return &load_stmt->rhs; } /* Get the definition of the control variable in a GIMPLE_OMP_CONTINUE. */ static inline tree -gimple_omp_continue_control_def (const_gimple g) +gimple_omp_continue_control_def (const gomp_continue *cont_stmt) { - const gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - return omp_continue_stmt->control_def; + return cont_stmt->control_def; } /* The same as above, but return the address. */ static inline tree * -gimple_omp_continue_control_def_ptr (gimple g) +gimple_omp_continue_control_def_ptr (gomp_continue *cont_stmt) { - gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - return &omp_continue_stmt->control_def; + return &cont_stmt->control_def; } /* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE. */ static inline void -gimple_omp_continue_set_control_def (gimple g, tree def) +gimple_omp_continue_set_control_def (gomp_continue *cont_stmt, tree def) { - gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - omp_continue_stmt->control_def = def; + cont_stmt->control_def = def; } /* Get the use of the control variable in a GIMPLE_OMP_CONTINUE. */ static inline tree -gimple_omp_continue_control_use (const_gimple g) +gimple_omp_continue_control_use (const gomp_continue *cont_stmt) { - const gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - return omp_continue_stmt->control_use; + return cont_stmt->control_use; } /* The same as above, but return the address. */ static inline tree * -gimple_omp_continue_control_use_ptr (gimple g) +gimple_omp_continue_control_use_ptr (gomp_continue *cont_stmt) { - gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - return &omp_continue_stmt->control_use; + return &cont_stmt->control_use; } /* Set the use of the control variable in a GIMPLE_OMP_CONTINUE. */ static inline void -gimple_omp_continue_set_control_use (gimple g, tree use) +gimple_omp_continue_set_control_use (gomp_continue *cont_stmt, tree use) { - gimple_statement_omp_continue *omp_continue_stmt = - as_a (g); - omp_continue_stmt->control_use = use; + cont_stmt->control_use = use; } -/* Return a pointer to the body for the GIMPLE_TRANSACTION statement GS. */ +/* Return a pointer to the body for the GIMPLE_TRANSACTION statement + TRANSACTION_STMT. */ static inline gimple_seq * -gimple_transaction_body_ptr (gimple gs) +gimple_transaction_body_ptr (gtransaction *transaction_stmt) { - gimple_statement_transaction *transaction_stmt = - as_a (gs); return &transaction_stmt->body; } -/* Return the body for the GIMPLE_TRANSACTION statement GS. */ +/* Return the body for the GIMPLE_TRANSACTION statement TRANSACTION_STMT. */ static inline gimple_seq -gimple_transaction_body (gimple gs) +gimple_transaction_body (gtransaction *transaction_stmt) { - return *gimple_transaction_body_ptr (gs); + return *gimple_transaction_body_ptr (transaction_stmt); } /* Return the label associated with a GIMPLE_TRANSACTION. */ static inline tree -gimple_transaction_label (const_gimple gs) +gimple_transaction_label (const gtransaction *transaction_stmt) { - const gimple_statement_transaction *transaction_stmt = - as_a (gs); return transaction_stmt->label; } static inline tree * -gimple_transaction_label_ptr (gimple gs) +gimple_transaction_label_ptr (gtransaction *transaction_stmt) { - gimple_statement_transaction *transaction_stmt = - as_a (gs); return &transaction_stmt->label; } /* Return the subcode associated with a GIMPLE_TRANSACTION. */ static inline unsigned int -gimple_transaction_subcode (const_gimple gs) +gimple_transaction_subcode (const gtransaction *transaction_stmt) { - GIMPLE_CHECK (gs, GIMPLE_TRANSACTION); - return gs->subcode; + return transaction_stmt->subcode; } -/* Set BODY to be the body for the GIMPLE_TRANSACTION statement GS. */ +/* Set BODY to be the body for the GIMPLE_TRANSACTION statement + TRANSACTION_STMT. */ static inline void -gimple_transaction_set_body (gimple gs, gimple_seq body) +gimple_transaction_set_body (gtransaction *transaction_stmt, + gimple_seq body) { - gimple_statement_transaction *transaction_stmt = - as_a (gs); transaction_stmt->body = body; } /* Set the label associated with a GIMPLE_TRANSACTION. */ static inline void -gimple_transaction_set_label (gimple gs, tree label) +gimple_transaction_set_label (gtransaction *transaction_stmt, tree label) { - gimple_statement_transaction *transaction_stmt = - as_a (gs); transaction_stmt->label = label; } /* Set the subcode associated with a GIMPLE_TRANSACTION. */ static inline void -gimple_transaction_set_subcode (gimple gs, unsigned int subcode) +gimple_transaction_set_subcode (gtransaction *transaction_stmt, + unsigned int subcode) { - GIMPLE_CHECK (gs, GIMPLE_TRANSACTION); - gs->subcode = subcode; + transaction_stmt->subcode = subcode; } /* Return a pointer to the return value for GIMPLE_RETURN GS. */ static inline tree * -gimple_return_retval_ptr (const_gimple gs) +gimple_return_retval_ptr (const greturn *gs) { - GIMPLE_CHECK (gs, GIMPLE_RETURN); return gimple_op_ptr (gs, 0); } /* Return the return value for GIMPLE_RETURN GS. */ static inline tree -gimple_return_retval (const_gimple gs) +gimple_return_retval (const greturn *gs) { - GIMPLE_CHECK (gs, GIMPLE_RETURN); return gimple_op (gs, 0); } @@ -5631,9 +5523,8 @@ gimple_return_retval (const_gimple gs) /* Set RETVAL to be the return value for GIMPLE_RETURN GS. */ static inline void -gimple_return_set_retval (gimple gs, tree retval) +gimple_return_set_retval (greturn *gs, tree retval) { - GIMPLE_CHECK (gs, GIMPLE_RETURN); gimple_set_op (gs, 0, retval); } @@ -5770,11 +5661,12 @@ gimple_expr_type (const_gimple stmt) original RHS type as far as we can reconstruct it. */ if (code == GIMPLE_CALL) { - if (gimple_call_internal_p (stmt) - && gimple_call_internal_fn (stmt) == IFN_MASK_STORE) - type = TREE_TYPE (gimple_call_arg (stmt, 3)); + const gcall *call_stmt = as_a (stmt); + if (gimple_call_internal_p (call_stmt) + && gimple_call_internal_fn (call_stmt) == IFN_MASK_STORE) + type = TREE_TYPE (gimple_call_arg (call_stmt, 3)); else - type = gimple_call_return_type (stmt); + type = gimple_call_return_type (call_stmt); } else switch (gimple_assign_rhs_code (stmt)) -- cgit v1.2.1