aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog460
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/coretypes.h5
-rw-r--r--gcc/gdbhooks.py2
-rw-r--r--gcc/ggc.h6
-rw-r--r--gcc/gimple-iterator.c72
-rw-r--r--gcc/gimple-iterator.h8
-rw-r--r--gcc/gimple-pretty-print.c6
-rw-r--r--gcc/gimple-pretty-print.h4
-rw-r--r--gcc/gimple-ssa.h16
-rw-r--r--gcc/gimple-streamer-in.c19
-rw-r--r--gcc/gimple-streamer-out.c2
-rw-r--r--gcc/gimple.c76
-rw-r--r--gcc/gimple.h1649
-rw-r--r--gcc/gimplify.c4
-rw-r--r--gcc/system.h2
-rw-r--r--gcc/tree-inline.c2
-rw-r--r--gcc/tree-phinodes.c39
-rw-r--r--gcc/tree-ssa-ccp.c2
19 files changed, 1660 insertions, 716 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7736e5d0..98bd87e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,463 @@
+2013-11-19 David Malcolm <dmalcolm@redhat.com>
+
+ Convert gimple types from a union to C++ inheritance.
+ * Makefile.in (GIMPLE_H): Add dep on is-a.h.
+ * coretypes.h (union gimple_statement_d): Remove declaration.
+ (gimple): Convert from being a "union gimple_statement_d *"
+ to a "struct gimple_statement_base *".
+ (const_gimple): Likewise (with "const").
+ * ggc.h (ggc_alloc_cleared_gimple_statement_d_stat): Replace
+ with...
+ (ggc_alloc_cleared_gimple_statement_stat): ...this.
+ * gimple-pretty-print.c (debug): Change parameter from a
+ "gimple_statement_d &" to a "gimple_statement_base &".
+ (debug): Change parameter from a "gimple_statement_d *" to
+ a "gimple_statement_base *".
+ * gimple-pretty-print.h (debug): Update declarations as above.
+ * gimple.c (gimple_alloc_stat): Update for renaming of
+ ggc_alloc_cleared_gimple_statement_d_stat to
+ ggc_alloc_cleared_gimple_statement_stat.
+ * gimple.h: Include "is-a.h" for use by is_a_helper
+ specializations in followup autogenerated patch.
+ (struct gimple statement_base): Make this type usable as a base
+ class by adding "desc", "tag" and "variable_size" to GTY, thus
+ using opting-in to gengtype's support for simple inheritance.
+ (gimple_statement_with_ops_base): Convert to a subclass of
+ gimple_statement_base, dropping initial "gsbase" field. Note
+ that this type is abstract, with no GSS_ value, and thus no GTY
+ tag value.
+ (gimple_statement_with_ops): Convert to a subclass of
+ gimple_statement_with_ops_base, dropping initial "opbase" field.
+ Add tag value to GTY marking. Update marking of op field to
+ reflect how num_ops field is accessed via inheritance.
+ (gimple_statement_with_memory_ops_base): Convert to a subclass of
+ gimple_statement_with_ops_base, dropping initial "opbase" field.
+ Add tag value to GTY marking.
+ (gimple_statement_with_memory_ops): Convert to a subclass of
+ public gimple_statement_with_memory_ops_base, dropping initial
+ "membase" field. Add tag value to GTY marking. Update marking
+ of op field to reflect how num_ops field is accessed via
+ inheritance.
+ (gimple_statement_call): Analogous changes that also update the
+ marking of the "u" union.
+ (gimple_statement_omp): Convert to a subclass of
+ gimple_statement_base, dropping initial "gsbase" field, adding
+ tag value to GTY marking.
+ (gimple_statement_bind): Likewise.
+ (gimple_statement_catch): Likewise.
+ (gimple_statement_eh_filter): Likewise.
+ (gimple_statement_eh_else): Likewise.
+ (gimple_statement_eh_mnt): Likewise.
+ (gimple_statement_phi): Likewise.
+ (gimple_statement_eh_ctrl): Likewise.
+ (gimple_statement_try): Likewise.
+ (gimple_statement_wce): Likewise.
+ (gimple_statement_asm): Convert to a subclass of
+ gimple_statement_with_memory_ops_base, dropping initial
+ "membase" field, adding tag value to GTY marking, and updating
+ marking of op field.
+ (gimple_statement_omp_critical): Convert to a subclass of
+ gimple_statement_omp, dropping initial "omp" field, adding tag
+ value to GTY marking.
+ (gimple_statement_omp_for): Likewise.
+ (gimple_statement_omp_parallel): Likewise.
+ (gimple_statement_omp_task): Convert to a subclass of
+ gimple_statement_omp_parallel, dropping initial "par" field,
+ adding tag value to GTY marking.
+ (gimple_statement_omp_sections): Convert to a subclass of
+ gimple_statement_omp, dropping initial "omp" field, adding
+ tag value to GTY marking.
+ (gimple_statement_omp_continue): Convert to a subclass of
+ gimple_statement_base, dropping initial "gsbase" field, adding
+ tag value to GTY marking.
+ (gimple_statement_omp_single): Convert to a subclass of
+ gimple_statement_omp, dropping initial "omp" field, adding
+ tag value to GTY marking.
+ (gimple_statement_omp_atomic_load): Convert to a subclass of
+ gimple_statement_base, dropping initial "gsbase" field, adding
+ tag value to GTY marking.
+ (gimple_statement_omp_atomic_store): Convert to a subclass of
+ gimple_statement_base, dropping initial "gsbase" field, adding
+ tag value to GTY marking.
+ (gimple_statement_transaction): Convert to a subclass of
+ gimple_statement_with_memory_ops_base, dropping initial "gsbase"
+ field, adding tag value to GTY marking.
+ (union gimple_statement_d): Remove.
+ * system.h (CONST_CAST_GIMPLE): Update to use
+ "struct gimple_statement_base *" rather than
+ "union gimple_statement_d *".
+ * tree-ssa-ccp.c (gimple_htab): Convert underlying type from
+ gimple_statement_d to gimple_statement_base.
+
+ * gimple.h (gimple_use_ops): Port from union to usage of
+ dyn_cast.
+ (gimple_set_use_ops): Port from union to usage of as_a.
+ (gimple_set_vuse): Likewise.
+ (gimple_set_vdef): Likewise.
+ (gimple_call_internal_fn): Port from union to a static_cast,
+ given that the type has already been asserted.
+ (gimple_omp_body_ptr): Port from unchecked union usage to
+ a static_cast.
+ (gimple_omp_set_body): Likewise.
+
+ * gimple-iterator.c (update_bb_for_stmts): Update for conversion of
+ gimple types to a true class hierarchy.
+ (update_call_edge_frequencies): Likewise.
+ (gsi_insert_seq_nodes_before): Likewise.
+ (gsi_insert_seq_nodes_after): Likewise.
+ (gsi_split_seq_after): Likewise.
+ (gsi_set_stmt): Likewise.
+ (gsi_split_seq_before): Likewise.
+ (gsi_remove): Likewise.
+ * gimple-iterator.h (gsi_one_before_end_p): Likewise.
+ (gsi_next): Likewise.
+ (gsi_prev): Likewise.
+ * gimple-pretty-print.c (dump_gimple_debug): Likewise.
+ * gimple-ssa.h (gimple_vuse_op): Likewise.
+ (gimple_vdef_op): Likewise.
+ * gimple-streamer-in.c (input_gimple_stmt): Likewise.
+ * gimple-streamer-out.c (output_gimple_stmt): Likewise.
+ * gimple.c (gimple_set_code): Likewise.
+ (gimple_alloc_stat): Likewise.
+ (gimple_set_subcode): Likewise.
+ (gimple_build_call_internal_1): Likewise.
+ (gimple_check_failed): Likewise.
+ (gimple_call_flags): Likewise.
+ (gimple_set_bb): Likewise.
+ * gimple.h (is_a_helper <gimple_statement_asm> (gimple)): New.
+ (is_a_helper <gimple_statement_bind> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_call> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_catch> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_eh_ctrl> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_eh_else> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_eh_filter> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_eh_mnt> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_atomic_load> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_atomic_store> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_continue> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_critical> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_for> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_parallel> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_sections> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_single> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_omp_task> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_phi> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_transaction> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_try> (gimple)): Likewise.
+ (is_a_helper <gimple_statement_wce> (gimple)): Likewise.
+ (is_a_helper <const gimple_statement_asm> (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_bind> (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_call> (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_catch> (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_eh_ctrl> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_eh_filter> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_atomic_load> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_atomic_store>
+ (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_omp_continue> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_critical> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_for> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_parallel> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_sections> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_single> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_omp_task> (const_gimple)):
+ Likewise.
+ (is_a_helper <const gimple_statement_phi> (const_gimple)): Likewise.
+ (is_a_helper <const gimple_statement_transaction> (const_gimple)):
+ Likewise.
+ (gimple_seq_last): Update for conversion of gimple types to a true
+ class hierarchy.
+ (gimple_seq_set_last): Likewise.
+ (gimple_code): Likewise.
+ (gimple_bb): Likewise.
+ (gimple_block): Likewise.
+ (gimple_set_block): Likewise.
+ (gimple_location): Likewise.
+ (gimple_location_ptr): Likewise.
+ (gimple_set_location): Likewise.
+ (gimple_no_warning_p): Likewise.
+ (gimple_set_no_warning): Likewise.
+ (gimple_set_visited): Likewise.
+ (gimple_visited_p): Likewise.
+ (gimple_set_plf): Likewise.
+ (gimple_plf): Likewise.
+ (gimple_set_uid): Likewise.
+ (gimple_uid): Likewise.
+ (gimple_init_singleton): Likewise.
+ (gimple_modified_p): Likewise.
+ (gimple_set_modified): Likewise.
+ (gimple_expr_code): Likewise.
+ (gimple_has_volatile_ops): Likewise.
+ (gimple_set_has_volatile_ops): Likewise.
+ (gimple_omp_subcode): Likewise.
+ (gimple_omp_set_subcode): Likewise.
+ (gimple_omp_return_set_nowait): Likewise.
+ (gimple_omp_section_set_last): Likewise.
+ (gimple_omp_parallel_set_combined_p): Likewise.
+ (gimple_omp_atomic_set_need_value): Likewise.
+ (gimple_omp_atomic_set_seq_cst): Likewise.
+ (gimple_num_ops): Likewise.
+ (gimple_set_num_ops): Likewise.
+ (gimple_assign_nontemporal_move_p): Likewise.
+ (gimple_assign_set_nontemporal_move): Likewise.
+ (gimple_assign_rhs_code): Likewise.
+ (gimple_assign_set_rhs_code): Likewise.
+ (gimple_call_internal_p): Likewise.
+ (gimple_call_with_bounds_p): Likewise.
+ (gimple_call_set_with_bounds): 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_set_alloca_for_var): Likewise.
+ (gimple_call_alloca_for_var_p): Likewise.
+ (gimple_call_copy_flags): Likewise.
+ (gimple_cond_code): Likewise.
+ (gimple_cond_set_code): Likewise.
+ (gimple_cond_make_false): Likewise.
+ (gimple_cond_make_true): Likewise.
+ (gimple_asm_volatile_p): Likewise.
+ (gimple_asm_set_volatile): Likewise.
+ (gimple_asm_set_input): Likewise.
+ (gimple_asm_input_p): Likewise.
+ (gimple_try_kind): Likewise.
+ (gimple_try_set_kind): Likewise.
+ (gimple_try_catch_is_cleanup): Likewise.
+ (gimple_try_set_catch_is_cleanup): Likewise.
+ (gimple_wce_cleanup_eh_only): Likewise.
+ (gimple_wce_set_cleanup_eh_only): Likewise.
+ (gimple_debug_bind_p): Likewise.
+ (gimple_debug_source_bind_p): Likewise.
+ (gimple_omp_for_set_kind): Likewise.
+ (gimple_omp_for_set_combined_p): Likewise.
+ (gimple_omp_for_set_combined_into_p): Likewise.
+ (gimple_omp_target_set_kind): Likewise.
+ (gimple_transaction_subcode): Likewise.
+ (gimple_transaction_set_subcode): Likewise.
+ (gimple_predict_predictor): Likewise.
+ (gimple_predict_set_predictor): Likewise.
+ (gimple_predict_outcome): Likewise.
+ (gimple_predict_set_outcome): Likewise.
+ (gimple_transaction_set_label): Likewise.
+ (gimple_transaction_set_body): Likewise.
+ (gimple_transaction_label_ptr): Likewise.
+ (gimple_transaction_label): Likewise.
+ (gimple_transaction_body_ptr): Likewise.
+ (gimple_omp_continue_set_control_use): Likewise.
+ (gimple_omp_continue_control_use_ptr): Likewise.
+ (gimple_omp_continue_control_use): Likewise.
+ (gimple_omp_continue_set_control_def): Likewise.
+ (gimple_omp_continue_control_def_ptr): Likewise.
+ (gimple_omp_continue_control_def): Likewise.
+ (gimple_omp_atomic_load_rhs_ptr): Likewise.
+ (gimple_omp_atomic_load_rhs): Likewise.
+ (gimple_omp_atomic_load_set_rhs): Likewise.
+ (gimple_omp_atomic_load_lhs_ptr): Likewise.
+ (gimple_omp_atomic_load_lhs): Likewise.
+ (gimple_omp_atomic_load_set_lhs): Likewise.
+ (gimple_omp_atomic_store_val_ptr): Likewise.
+ (gimple_omp_atomic_store_val): Likewise.
+ (gimple_omp_atomic_store_set_val): Likewise.
+ (gimple_omp_for_cond): Likewise.
+ (gimple_omp_for_set_cond): Likewise.
+ (gimple_omp_sections_set_control): Likewise.
+ (gimple_omp_sections_control_ptr): Likewise.
+ (gimple_omp_sections_control): Likewise.
+ (gimple_omp_sections_set_clauses): Likewise.
+ (gimple_omp_sections_clauses_ptr): Likewise.
+ (gimple_omp_sections_clauses): Likewise.
+ (gimple_omp_teams_set_clauses): Likewise.
+ (gimple_omp_teams_clauses_ptr): Likewise.
+ (gimple_omp_teams_clauses): Likewise.
+ (gimple_omp_target_set_data_arg): Likewise.
+ (gimple_omp_target_data_arg_ptr): Likewise.
+ (gimple_omp_target_data_arg): Likewise.
+ (gimple_omp_target_set_child_fn): Likewise.
+ (gimple_omp_target_child_fn_ptr): Likewise.
+ (gimple_omp_target_child_fn): Likewise.
+ (gimple_omp_target_set_clauses): Likewise.
+ (gimple_omp_target_clauses_ptr): Likewise.
+ (gimple_omp_target_clauses): Likewise.
+ (gimple_omp_single_set_clauses): Likewise.
+ (gimple_omp_single_clauses_ptr): Likewise.
+ (gimple_omp_single_clauses): Likewise.
+ (gimple_omp_task_set_arg_align): Likewise.
+ (gimple_omp_task_arg_align_ptr): Likewise.
+ (gimple_omp_task_arg_align): Likewise.
+ (gimple_omp_task_set_arg_size): Likewise.
+ (gimple_omp_task_arg_size_ptr): Likewise.
+ (gimple_omp_task_arg_size): Likewise.
+ (gimple_omp_task_set_copy_fn): Likewise.
+ (gimple_omp_task_copy_fn_ptr): Likewise.
+ (gimple_omp_task_copy_fn): Likewise.
+ (gimple_omp_task_set_data_arg): Likewise.
+ (gimple_omp_task_data_arg_ptr): Likewise.
+ (gimple_omp_task_data_arg): Likewise.
+ (gimple_omp_task_set_child_fn): Likewise.
+ (gimple_omp_task_child_fn_ptr): Likewise.
+ (gimple_omp_task_child_fn): Likewise.
+ (gimple_omp_task_set_clauses): Likewise.
+ (gimple_omp_task_clauses_ptr): Likewise.
+ (gimple_omp_task_clauses): Likewise.
+ (gimple_omp_parallel_set_data_arg): Likewise.
+ (gimple_omp_parallel_data_arg_ptr): Likewise.
+ (gimple_omp_parallel_data_arg): Likewise.
+ (gimple_omp_parallel_set_child_fn): Likewise.
+ (gimple_omp_parallel_child_fn_ptr): Likewise.
+ (gimple_omp_parallel_child_fn): Likewise.
+ (gimple_omp_parallel_set_clauses): Likewise.
+ (gimple_omp_parallel_clauses_ptr): Likewise.
+ (gimple_omp_parallel_clauses): Likewise.
+ (gimple_omp_for_set_pre_body): Likewise.
+ (gimple_omp_for_pre_body_ptr): Likewise.
+ (gimple_omp_for_set_incr): Likewise.
+ (gimple_omp_for_incr_ptr): Likewise.
+ (gimple_omp_for_incr): Likewise.
+ (gimple_omp_for_set_final): Likewise.
+ (gimple_omp_for_final_ptr): Likewise.
+ (gimple_omp_for_final): Likewise.
+ (gimple_omp_for_set_initial): Likewise.
+ (gimple_omp_for_initial_ptr): Likewise.
+ (gimple_omp_for_initial): Likewise.
+ (gimple_omp_for_set_index): Likewise.
+ (gimple_omp_for_index_ptr): Likewise.
+ (gimple_omp_for_index): Likewise.
+ (gimple_omp_for_collapse): Likewise.
+ (gimple_omp_for_set_clauses): Likewise.
+ (gimple_omp_for_clauses_ptr): Likewise.
+ (gimple_omp_for_clauses): Likewise.
+ (gimple_omp_critical_set_name): Likewise.
+ (gimple_omp_critical_name_ptr): Likewise.
+ (gimple_omp_critical_name): Likewise.
+ (gimple_eh_dispatch_set_region): Likewise.
+ (gimple_eh_dispatch_region): Likewise.
+ (gimple_resx_set_region): Likewise.
+ (gimple_resx_region): Likewise.
+ (gimple_phi_set_arg): Likewise.
+ (gimple_phi_arg): Likewise.
+ (gimple_phi_set_result): Likewise.
+ (gimple_phi_result_ptr): Likewise.
+ (gimple_phi_result): Likewise.
+ (gimple_phi_num_args): Likewise.
+ (gimple_phi_capacity): Likewise.
+ (gimple_wce_set_cleanup): Likewise.
+ (gimple_wce_cleanup_ptr): Likewise.
+ (gimple_try_set_cleanup): Likewise.
+ (gimple_try_set_eval): Likewise.
+ (gimple_try_cleanup_ptr): Likewise.
+ (gimple_try_eval_ptr): Likewise.
+ (gimple_eh_else_set_e_body): Likewise.
+ (gimple_eh_else_set_n_body): Likewise.
+ (gimple_eh_else_e_body_ptr): Likewise.
+ (gimple_eh_else_n_body_ptr): Likewise.
+ (gimple_eh_must_not_throw_set_fndecl): Likewise.
+ (gimple_eh_must_not_throw_fndecl): Likewise.
+ (gimple_eh_filter_set_failure): Likewise.
+ (gimple_eh_filter_set_types): Likewise.
+ (gimple_eh_filter_failure_ptr): Likewise.
+ (gimple_eh_filter_types_ptr): Likewise.
+ (gimple_eh_filter_types): Likewise.
+ (gimple_catch_set_handler): Likewise.
+ (gimple_catch_set_types): Likewise.
+ (gimple_catch_handler_ptr): Likewise.
+ (gimple_catch_types_ptr): Likewise.
+ (gimple_catch_types): Likewise.
+ (gimple_asm_string): Likewise.
+ (gimple_asm_set_label_op): Likewise.
+ (gimple_asm_label_op): Likewise.
+ (gimple_asm_set_clobber_op): Likewise.
+ (gimple_asm_clobber_op): Likewise.
+ (gimple_asm_set_output_op): Likewise.
+ (gimple_asm_output_op_ptr): Likewise.
+ (gimple_asm_output_op): Likewise.
+ (gimple_asm_set_input_op): Likewise.
+ (gimple_asm_input_op_ptr): Likewise.
+ (gimple_asm_input_op): Likewise.
+ (gimple_asm_nlabels): Likewise.
+ (gimple_asm_nclobbers): Likewise.
+ (gimple_asm_noutputs): Likewise.
+ (gimple_asm_ninputs): Likewise.
+ (gimple_bind_set_block): Likewise.
+ (gimple_bind_block): Likewise.
+ (gimple_bind_add_seq): Likewise.
+ (gimple_bind_add_stmt): Likewise.
+ (gimple_bind_set_body): Likewise.
+ (gimple_bind_body_ptr): Likewise.
+ (gimple_bind_append_vars): Likewise.
+ (gimple_bind_set_vars): Likewise.
+ (gimple_bind_vars): Likewise.
+ (gimple_call_clobber_set): Likewise.
+ (gimple_call_use_set): Likewise.
+ (gimple_call_set_internal_fn): Likewise.
+ (gimple_call_set_fntype): Likewise.
+ (gimple_call_fntype): Likewise.
+ (gimple_omp_return_lhs_ptr): Likewise.
+ (gimple_omp_return_lhs): Likewise.
+ (gimple_omp_return_set_lhs): Likewise.
+ (gimple_omp_taskreg_set_data_arg): Likewise.
+ (gimple_omp_taskreg_data_arg_ptr): Likewise.
+ (gimple_omp_taskreg_data_arg): Likewise.
+ (gimple_omp_taskreg_set_child_fn): Likewise.
+ (gimple_omp_taskreg_child_fn_ptr): Likewise.
+ (gimple_omp_taskreg_child_fn): Likewise.
+ (gimple_omp_taskreg_set_clauses): Likewise.
+ (gimple_omp_taskreg_clauses_ptr): Likewise.
+ (gimple_omp_taskreg_clauses): Likewise.
+ (gimple_vuse): Likewise.
+ (gimple_vdef): Likewise.
+ (gimple_vuse_ptr): Likewise.
+ (gimple_vdef_ptr): Likewise.
+ * tree-inline.c (copy_debug_stmt): Likewise.
+ * tree-phinodes.c (make_phi_node): Likewise.
+
+ * gimple.h (is_a_helper <const gimple_statement_with_ops>::test): New.
+ (is_a_helper <gimple_statement_with_ops>::test): New.
+ (is_a_helper <const gimple_statement_with_memory_ops>::test): New.
+ (is_a_helper <gimple_statement_with_memory_ops>::test): New.
+
+ * gimple-streamer-in.c (input_gimple_stmt): Port from union
+ access to use of as_a.
+ * gimple.c (gimple_build_asm_1): Likewise.
+ (gimple_build_try): Likewise. Also, return a specific subclass
+ rather than just gimple.
+ (gimple_build_resx): Port from union access to use of as_a.
+ (gimple_build_eh_dispatch): Likewise.
+ (gimple_build_omp_for): Likewise. Also, convert allocation of iter
+ now that gengtype no longer provides a typed allocator function.
+ (gimple_copy): Likewise.
+ * gimple.h (gimple_build_try): Return a specific subclass rather
+ than just gimple.
+ * gimplify.c (gimplify_cleanup_point_expr): Replace union access
+ with subclass access by making use of new return type of
+ gimple_build_try.
+ * tree-phinodes.c: (allocate_phi_node): Return a
+ "gimple_statement_phi *" rather than just a gimple.
+ (resize_phi_node): Likewise.
+ (make_phi_node): Replace union access with subclass access by
+ making use of new return type of allocate_phi_node.
+ (reserve_phi_args_for_new_edge): Replace union access with as_a.
+ (remove_phi_arg_num): Accept a "gimple_statement_phi *" rather
+ than just a gimple.
+ (remove_phi_args): Update for change to remove_phi_arg_num.
+
+ * gdbhooks.py (GimplePrinter.to_string): Update lookup of
+ code field to reflect inheritance, rather than embedding of
+ the base gimple type.
+
2013-11-19 Richard Biener <rguenther@suse.de>
* cfgloop.h (struct loop_iterator): C++-ify, add constructor
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 8cc8341..34e07a0 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -888,7 +888,7 @@ BASIC_BLOCK_H = basic-block.h $(PREDICT_H) $(VEC_H) $(FUNCTION_H) \
cfg-flags.def cfghooks.h
GIMPLE_H = gimple.h gimple.def gsstruct.def pointer-set.h $(VEC_H) \
$(GGC_H) $(BASIC_BLOCK_H) $(TREE_H) tree-ssa-operands.h \
- tree-ssa-alias.h $(INTERNAL_FN_H) $(HASH_TABLE_H)
+ tree-ssa-alias.h $(INTERNAL_FN_H) $(HASH_TABLE_H) is-a.h
GCOV_IO_H = gcov-io.h gcov-iov.h auto-host.h
RECOG_H = recog.h
EMIT_RTL_H = emit-rtl.h
diff --git a/gcc/coretypes.h b/gcc/coretypes.h
index f7ef8d7..5d60240 100644
--- a/gcc/coretypes.h
+++ b/gcc/coretypes.h
@@ -61,9 +61,8 @@ typedef const struct rtvec_def *const_rtvec;
union tree_node;
typedef union tree_node *tree;
typedef const union tree_node *const_tree;
-union gimple_statement_d;
-typedef union gimple_statement_d *gimple;
-typedef const union gimple_statement_d *const_gimple;
+typedef struct gimple_statement_base *gimple;
+typedef const struct gimple_statement_base *const_gimple;
typedef gimple gimple_seq;
struct gimple_stmt_iterator_d;
typedef struct gimple_stmt_iterator_d gimple_stmt_iterator;
diff --git a/gcc/gdbhooks.py b/gcc/gdbhooks.py
index a9d502d..8ddaf3d 100644
--- a/gcc/gdbhooks.py
+++ b/gcc/gdbhooks.py
@@ -240,7 +240,7 @@ class GimplePrinter:
def to_string (self):
if long(self.gdbval) == 0:
return '<gimple 0x0>'
- val_gimple_code = self.gdbval['gsbase']['code']
+ val_gimple_code = self.gdbval['code']
val_gimple_code_name = gdb.parse_and_eval('gimple_code_name')
val_code_name = val_gimple_code_name[long(val_gimple_code)]
result = '<%s 0x%x' % (val_code_name.string(),
diff --git a/gcc/ggc.h b/gcc/ggc.h
index b31bc80..bb8f939 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -269,10 +269,10 @@ ggc_alloc_cleared_tree_node_stat (size_t s MEM_STAT_DECL)
return (union tree_node *) ggc_internal_cleared_alloc_stat (s PASS_MEM_STAT);
}
-static inline union gimple_statement_d *
-ggc_alloc_cleared_gimple_statement_d_stat (size_t s MEM_STAT_DECL)
+static inline struct gimple_statement_base *
+ggc_alloc_cleared_gimple_statement_stat (size_t s MEM_STAT_DECL)
{
- return (union gimple_statement_d *)
+ return (struct gimple_statement_base *)
ggc_internal_cleared_alloc_stat (s PASS_MEM_STAT);
}
diff --git a/gcc/gimple-iterator.c b/gcc/gimple-iterator.c
index b945389..557bf35 100644
--- a/gcc/gimple-iterator.c
+++ b/gcc/gimple-iterator.c
@@ -68,7 +68,7 @@ update_bb_for_stmts (gimple_seq_node first, gimple_seq_node last,
{
gimple_seq_node n;
- for (n = first; n; n = n->gsbase.next)
+ for (n = first; n; n = n->next)
{
gimple_set_bb (n, bb);
if (n == last)
@@ -86,7 +86,7 @@ update_call_edge_frequencies (gimple_seq_node first, basic_block bb)
int bb_freq = 0;
gimple_seq_node n;
- for (n = first; n ; n = n->gsbase.next)
+ for (n = first; n ; n = n->next)
if (is_gimple_call (n))
{
struct cgraph_edge *e;
@@ -124,7 +124,7 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
basic_block bb;
gimple_seq_node cur = i->ptr;
- gcc_assert (!cur || cur->gsbase.prev);
+ gcc_assert (!cur || cur->prev);
if ((bb = gsi_bb (*i)) != NULL)
update_bb_for_stmts (first, last, bb);
@@ -132,13 +132,13 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
/* Link SEQ before CUR in the sequence. */
if (cur)
{
- first->gsbase.prev = cur->gsbase.prev;
- if (first->gsbase.prev->gsbase.next)
- first->gsbase.prev->gsbase.next = first;
+ first->prev = cur->prev;
+ if (first->prev->next)
+ first->prev->next = first;
else
gimple_seq_set_first (i->seq, first);
- last->gsbase.next = cur;
- cur->gsbase.prev = last;
+ last->next = cur;
+ cur->prev = last;
}
else
{
@@ -149,11 +149,11 @@ gsi_insert_seq_nodes_before (gimple_stmt_iterator *i,
labels, so it returns an iterator after the end of the block, and
we need to insert before it; it might be cleaner to add a flag to the
iterator saying whether we are at the start or end of the list). */
- last->gsbase.next = NULL;
+ last->next = NULL;
if (itlast)
{
- first->gsbase.prev = itlast;
- itlast->gsbase.next = first;
+ first->prev = itlast;
+ itlast->next = first;
}
else
gimple_seq_set_first (i->seq, first);
@@ -242,7 +242,7 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
basic_block bb;
gimple_seq_node cur = i->ptr;
- gcc_assert (!cur || cur->gsbase.prev);
+ gcc_assert (!cur || cur->prev);
/* If the iterator is inside a basic block, we need to update the
basic block information for all the nodes between FIRST and LAST. */
@@ -252,20 +252,20 @@ gsi_insert_seq_nodes_after (gimple_stmt_iterator *i,
/* Link SEQ after CUR. */
if (cur)
{
- last->gsbase.next = cur->gsbase.next;
- if (last->gsbase.next)
+ last->next = cur->next;
+ if (last->next)
{
- last->gsbase.next->gsbase.prev = last;
+ last->next->prev = last;
}
else
gimple_seq_set_last (i->seq, last);
- first->gsbase.prev = cur;
- cur->gsbase.next = first;
+ first->prev = cur;
+ cur->next = first;
}
else
{
gcc_assert (!gimple_seq_last (*i->seq));
- last->gsbase.next = NULL;
+ last->next = NULL;
gimple_seq_set_first (i->seq, first);
gimple_seq_set_last (i->seq, last);
}
@@ -347,15 +347,15 @@ gsi_split_seq_after (gimple_stmt_iterator i)
cur = i.ptr;
/* How can we possibly split after the end, or before the beginning? */
- gcc_assert (cur && cur->gsbase.next);
- next = cur->gsbase.next;
+ gcc_assert (cur && cur->next);
+ next = cur->next;
pold_seq = i.seq;
gimple_seq_set_first (&new_seq, next);
gimple_seq_set_last (&new_seq, gimple_seq_last (*pold_seq));
gimple_seq_set_last (pold_seq, cur);
- cur->gsbase.next = NULL;
+ cur->next = NULL;
return new_seq;
}
@@ -371,17 +371,17 @@ gsi_set_stmt (gimple_stmt_iterator *gsi, gimple stmt)
gimple orig_stmt = gsi_stmt (*gsi);
gimple prev, next;
- stmt->gsbase.next = next = orig_stmt->gsbase.next;
- stmt->gsbase.prev = prev = orig_stmt->gsbase.prev;
+ stmt->next = next = orig_stmt->next;
+ stmt->prev = prev = orig_stmt->prev;
/* Note how we don't clear next/prev of orig_stmt. This is so that
copies of *GSI our callers might still hold (to orig_stmt)
can be advanced as if they too were replaced. */
- if (prev->gsbase.next)
- prev->gsbase.next = stmt;
+ if (prev->next)
+ prev->next = stmt;
else
gimple_seq_set_first (gsi->seq, stmt);
if (next)
- next->gsbase.prev = stmt;
+ next->prev = stmt;
else
gimple_seq_set_last (gsi->seq, stmt);
@@ -402,10 +402,10 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
/* How can we possibly split after the end? */
gcc_assert (cur);
- prev = cur->gsbase.prev;
+ prev = cur->prev;
old_seq = *i->seq;
- if (!prev->gsbase.next)
+ if (!prev->next)
*i->seq = NULL;
i->seq = pnew_seq;
@@ -415,8 +415,8 @@ gsi_split_seq_before (gimple_stmt_iterator *i, gimple_seq *pnew_seq)
/* Cut OLD_SEQ before I. */
gimple_seq_set_last (&old_seq, prev);
- if (prev->gsbase.next)
- prev->gsbase.next = NULL;
+ if (prev->next)
+ prev->next = NULL;
}
@@ -576,20 +576,20 @@ gsi_remove (gimple_stmt_iterator *i, bool remove_permanently)
/* Update the iterator and re-wire the links in I->SEQ. */
cur = i->ptr;
- next = cur->gsbase.next;
- prev = cur->gsbase.prev;
+ next = cur->next;
+ prev = cur->prev;
/* See gsi_set_stmt for why we don't reset prev/next of STMT. */
if (next)
/* Cur is not last. */
- next->gsbase.prev = prev;
- else if (prev->gsbase.next)
+ next->prev = prev;
+ else if (prev->next)
/* Cur is last but not first. */
gimple_seq_set_last (i->seq, prev);
- if (prev->gsbase.next)
+ if (prev->next)
/* Cur is not first. */
- prev->gsbase.next = next;
+ prev->next = next;
else
/* Cur is first. */
*i->seq = next;
diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h
index 24045f5..11b1276 100644
--- a/gcc/gimple-iterator.h
+++ b/gcc/gimple-iterator.h
@@ -168,7 +168,7 @@ gsi_end_p (gimple_stmt_iterator i)
static inline bool
gsi_one_before_end_p (gimple_stmt_iterator i)
{
- return i.ptr != NULL && i.ptr->gsbase.next == NULL;
+ return i.ptr != NULL && i.ptr->next == NULL;
}
/* Advance the iterator to the next gimple statement. */
@@ -176,7 +176,7 @@ gsi_one_before_end_p (gimple_stmt_iterator i)
static inline void
gsi_next (gimple_stmt_iterator *i)
{
- i->ptr = i->ptr->gsbase.next;
+ i->ptr = i->ptr->next;
}
/* Advance the iterator to the previous gimple statement. */
@@ -184,8 +184,8 @@ gsi_next (gimple_stmt_iterator *i)
static inline void
gsi_prev (gimple_stmt_iterator *i)
{
- gimple prev = i->ptr->gsbase.prev;
- if (prev->gsbase.next)
+ gimple prev = i->ptr->prev;
+ if (prev->next)
i->ptr = prev;
else
i->ptr = NULL;
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index cdf1dbd..4529e79 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -88,13 +88,13 @@ print_gimple_stmt (FILE *file, gimple g, int spc, int flags)
}
DEBUG_FUNCTION void
-debug (gimple_statement_d &ref)
+debug (gimple_statement_base &ref)
{
print_gimple_stmt (stderr, &ref, 0, 0);
}
DEBUG_FUNCTION void
-debug (gimple_statement_d *ptr)
+debug (gimple_statement_base *ptr)
{
if (ptr)
debug (*ptr);
@@ -1073,7 +1073,7 @@ dump_gimple_eh_dispatch (pretty_printer *buffer, gimple gs, int spc, int flags)
static void
dump_gimple_debug (pretty_printer *buffer, gimple gs, int spc, int flags)
{
- switch (gs->gsbase.subcode)
+ switch (gs->subcode)
{
case GIMPLE_DEBUG_BIND:
if (flags & TDF_RAW)
diff --git a/gcc/gimple-pretty-print.h b/gcc/gimple-pretty-print.h
index 5227eb8..edb23e6 100644
--- a/gcc/gimple-pretty-print.h
+++ b/gcc/gimple-pretty-print.h
@@ -29,8 +29,8 @@ extern void debug_gimple_stmt (gimple);
extern void debug_gimple_seq (gimple_seq);
extern void print_gimple_seq (FILE *, gimple_seq, int, int);
extern void print_gimple_stmt (FILE *, gimple, int, int);
-extern void debug (gimple_statement_d &ref);
-extern void debug (gimple_statement_d *ptr);
+extern void debug (gimple_statement_base &ref);
+extern void debug (gimple_statement_base *ptr);
extern void print_gimple_expr (FILE *, gimple, int, int);
extern void pp_gimple_stmt_1 (pretty_printer *, gimple, int, int);
extern void gimple_dump_bb (FILE *, basic_block, int, int);
diff --git a/gcc/gimple-ssa.h b/gcc/gimple-ssa.h
index 23aa099..50b48bb 100644
--- a/gcc/gimple-ssa.h
+++ b/gcc/gimple-ssa.h
@@ -108,11 +108,13 @@ static inline use_operand_p
gimple_vuse_op (const_gimple g)
{
struct use_optype_d *ops;
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_USE_OPERAND_P;
- ops = g->gsops.opbase.use_ops;
+ ops = mem_ops_stmt->use_ops;
if (ops
- && USE_OP_PTR (ops)->use == &g->gsmembase.vuse)
+ && USE_OP_PTR (ops)->use == &mem_ops_stmt->vuse)
return USE_OP_PTR (ops);
return NULL_USE_OPERAND_P;
}
@@ -122,10 +124,12 @@ gimple_vuse_op (const_gimple g)
static inline def_operand_p
gimple_vdef_op (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_DEF_OPERAND_P;
- if (g->gsmembase.vdef)
- return &g->gsmembase.vdef;
+ if (mem_ops_stmt->vdef)
+ return &mem_ops_stmt->vdef;
return NULL_DEF_OPERAND_P;
}
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c
index f8106fc..a5c8dd8 100644
--- a/gcc/gimple-streamer-in.c
+++ b/gcc/gimple-streamer-in.c
@@ -100,12 +100,12 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
bp = streamer_read_bitpack (ib);
num_ops = bp_unpack_var_len_unsigned (&bp);
stmt = gimple_alloc (code, num_ops);
- stmt->gsbase.no_warning = bp_unpack_value (&bp, 1);
+ stmt->no_warning = bp_unpack_value (&bp, 1);
if (is_gimple_assign (stmt))
- stmt->gsbase.nontemporal_move = bp_unpack_value (&bp, 1);
- stmt->gsbase.has_volatile_ops = bp_unpack_value (&bp, 1);
+ stmt->nontemporal_move = bp_unpack_value (&bp, 1);
+ stmt->has_volatile_ops = bp_unpack_value (&bp, 1);
has_hist = bp_unpack_value (&bp, 1);
- stmt->gsbase.subcode = bp_unpack_var_len_unsigned (&bp);
+ stmt->subcode = bp_unpack_var_len_unsigned (&bp);
/* Read location information. */
gimple_set_location (stmt, stream_input_location (&bp, data_in));
@@ -131,13 +131,14 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in,
case GIMPLE_ASM:
{
/* FIXME lto. Move most of this into a new gimple_asm_set_string(). */
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (stmt);
tree str;
- stmt->gimple_asm.ni = streamer_read_uhwi (ib);
- stmt->gimple_asm.no = streamer_read_uhwi (ib);
- stmt->gimple_asm.nc = streamer_read_uhwi (ib);
- stmt->gimple_asm.nl = streamer_read_uhwi (ib);
+ asm_stmt->ni = streamer_read_uhwi (ib);
+ asm_stmt->no = streamer_read_uhwi (ib);
+ asm_stmt->nc = streamer_read_uhwi (ib);
+ asm_stmt->nl = streamer_read_uhwi (ib);
str = streamer_read_string_cst (data_in, ib);
- stmt->gimple_asm.string = TREE_STRING_POINTER (str);
+ asm_stmt->string = TREE_STRING_POINTER (str);
}
/* Fallthru */
diff --git a/gcc/gimple-streamer-out.c b/gcc/gimple-streamer-out.c
index 4d0664f..0d6b6a6 100644
--- a/gcc/gimple-streamer-out.c
+++ b/gcc/gimple-streamer-out.c
@@ -78,7 +78,7 @@ output_gimple_stmt (struct output_block *ob, gimple stmt)
bp_pack_value (&bp, gimple_has_volatile_ops (stmt), 1);
hist = gimple_histogram_value (cfun, stmt);
bp_pack_value (&bp, hist != NULL, 1);
- bp_pack_var_len_unsigned (&bp, stmt->gsbase.subcode);
+ bp_pack_var_len_unsigned (&bp, stmt->subcode);
/* Emit location information for the statement. */
stream_output_location (ob, &bp, LOCATION_LOCUS (gimple_location (stmt)));
diff --git a/gcc/gimple.c b/gcc/gimple.c
index c031698..d48ca6b 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -96,7 +96,7 @@ static const char * const gimple_alloc_kind_names[] = {
static inline void
gimple_set_code (gimple g, enum gimple_code code)
{
- g->gsbase.code = code;
+ g->code = code;
}
/* Return the number of bytes needed to hold a GIMPLE statement with
@@ -128,13 +128,13 @@ gimple_alloc_stat (enum gimple_code code, unsigned num_ops MEM_STAT_DECL)
gimple_alloc_sizes[(int) kind] += size;
}
- stmt = ggc_alloc_cleared_gimple_statement_d_stat (size PASS_MEM_STAT);
+ stmt = ggc_alloc_cleared_gimple_statement_stat (size PASS_MEM_STAT);
gimple_set_code (stmt, code);
gimple_set_num_ops (stmt, num_ops);
/* Do not call gimple_set_modified here as it has other side
effects and this tuple is still not completely built. */
- stmt->gsbase.modified = 1;
+ stmt->modified = 1;
gimple_init_singleton (stmt);
return stmt;
@@ -148,7 +148,7 @@ gimple_set_subcode (gimple g, unsigned subcode)
/* We only have 16 bits for the RHS code. Assert that we are not
overflowing it. */
gcc_assert (subcode < (1 << 16));
- g->gsbase.subcode = subcode;
+ g->subcode = subcode;
}
@@ -283,7 +283,7 @@ static inline gimple
gimple_build_call_internal_1 (enum internal_fn fn, unsigned nargs)
{
gimple s = gimple_build_with_ops (GIMPLE_CALL, ERROR_MARK, nargs + 3);
- s->gsbase.subcode |= GF_CALL_INTERNAL;
+ s->subcode |= GF_CALL_INTERNAL;
gimple_call_set_internal_fn (s, fn);
gimple_call_reset_alias_info (s);
return s;
@@ -533,21 +533,22 @@ static inline gimple
gimple_build_asm_1 (const char *string, unsigned ninputs, unsigned noutputs,
unsigned nclobbers, unsigned nlabels)
{
- gimple p;
+ gimple_statement_asm *p;
int size = strlen (string);
/* ASMs with labels cannot have outputs. This should have been
enforced by the front end. */
gcc_assert (nlabels == 0 || noutputs == 0);
- p = gimple_build_with_ops (GIMPLE_ASM, ERROR_MARK,
- ninputs + noutputs + nclobbers + nlabels);
+ p = as_a <gimple_statement_asm> (
+ gimple_build_with_ops (GIMPLE_ASM, ERROR_MARK,
+ ninputs + noutputs + nclobbers + nlabels));
- p->gimple_asm.ni = ninputs;
- p->gimple_asm.no = noutputs;
- p->gimple_asm.nc = nclobbers;
- p->gimple_asm.nl = nlabels;
- p->gimple_asm.string = ggc_alloc_string (string, size);
+ p->ni = ninputs;
+ p->no = noutputs;
+ p->nc = nclobbers;
+ p->nl = nlabels;
+ p->string = ggc_alloc_string (string, size);
if (GATHER_STATISTICS)
gimple_alloc_sizes[(int) gimple_alloc_kind (GIMPLE_ASM)] += size;
@@ -659,14 +660,14 @@ gimple_build_eh_else (gimple_seq n_body, gimple_seq e_body)
KIND is either GIMPLE_TRY_CATCH or GIMPLE_TRY_FINALLY depending on
whether this is a try/catch or a try/finally respectively. */
-gimple
+gimple_statement_try *
gimple_build_try (gimple_seq eval, gimple_seq cleanup,
enum gimple_try_flags kind)
{
- gimple p;
+ gimple_statement_try *p;
gcc_assert (kind == GIMPLE_TRY_CATCH || kind == GIMPLE_TRY_FINALLY);
- p = gimple_alloc (GIMPLE_TRY, 0);
+ p = as_a <gimple_statement_try> (gimple_alloc (GIMPLE_TRY, 0));
gimple_set_subcode (p, kind);
if (eval)
gimple_try_set_eval (p, eval);
@@ -696,8 +697,10 @@ gimple_build_wce (gimple_seq cleanup)
gimple
gimple_build_resx (int region)
{
- gimple p = gimple_build_with_ops (GIMPLE_RESX, ERROR_MARK, 0);
- p->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *p =
+ as_a <gimple_statement_eh_ctrl> (
+ gimple_build_with_ops (GIMPLE_RESX, ERROR_MARK, 0));
+ p->region = region;
return p;
}
@@ -744,8 +747,10 @@ gimple_build_switch (tree index, tree default_label, vec<tree> args)
gimple
gimple_build_eh_dispatch (int region)
{
- gimple p = gimple_build_with_ops (GIMPLE_EH_DISPATCH, ERROR_MARK, 0);
- p->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *p =
+ as_a <gimple_statement_eh_ctrl> (
+ gimple_build_with_ops (GIMPLE_EH_DISPATCH, ERROR_MARK, 0));
+ p->region = region;
return p;
}
@@ -819,14 +824,17 @@ gimple
gimple_build_omp_for (gimple_seq body, int kind, tree clauses, size_t collapse,
gimple_seq pre_body)
{
- gimple p = gimple_alloc (GIMPLE_OMP_FOR, 0);
+ gimple_statement_omp_for *p =
+ as_a <gimple_statement_omp_for> (gimple_alloc (GIMPLE_OMP_FOR, 0));
if (body)
gimple_omp_set_body (p, body);
gimple_omp_for_set_clauses (p, clauses);
gimple_omp_for_set_kind (p, kind);
- p->gimple_omp_for.collapse = collapse;
- p->gimple_omp_for.iter
- = ggc_alloc_cleared_vec_gimple_omp_for_iter (collapse);
+ p->collapse = collapse;
+ p->iter = static_cast <struct gimple_omp_for_iter *> (
+ ggc_internal_cleared_vec_alloc_stat (sizeof (*p->iter),
+ collapse MEM_STAT_INFO));
+
if (pre_body)
gimple_omp_for_set_pre_body (p, pre_body);
@@ -1114,8 +1122,8 @@ gimple_check_failed (const_gimple gs, const char *file, int line,
gimple_code_name[code],
get_tree_code_name (subcode),
gimple_code_name[gimple_code (gs)],
- gs->gsbase.subcode > 0
- ? get_tree_code_name ((enum tree_code) gs->gsbase.subcode)
+ gs->subcode > 0
+ ? get_tree_code_name ((enum tree_code) gs->subcode)
: "",
function, trim_filename (file), line);
}
@@ -1309,7 +1317,7 @@ gimple_call_flags (const_gimple stmt)
else
flags = flags_from_decl_or_type (gimple_call_fntype (stmt));
- if (stmt->gsbase.subcode & GF_CALL_NOTHROW)
+ if (stmt->subcode & GF_CALL_NOTHROW)
flags |= ECF_NOTHROW;
return flags;
@@ -1450,7 +1458,7 @@ gimple_assign_unary_nop_p (gimple gs)
void
gimple_set_bb (gimple stmt, basic_block bb)
{
- stmt->gsbase.bb = bb;
+ stmt->bb = bb;
/* If the statement is a label, add the label to block-to-labels map
so that we can speed up edge creation for GIMPLE_GOTOs. */
@@ -1645,9 +1653,15 @@ gimple_copy (gimple stmt)
gimple_omp_for_set_pre_body (copy, new_seq);
t = unshare_expr (gimple_omp_for_clauses (stmt));
gimple_omp_for_set_clauses (copy, t);
- copy->gimple_omp_for.iter
- = ggc_alloc_vec_gimple_omp_for_iter
- (gimple_omp_for_collapse (stmt));
+ {
+ gimple_statement_omp_for *omp_for_copy =
+ as_a <gimple_statement_omp_for> (copy);
+ omp_for_copy->iter =
+ static_cast <struct gimple_omp_for_iter *> (
+ ggc_internal_vec_alloc_stat (sizeof (struct gimple_omp_for_iter),
+ gimple_omp_for_collapse (stmt)
+ MEM_STAT_INFO));
+ }
for (i = 0; i < gimple_omp_for_collapse (stmt); i++)
{
gimple_omp_for_set_cond (copy, i,
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 4234c3c..0eb23fc 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-fold.h"
#include "tree-eh.h"
#include "gimple-expr.h"
+#include "is-a.h"
typedef gimple gimple_seq_node;
@@ -146,7 +147,10 @@ enum plf_mask {
/* Data structure definitions for GIMPLE tuples. NOTE: word markers
are for 64 bit hosts. */
-struct GTY((chain_next ("%h.next"))) gimple_statement_base {
+struct GTY((desc ("gimple_statement_structure (&%h)"), tag ("GSS_BASE"),
+ chain_next ("%h.next"), variable_size))
+ gimple_statement_base
+{
/* [ WORD 1 ]
Main identifying code for a tuple. */
ENUM_BITFIELD(gimple_code) code : 8;
@@ -210,10 +214,11 @@ struct GTY((chain_next ("%h.next"))) gimple_statement_base {
/* Base structure for tuples with operands. */
-struct GTY(()) gimple_statement_with_ops_base
+/* This gimple subclass has no tag value. */
+struct GTY(())
+ gimple_statement_with_ops_base : public gimple_statement_base
{
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ]
SSA operand vectors. NOTE: It should be possible to
@@ -226,25 +231,25 @@ struct GTY(()) gimple_statement_with_ops_base
/* Statements that take register operands. */
-struct GTY(()) gimple_statement_with_ops
+struct GTY((tag("GSS_WITH_OPS")))
+ gimple_statement_with_ops : public gimple_statement_with_ops_base
{
- /* [ WORD 1-7 ] */
- struct gimple_statement_with_ops_base opbase;
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8 ]
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
- tree GTY((length ("%h.opbase.gsbase.num_ops"))) op[1];
+ tree GTY((length ("%h.num_ops"))) op[1];
};
/* Base for statements that take both memory and register operands. */
-struct GTY(()) gimple_statement_with_memory_ops_base
+struct GTY((tag("GSS_WITH_MEM_OPS_BASE")))
+ gimple_statement_with_memory_ops_base : public gimple_statement_with_ops_base
{
- /* [ WORD 1-7 ] */
- struct gimple_statement_with_ops_base opbase;
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8-9 ]
Virtual operands for this statement. The GC will pick them
@@ -256,32 +261,33 @@ struct GTY(()) gimple_statement_with_memory_ops_base
/* Statements that take both memory and register operands. */
-struct GTY(()) gimple_statement_with_memory_ops
+struct GTY((tag("GSS_WITH_MEM_OPS")))
+ gimple_statement_with_memory_ops :
+ public gimple_statement_with_memory_ops_base
{
- /* [ WORD 1-9 ] */
- struct gimple_statement_with_memory_ops_base membase;
+ /* [ WORD 1-9 ] : base class */
/* [ WORD 10 ]
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
- tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+ tree GTY((length ("%h.num_ops"))) op[1];
};
/* Call statements that take both memory and register operands. */
-struct GTY(()) gimple_statement_call
+struct GTY((tag("GSS_CALL")))
+ gimple_statement_call : public gimple_statement_with_memory_ops_base
{
- /* [ WORD 1-9 ] */
- struct gimple_statement_with_memory_ops_base membase;
+ /* [ WORD 1-9 ] : base class */
/* [ WORD 10-13 ] */
struct pt_solution call_used;
struct pt_solution call_clobbered;
/* [ WORD 14 ] */
- union GTY ((desc ("%1.membase.opbase.gsbase.subcode & GF_CALL_INTERNAL"))) {
+ union GTY ((desc ("%1.subcode & GF_CALL_INTERNAL"))) {
tree GTY ((tag ("0"))) fntype;
enum internal_fn GTY ((tag ("GF_CALL_INTERNAL"))) internal_fn;
} u;
@@ -290,15 +296,16 @@ struct GTY(()) gimple_statement_call
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
- tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+ tree GTY((length ("%h.num_ops"))) op[1];
};
/* OpenMP statements (#pragma omp). */
-struct GTY(()) gimple_statement_omp {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP")))
+ gimple_statement_omp : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] */
gimple_seq body;
@@ -307,9 +314,10 @@ struct GTY(()) gimple_statement_omp {
/* GIMPLE_BIND */
-struct GTY(()) gimple_statement_bind {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_BIND")))
+ gimple_statement_bind : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ]
Variables declared in this scope. */
@@ -330,9 +338,10 @@ struct GTY(()) gimple_statement_bind {
/* GIMPLE_CATCH */
-struct GTY(()) gimple_statement_catch {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_CATCH")))
+ gimple_statement_catch : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] */
tree types;
@@ -344,9 +353,10 @@ struct GTY(()) gimple_statement_catch {
/* GIMPLE_EH_FILTER */
-struct GTY(()) gimple_statement_eh_filter {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_FILTER")))
+ gimple_statement_eh_filter : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ]
Filter types. */
@@ -359,9 +369,10 @@ struct GTY(()) gimple_statement_eh_filter {
/* GIMPLE_EH_ELSE */
-struct GTY(()) gimple_statement_eh_else {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_ELSE")))
+ gimple_statement_eh_else : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7,8 ] */
gimple_seq n_body, e_body;
@@ -369,9 +380,10 @@ struct GTY(()) gimple_statement_eh_else {
/* GIMPLE_EH_MUST_NOT_THROW */
-struct GTY(()) gimple_statement_eh_mnt {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_EH_MNT")))
+ gimple_statement_eh_mnt : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] Abort function decl. */
tree fndecl;
@@ -379,9 +391,10 @@ struct GTY(()) gimple_statement_eh_mnt {
/* GIMPLE_PHI */
-struct GTY(()) gimple_statement_phi {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_PHI")))
+ gimple_statement_phi : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] */
unsigned capacity;
@@ -397,10 +410,10 @@ struct GTY(()) gimple_statement_phi {
/* GIMPLE_RESX, GIMPLE_EH_DISPATCH */
-struct GTY(()) gimple_statement_eh_ctrl
+struct GTY((tag("GSS_EH_CTRL")))
+ gimple_statement_eh_ctrl : public gimple_statement_base
{
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ]
Exception region number. */
@@ -410,9 +423,10 @@ struct GTY(()) gimple_statement_eh_ctrl
/* GIMPLE_TRY */
-struct GTY(()) gimple_statement_try {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_TRY")))
+ gimple_statement_try : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ]
Expression to evaluate. */
@@ -439,9 +453,10 @@ enum gimple_try_flags
/* GIMPLE_WITH_CLEANUP_EXPR */
-struct GTY(()) gimple_statement_wce {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_WCE")))
+ gimple_statement_wce : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* Subcode: CLEANUP_EH_ONLY. True if the cleanup should only be
executed if an exception is thrown, not on normal exit of its
@@ -456,10 +471,10 @@ struct GTY(()) gimple_statement_wce {
/* GIMPLE_ASM */
-struct GTY(()) gimple_statement_asm
+struct GTY((tag("GSS_ASM")))
+ gimple_statement_asm : public gimple_statement_with_memory_ops_base
{
- /* [ WORD 1-9 ] */
- struct gimple_statement_with_memory_ops_base membase;
+ /* [ WORD 1-9 ] : base class */
/* [ WORD 10 ]
__asm__ statement. */
@@ -476,14 +491,15 @@ struct GTY(()) gimple_statement_asm
Operand vector. NOTE! This must always be the last field
of this structure. In particular, this means that this
structure cannot be embedded inside another one. */
- tree GTY((length ("%h.membase.opbase.gsbase.num_ops"))) op[1];
+ tree GTY((length ("%h.num_ops"))) op[1];
};
/* GIMPLE_OMP_CRITICAL */
-struct GTY(()) gimple_statement_omp_critical {
- /* [ WORD 1-7 ] */
- struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_CRITICAL")))
+ gimple_statement_omp_critical : public gimple_statement_omp
+{
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8 ]
Critical section name. */
@@ -510,9 +526,10 @@ struct GTY(()) gimple_omp_for_iter {
/* GIMPLE_OMP_FOR */
-struct GTY(()) gimple_statement_omp_for {
- /* [ WORD 1-7 ] */
- struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_FOR")))
+ gimple_statement_omp_for : public gimple_statement_omp
+{
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8 ] */
tree clauses;
@@ -532,9 +549,10 @@ struct GTY(()) gimple_statement_omp_for {
/* GIMPLE_OMP_PARALLEL */
-struct GTY(()) gimple_statement_omp_parallel {
- /* [ WORD 1-7 ] */
- struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_PARALLEL")))
+ gimple_statement_omp_parallel : public gimple_statement_omp
+{
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8 ]
Clauses. */
@@ -552,9 +570,10 @@ struct GTY(()) gimple_statement_omp_parallel {
/* GIMPLE_OMP_TASK */
-struct GTY(()) gimple_statement_omp_task {
- /* [ WORD 1-10 ] */
- struct gimple_statement_omp_parallel par;
+struct GTY((tag("GSS_OMP_TASK")))
+ gimple_statement_omp_task : public gimple_statement_omp_parallel
+{
+ /* [ WORD 1-10 ] : base class */
/* [ WORD 11 ]
Child function holding firstprivate initialization if needed. */
@@ -573,9 +592,10 @@ struct GTY(()) gimple_statement_omp_task {
/* GIMPLE_OMP_SECTIONS */
-struct GTY(()) gimple_statement_omp_sections {
- /* [ WORD 1-7 ] */
- struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_SECTIONS")))
+ gimple_statement_omp_sections : public gimple_statement_omp
+{
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 8 ] */
tree clauses;
@@ -591,9 +611,10 @@ struct GTY(()) gimple_statement_omp_sections {
Note: This does not inherit from gimple_statement_omp, because we
do not need the body field. */
-struct GTY(()) gimple_statement_omp_continue {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_CONTINUE")))
+ gimple_statement_omp_continue : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] */
tree control_def;
@@ -604,9 +625,10 @@ struct GTY(()) gimple_statement_omp_continue {
/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS */
-struct GTY(()) gimple_statement_omp_single {
- /* [ WORD 1-7 ] */
- struct gimple_statement_omp omp;
+struct GTY((tag("GSS_OMP_SINGLE")))
+ gimple_statement_omp_single : public gimple_statement_omp
+{
+ /* [ WORD 1-7 ] : base class */
/* [ WORD 7 ] */
tree clauses;
@@ -617,9 +639,10 @@ struct GTY(()) gimple_statement_omp_single {
Note: This is based on gimple_statement_base, not g_s_omp, because g_s_omp
contains a sequence, which we don't need here. */
-struct GTY(()) gimple_statement_omp_atomic_load {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_ATOMIC_LOAD")))
+ gimple_statement_omp_atomic_load : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7-8 ] */
tree rhs, lhs;
@@ -628,9 +651,10 @@ struct GTY(()) gimple_statement_omp_atomic_load {
/* GIMPLE_OMP_ATOMIC_STORE.
See note on GIMPLE_OMP_ATOMIC_LOAD. */
-struct GTY(()) gimple_statement_omp_atomic_store {
- /* [ WORD 1-6 ] */
- struct gimple_statement_base gsbase;
+struct GTY((tag("GSS_OMP_ATOMIC_STORE")))
+ gimple_statement_omp_atomic_store : public gimple_statement_base
+{
+ /* [ WORD 1-6 ] : base class */
/* [ WORD 7 ] */
tree val;
@@ -664,10 +688,10 @@ struct GTY(()) gimple_statement_omp_atomic_store {
likely because it is guaranteed to go irrevocable upon entry. */
#define GTMA_HAS_NO_INSTRUMENTATION (1u << 7)
-struct GTY(()) gimple_statement_transaction
+struct GTY((tag("GSS_TRANSACTION")))
+ gimple_statement_transaction : public gimple_statement_with_memory_ops_base
{
- /* [ WORD 1-9 ] */
- struct gimple_statement_with_memory_ops_base gsbase;
+ /* [ WORD 1-9 ] : base class */
/* [ WORD 10 ] */
gimple_seq body;
@@ -683,39 +707,309 @@ enum gimple_statement_structure_enum {
};
#undef DEFGSSTRUCT
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_asm>::test (gimple gs)
+{
+ return gs->code == GIMPLE_ASM;
+}
-/* Define the overall contents of a gimple tuple. It may be any of the
- structures declared above for various types of tuples. */
-
-union GTY ((desc ("gimple_statement_structure (&%h)"),
- chain_next ("%h.gsbase.next"), variable_size)) gimple_statement_d {
- struct gimple_statement_base GTY ((tag ("GSS_BASE"))) gsbase;
- struct gimple_statement_with_ops GTY ((tag ("GSS_WITH_OPS"))) gsops;
- struct gimple_statement_with_memory_ops_base GTY ((tag ("GSS_WITH_MEM_OPS_BASE"))) gsmembase;
- struct gimple_statement_with_memory_ops GTY ((tag ("GSS_WITH_MEM_OPS"))) gsmem;
- struct gimple_statement_call GTY ((tag ("GSS_CALL"))) gimple_call;
- struct gimple_statement_omp GTY ((tag ("GSS_OMP"))) omp;
- struct gimple_statement_bind GTY ((tag ("GSS_BIND"))) gimple_bind;
- struct gimple_statement_catch GTY ((tag ("GSS_CATCH"))) gimple_catch;
- struct gimple_statement_eh_filter GTY ((tag ("GSS_EH_FILTER"))) gimple_eh_filter;
- struct gimple_statement_eh_mnt GTY ((tag ("GSS_EH_MNT"))) gimple_eh_mnt;
- struct gimple_statement_eh_else GTY ((tag ("GSS_EH_ELSE"))) gimple_eh_else;
- struct gimple_statement_phi GTY ((tag ("GSS_PHI"))) gimple_phi;
- struct gimple_statement_eh_ctrl GTY ((tag ("GSS_EH_CTRL"))) gimple_eh_ctrl;
- struct gimple_statement_try GTY ((tag ("GSS_TRY"))) gimple_try;
- struct gimple_statement_wce GTY ((tag ("GSS_WCE"))) gimple_wce;
- struct gimple_statement_asm GTY ((tag ("GSS_ASM"))) gimple_asm;
- struct gimple_statement_omp_critical GTY ((tag ("GSS_OMP_CRITICAL"))) gimple_omp_critical;
- struct gimple_statement_omp_for GTY ((tag ("GSS_OMP_FOR"))) gimple_omp_for;
- struct gimple_statement_omp_parallel GTY ((tag ("GSS_OMP_PARALLEL"))) gimple_omp_parallel;
- struct gimple_statement_omp_task GTY ((tag ("GSS_OMP_TASK"))) gimple_omp_task;
- struct gimple_statement_omp_sections GTY ((tag ("GSS_OMP_SECTIONS"))) gimple_omp_sections;
- struct gimple_statement_omp_single GTY ((tag ("GSS_OMP_SINGLE"))) gimple_omp_single;
- struct gimple_statement_omp_continue GTY ((tag ("GSS_OMP_CONTINUE"))) gimple_omp_continue;
- struct gimple_statement_omp_atomic_load GTY ((tag ("GSS_OMP_ATOMIC_LOAD"))) gimple_omp_atomic_load;
- struct gimple_statement_omp_atomic_store GTY ((tag ("GSS_OMP_ATOMIC_STORE"))) gimple_omp_atomic_store;
- struct gimple_statement_transaction GTY((tag ("GSS_TRANSACTION"))) gimple_transaction;
-};
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_bind>::test (gimple gs)
+{
+ return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_call>::test (gimple gs)
+{
+ return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_catch>::test (gimple gs)
+{
+ return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_ctrl>::test (gimple gs)
+{
+ return gs->code == GIMPLE_RESX || gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_else>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_ELSE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_filter>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_eh_mnt>::test (gimple gs)
+{
+ return gs->code == GIMPLE_EH_MUST_NOT_THROW;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_load>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_atomic_store>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_STORE || gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_continue>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_critical>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_for>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_parallel>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_sections>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_single>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SINGLE || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_omp_task>::test (gimple gs)
+{
+ return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_phi>::test (gimple gs)
+{
+ return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_transaction>::test (gimple gs)
+{
+ return gs->code == GIMPLE_TRANSACTION;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_try>::test (gimple gs)
+{
+ return gs->code == GIMPLE_TRY;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_wce>::test (gimple gs)
+{
+ return gs->code == GIMPLE_WITH_CLEANUP_EXPR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_asm>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_ASM;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_bind>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_BIND;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_call>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_CALL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_catch>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_CATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_ctrl>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_RESX || gs->code == GIMPLE_EH_DISPATCH;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_eh_filter>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_EH_FILTER;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_load>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_LOAD;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_atomic_store>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_ATOMIC_STORE || gs->code == GIMPLE_OMP_RETURN;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_continue>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CONTINUE;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_critical>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_CRITICAL;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_for>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_FOR;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_parallel>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_PARALLEL || gs->code == GIMPLE_OMP_TASK || gs->code == GIMPLE_OMP_TARGET;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_sections>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SECTIONS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_single>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_SINGLE || gs->code == GIMPLE_OMP_TEAMS;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_omp_task>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_OMP_TASK;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_phi>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_PHI;
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_transaction>::test (const_gimple gs)
+{
+ return gs->code == GIMPLE_TRANSACTION;
+}
/* Offset in bytes to the location of the operand vector.
Zero if there is no operand vector for this tuple structure. */
@@ -758,7 +1052,8 @@ 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 gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags);
+gimple_statement_try *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);
@@ -890,7 +1185,7 @@ gimple_seq_first_stmt (gimple_seq s)
static inline gimple_seq_node
gimple_seq_last (gimple_seq s)
{
- return s ? s->gsbase.prev : NULL;
+ return s ? s->prev : NULL;
}
@@ -909,7 +1204,7 @@ gimple_seq_last_stmt (gimple_seq s)
static inline void
gimple_seq_set_last (gimple_seq *ps, gimple_seq_node last)
{
- (*ps)->gsbase.prev = last;
+ (*ps)->prev = last;
}
@@ -970,7 +1265,7 @@ set_bb_seq (basic_block bb, gimple_seq seq)
static inline enum gimple_code
gimple_code (const_gimple g)
{
- return g->gsbase.code;
+ return g->code;
}
@@ -1033,7 +1328,7 @@ gimple_has_substatements (gimple g)
static inline basic_block
gimple_bb (const_gimple g)
{
- return g->gsbase.bb;
+ return g->bb;
}
@@ -1042,7 +1337,7 @@ gimple_bb (const_gimple g)
static inline tree
gimple_block (const_gimple g)
{
- return LOCATION_BLOCK (g->gsbase.location);
+ return LOCATION_BLOCK (g->location);
}
@@ -1052,10 +1347,10 @@ static inline void
gimple_set_block (gimple g, tree block)
{
if (block)
- g->gsbase.location =
- COMBINE_LOCATION_DATA (line_table, g->gsbase.location, block);
+ g->location =
+ COMBINE_LOCATION_DATA (line_table, g->location, block);
else
- g->gsbase.location = LOCATION_LOCUS (g->gsbase.location);
+ g->location = LOCATION_LOCUS (g->location);
}
@@ -1064,7 +1359,7 @@ gimple_set_block (gimple g, tree block)
static inline location_t
gimple_location (const_gimple g)
{
- return g->gsbase.location;
+ return g->location;
}
/* Return pointer to location information for statement G. */
@@ -1072,7 +1367,7 @@ gimple_location (const_gimple g)
static inline const location_t *
gimple_location_ptr (const_gimple g)
{
- return &g->gsbase.location;
+ return &g->location;
}
@@ -1081,7 +1376,7 @@ gimple_location_ptr (const_gimple g)
static inline void
gimple_set_location (gimple g, location_t location)
{
- g->gsbase.location = location;
+ g->location = location;
}
@@ -1126,7 +1421,7 @@ gimple_seq_singleton_p (gimple_seq seq)
static inline bool
gimple_no_warning_p (const_gimple stmt)
{
- return stmt->gsbase.no_warning;
+ return stmt->no_warning;
}
/* Set the no_warning flag of STMT to NO_WARNING. */
@@ -1134,7 +1429,7 @@ gimple_no_warning_p (const_gimple stmt)
static inline void
gimple_set_no_warning (gimple stmt, bool no_warning)
{
- stmt->gsbase.no_warning = (unsigned) no_warning;
+ stmt->no_warning = (unsigned) no_warning;
}
/* Set the visited status on statement STMT to VISITED_P. */
@@ -1142,7 +1437,7 @@ gimple_set_no_warning (gimple stmt, bool no_warning)
static inline void
gimple_set_visited (gimple stmt, bool visited_p)
{
- stmt->gsbase.visited = (unsigned) visited_p;
+ stmt->visited = (unsigned) visited_p;
}
@@ -1151,7 +1446,7 @@ gimple_set_visited (gimple stmt, bool visited_p)
static inline bool
gimple_visited_p (gimple stmt)
{
- return stmt->gsbase.visited;
+ return stmt->visited;
}
@@ -1161,9 +1456,9 @@ static inline void
gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
{
if (val_p)
- stmt->gsbase.plf |= (unsigned int) plf;
+ stmt->plf |= (unsigned int) plf;
else
- stmt->gsbase.plf &= ~((unsigned int) plf);
+ stmt->plf &= ~((unsigned int) plf);
}
@@ -1172,7 +1467,7 @@ gimple_set_plf (gimple stmt, enum plf_mask plf, bool val_p)
static inline unsigned int
gimple_plf (gimple stmt, enum plf_mask plf)
{
- return stmt->gsbase.plf & ((unsigned int) plf);
+ return stmt->plf & ((unsigned int) plf);
}
@@ -1181,7 +1476,7 @@ gimple_plf (gimple stmt, enum plf_mask plf)
static inline void
gimple_set_uid (gimple g, unsigned uid)
{
- g->gsbase.uid = uid;
+ g->uid = uid;
}
@@ -1190,7 +1485,7 @@ gimple_set_uid (gimple g, unsigned uid)
static inline unsigned
gimple_uid (const_gimple g)
{
- return g->gsbase.uid;
+ return g->uid;
}
@@ -1199,8 +1494,8 @@ gimple_uid (const_gimple g)
static inline void
gimple_init_singleton (gimple g)
{
- g->gsbase.next = NULL;
- g->gsbase.prev = g;
+ g->next = NULL;
+ g->prev = g;
}
@@ -1212,6 +1507,21 @@ gimple_has_ops (const_gimple g)
return gimple_code (g) >= GIMPLE_COND && gimple_code (g) <= GIMPLE_RETURN;
}
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_with_ops>::test (const_gimple gs)
+{
+ return gimple_has_ops (gs);
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_with_ops>::test (gimple gs)
+{
+ return gimple_has_ops (gs);
+}
/* Return true if GIMPLE statement G has memory operands. */
@@ -1221,15 +1531,32 @@ gimple_has_mem_ops (const_gimple g)
return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN;
}
+template <>
+template <>
+inline bool
+is_a_helper <const gimple_statement_with_memory_ops>::test (const_gimple gs)
+{
+ return gimple_has_mem_ops (gs);
+}
+
+template <>
+template <>
+inline bool
+is_a_helper <gimple_statement_with_memory_ops>::test (gimple gs)
+{
+ return gimple_has_mem_ops (gs);
+}
/* Return the set of USE operands for statement G. */
static inline struct use_optype_d *
gimple_use_ops (const_gimple g)
{
- if (!gimple_has_ops (g))
+ const gimple_statement_with_ops *ops_stmt =
+ dyn_cast <const gimple_statement_with_ops> (g);
+ if (!ops_stmt)
return NULL;
- return g->gsops.opbase.use_ops;
+ return ops_stmt->use_ops;
}
@@ -1238,8 +1565,9 @@ gimple_use_ops (const_gimple g)
static inline void
gimple_set_use_ops (gimple g, struct use_optype_d *use)
{
- gcc_gimple_checking_assert (gimple_has_ops (g));
- g->gsops.opbase.use_ops = use;
+ gimple_statement_with_ops *ops_stmt =
+ as_a <gimple_statement_with_ops> (g);
+ ops_stmt->use_ops = use;
}
@@ -1248,9 +1576,11 @@ gimple_set_use_ops (gimple g, struct use_optype_d *use)
static inline tree
gimple_vuse (const_gimple g)
{
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_TREE;
- return g->gsmembase.vuse;
+ return mem_ops_stmt->vuse;
}
/* Return the single VDEF operand of the statement G. */
@@ -1258,9 +1588,11 @@ gimple_vuse (const_gimple g)
static inline tree
gimple_vdef (const_gimple g)
{
- if (!gimple_has_mem_ops (g))
+ const gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <const gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL_TREE;
- return g->gsmembase.vdef;
+ return mem_ops_stmt->vdef;
}
/* Return the single VUSE operand of the statement G. */
@@ -1268,9 +1600,11 @@ gimple_vdef (const_gimple g)
static inline tree *
gimple_vuse_ptr (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL;
- return &g->gsmembase.vuse;
+ return &mem_ops_stmt->vuse;
}
/* Return the single VDEF operand of the statement G. */
@@ -1278,9 +1612,11 @@ gimple_vuse_ptr (gimple g)
static inline tree *
gimple_vdef_ptr (gimple g)
{
- if (!gimple_has_mem_ops (g))
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ dyn_cast <gimple_statement_with_memory_ops> (g);
+ if (!mem_ops_stmt)
return NULL;
- return &g->gsmembase.vdef;
+ return &mem_ops_stmt->vdef;
}
/* Set the single VUSE operand of the statement G. */
@@ -1288,8 +1624,9 @@ gimple_vdef_ptr (gimple g)
static inline void
gimple_set_vuse (gimple g, tree vuse)
{
- gcc_gimple_checking_assert (gimple_has_mem_ops (g));
- g->gsmembase.vuse = vuse;
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ as_a <gimple_statement_with_memory_ops> (g);
+ mem_ops_stmt->vuse = vuse;
}
/* Set the single VDEF operand of the statement G. */
@@ -1297,8 +1634,9 @@ gimple_set_vuse (gimple g, tree vuse)
static inline void
gimple_set_vdef (gimple g, tree vdef)
{
- gcc_gimple_checking_assert (gimple_has_mem_ops (g));
- g->gsmembase.vdef = vdef;
+ gimple_statement_with_memory_ops *mem_ops_stmt =
+ as_a <gimple_statement_with_memory_ops> (g);
+ mem_ops_stmt->vdef = vdef;
}
@@ -1308,7 +1646,7 @@ gimple_set_vdef (gimple g, tree vdef)
static inline bool
gimple_modified_p (const_gimple g)
{
- return (gimple_has_ops (g)) ? (bool) g->gsbase.modified : false;
+ return (gimple_has_ops (g)) ? (bool) g->modified : false;
}
@@ -1319,7 +1657,7 @@ static inline void
gimple_set_modified (gimple s, bool modifiedp)
{
if (gimple_has_ops (s))
- s->gsbase.modified = (unsigned) modifiedp;
+ s->modified = (unsigned) modifiedp;
}
@@ -1334,7 +1672,7 @@ gimple_expr_code (const_gimple stmt)
{
enum gimple_code code = gimple_code (stmt);
if (code == GIMPLE_ASSIGN || code == GIMPLE_COND)
- return (enum tree_code) stmt->gsbase.subcode;
+ return (enum tree_code) stmt->subcode;
else
{
gcc_gimple_checking_assert (code == GIMPLE_CALL);
@@ -1349,7 +1687,7 @@ static inline bool
gimple_has_volatile_ops (const_gimple stmt)
{
if (gimple_has_mem_ops (stmt))
- return stmt->gsbase.has_volatile_ops;
+ return stmt->has_volatile_ops;
else
return false;
}
@@ -1361,7 +1699,7 @@ static inline void
gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
{
if (gimple_has_mem_ops (stmt))
- stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
+ stmt->has_volatile_ops = (unsigned) volatilep;
}
/* Return true if STMT is in a transaction. */
@@ -1388,7 +1726,7 @@ gimple_omp_subcode (const_gimple s)
{
gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
&& gimple_code (s) <= GIMPLE_OMP_TEAMS);
- return s->gsbase.subcode;
+ return s->subcode;
}
/* Set the subcode for OMP statement S to SUBCODE. */
@@ -1399,7 +1737,7 @@ gimple_omp_set_subcode (gimple s, unsigned int subcode)
/* We only have 16 bits for the subcode. Assert that we are not
overflowing it. */
gcc_gimple_checking_assert (subcode < (1 << 16));
- s->gsbase.subcode = subcode;
+ s->subcode = subcode;
}
/* Set the nowait flag on OMP_RETURN statement S. */
@@ -1408,7 +1746,7 @@ static inline void
gimple_omp_return_set_nowait (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_OMP_RETURN);
- s->gsbase.subcode |= GF_OMP_RETURN_NOWAIT;
+ s->subcode |= GF_OMP_RETURN_NOWAIT;
}
@@ -1428,8 +1766,9 @@ gimple_omp_return_nowait_p (const_gimple g)
static inline void
gimple_omp_return_set_lhs (gimple g, tree lhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- g->gimple_omp_atomic_store.val = lhs;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ omp_atomic_store_stmt->val = lhs;
}
@@ -1438,8 +1777,9 @@ gimple_omp_return_set_lhs (gimple g, tree lhs)
static inline tree
gimple_omp_return_lhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- return g->gimple_omp_atomic_store.val;
+ const gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <const gimple_statement_omp_atomic_store> (g);
+ return omp_atomic_store_stmt->val;
}
@@ -1448,8 +1788,9 @@ gimple_omp_return_lhs (const_gimple g)
static inline tree *
gimple_omp_return_lhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
- return &g->gimple_omp_atomic_store.val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ return &omp_atomic_store_stmt->val;
}
@@ -1470,7 +1811,7 @@ static inline void
gimple_omp_section_set_last (gimple g)
{
GIMPLE_CHECK (g, GIMPLE_OMP_SECTION);
- g->gsbase.subcode |= GF_OMP_SECTION_LAST;
+ g->subcode |= GF_OMP_SECTION_LAST;
}
@@ -1493,9 +1834,9 @@ gimple_omp_parallel_set_combined_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_PARALLEL);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_PARALLEL_COMBINED;
+ g->subcode |= GF_OMP_PARALLEL_COMBINED;
else
- g->gsbase.subcode &= ~GF_OMP_PARALLEL_COMBINED;
+ g->subcode &= ~GF_OMP_PARALLEL_COMBINED;
}
@@ -1518,7 +1859,7 @@ gimple_omp_atomic_set_need_value (gimple g)
{
if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gsbase.subcode |= GF_OMP_ATOMIC_NEED_VALUE;
+ g->subcode |= GF_OMP_ATOMIC_NEED_VALUE;
}
@@ -1541,7 +1882,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
{
if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gsbase.subcode |= GF_OMP_ATOMIC_SEQ_CST;
+ g->subcode |= GF_OMP_ATOMIC_SEQ_CST;
}
@@ -1550,7 +1891,7 @@ gimple_omp_atomic_set_seq_cst (gimple g)
static inline unsigned
gimple_num_ops (const_gimple gs)
{
- return gs->gsbase.num_ops;
+ return gs->num_ops;
}
@@ -1559,7 +1900,7 @@ gimple_num_ops (const_gimple gs)
static inline void
gimple_set_num_ops (gimple gs, unsigned num_ops)
{
- gs->gsbase.num_ops = num_ops;
+ gs->num_ops = num_ops;
}
@@ -1790,7 +2131,7 @@ static inline bool
gimple_assign_nontemporal_move_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- return gs->gsbase.nontemporal_move;
+ return gs->nontemporal_move;
}
/* Sets nontemporal move flag of GS to NONTEMPORAL. */
@@ -1799,7 +2140,7 @@ static inline void
gimple_assign_set_nontemporal_move (gimple gs, bool nontemporal)
{
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- gs->gsbase.nontemporal_move = nontemporal;
+ gs->nontemporal_move = nontemporal;
}
@@ -1813,7 +2154,7 @@ gimple_assign_rhs_code (const_gimple gs)
enum tree_code code;
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
- code = (enum tree_code) gs->gsbase.subcode;
+ code = (enum tree_code) gs->subcode;
/* While we initially set subcode to the TREE_CODE of the rhs for
GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay
in sync when we rewrite stmts into SSA form or do SSA propagations. */
@@ -1831,7 +2172,7 @@ static inline void
gimple_assign_set_rhs_code (gimple s, enum tree_code code)
{
GIMPLE_CHECK (s, GIMPLE_ASSIGN);
- s->gsbase.subcode = code;
+ s->subcode = code;
}
@@ -1956,7 +2297,7 @@ static inline bool
gimple_call_internal_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
- return (gs->gsbase.subcode & GF_CALL_INTERNAL) != 0;
+ return (gs->subcode & GF_CALL_INTERNAL) != 0;
}
@@ -1967,7 +2308,7 @@ static inline bool
gimple_call_with_bounds_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
- return (gs->gsbase.subcode & GF_CALL_WITH_BOUNDS) != 0;
+ return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0;
}
@@ -1979,9 +2320,9 @@ gimple_call_set_with_bounds (gimple gs, bool with_bounds)
{
GIMPLE_CHECK (gs, GIMPLE_CALL);
if (with_bounds)
- gs->gsbase.subcode |= GF_CALL_WITH_BOUNDS;
+ gs->subcode |= GF_CALL_WITH_BOUNDS;
else
- gs->gsbase.subcode &= ~GF_CALL_WITH_BOUNDS;
+ gs->subcode &= ~GF_CALL_WITH_BOUNDS;
}
@@ -1991,7 +2332,7 @@ static inline enum internal_fn
gimple_call_internal_fn (const_gimple gs)
{
gcc_gimple_checking_assert (gimple_call_internal_p (gs));
- return gs->gimple_call.u.internal_fn;
+ return static_cast <const gimple_statement_call *> (gs)->u.internal_fn;
}
@@ -2000,10 +2341,11 @@ gimple_call_internal_fn (const_gimple gs)
static inline tree
gimple_call_fntype (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ const gimple_statement_call *call_stmt =
+ as_a <const gimple_statement_call> (gs);
if (gimple_call_internal_p (gs))
return NULL_TREE;
- return gs->gimple_call.u.fntype;
+ return call_stmt->u.fntype;
}
/* Set the type of the function called by GS to FNTYPE. */
@@ -2011,9 +2353,9 @@ gimple_call_fntype (const_gimple gs)
static inline void
gimple_call_set_fntype (gimple gs, tree fntype)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
gcc_gimple_checking_assert (!gimple_call_internal_p (gs));
- gs->gimple_call.u.fntype = fntype;
+ call_stmt->u.fntype = fntype;
}
@@ -2065,9 +2407,9 @@ gimple_call_set_fndecl (gimple gs, tree decl)
static inline void
gimple_call_set_internal_fn (gimple gs, enum internal_fn fn)
{
- GIMPLE_CHECK (gs, GIMPLE_CALL);
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (gs);
gcc_gimple_checking_assert (gimple_call_internal_p (gs));
- gs->gimple_call.u.internal_fn = fn;
+ call_stmt->u.internal_fn = fn;
}
@@ -2180,9 +2522,9 @@ gimple_call_set_tail (gimple s, bool tail_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (tail_p)
- s->gsbase.subcode |= GF_CALL_TAILCALL;
+ s->subcode |= GF_CALL_TAILCALL;
else
- s->gsbase.subcode &= ~GF_CALL_TAILCALL;
+ s->subcode &= ~GF_CALL_TAILCALL;
}
@@ -2192,7 +2534,7 @@ static inline bool
gimple_call_tail_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
+ return (s->subcode & GF_CALL_TAILCALL) != 0;
}
@@ -2205,9 +2547,9 @@ gimple_call_set_return_slot_opt (gimple s, bool return_slot_opt_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (return_slot_opt_p)
- s->gsbase.subcode |= GF_CALL_RETURN_SLOT_OPT;
+ s->subcode |= GF_CALL_RETURN_SLOT_OPT;
else
- s->gsbase.subcode &= ~GF_CALL_RETURN_SLOT_OPT;
+ s->subcode &= ~GF_CALL_RETURN_SLOT_OPT;
}
@@ -2217,7 +2559,7 @@ static inline bool
gimple_call_return_slot_opt_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
+ return (s->subcode & GF_CALL_RETURN_SLOT_OPT) != 0;
}
@@ -2229,9 +2571,9 @@ gimple_call_set_from_thunk (gimple s, bool from_thunk_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (from_thunk_p)
- s->gsbase.subcode |= GF_CALL_FROM_THUNK;
+ s->subcode |= GF_CALL_FROM_THUNK;
else
- s->gsbase.subcode &= ~GF_CALL_FROM_THUNK;
+ s->subcode &= ~GF_CALL_FROM_THUNK;
}
@@ -2241,7 +2583,7 @@ static inline bool
gimple_call_from_thunk_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_FROM_THUNK) != 0;
+ return (s->subcode & GF_CALL_FROM_THUNK) != 0;
}
@@ -2253,9 +2595,9 @@ gimple_call_set_va_arg_pack (gimple s, bool pass_arg_pack_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (pass_arg_pack_p)
- s->gsbase.subcode |= GF_CALL_VA_ARG_PACK;
+ s->subcode |= GF_CALL_VA_ARG_PACK;
else
- s->gsbase.subcode &= ~GF_CALL_VA_ARG_PACK;
+ s->subcode &= ~GF_CALL_VA_ARG_PACK;
}
@@ -2266,7 +2608,7 @@ static inline bool
gimple_call_va_arg_pack_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_VA_ARG_PACK) != 0;
+ return (s->subcode & GF_CALL_VA_ARG_PACK) != 0;
}
@@ -2288,9 +2630,9 @@ gimple_call_set_nothrow (gimple s, bool nothrow_p)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (nothrow_p)
- s->gsbase.subcode |= GF_CALL_NOTHROW;
+ s->subcode |= GF_CALL_NOTHROW;
else
- s->gsbase.subcode &= ~GF_CALL_NOTHROW;
+ s->subcode &= ~GF_CALL_NOTHROW;
}
/* Return true if S is a nothrow call. */
@@ -2312,9 +2654,9 @@ gimple_call_set_alloca_for_var (gimple s, bool for_var)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
if (for_var)
- s->gsbase.subcode |= GF_CALL_ALLOCA_FOR_VAR;
+ s->subcode |= GF_CALL_ALLOCA_FOR_VAR;
else
- s->gsbase.subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
+ s->subcode &= ~GF_CALL_ALLOCA_FOR_VAR;
}
/* Return true of S is a call to builtin_alloca emitted for VLA objects. */
@@ -2323,7 +2665,7 @@ static inline bool
gimple_call_alloca_for_var_p (gimple s)
{
GIMPLE_CHECK (s, GIMPLE_CALL);
- return (s->gsbase.subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
+ return (s->subcode & GF_CALL_ALLOCA_FOR_VAR) != 0;
}
/* Copy all the GF_CALL_* flags from ORIG_CALL to DEST_CALL. */
@@ -2333,7 +2675,7 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
{
GIMPLE_CHECK (dest_call, GIMPLE_CALL);
GIMPLE_CHECK (orig_call, GIMPLE_CALL);
- dest_call->gsbase.subcode = orig_call->gsbase.subcode;
+ dest_call->subcode = orig_call->subcode;
}
@@ -2343,8 +2685,8 @@ gimple_call_copy_flags (gimple dest_call, gimple orig_call)
static inline struct pt_solution *
gimple_call_use_set (gimple call)
{
- GIMPLE_CHECK (call, GIMPLE_CALL);
- return &call->gimple_call.call_used;
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+ return &call_stmt->call_used;
}
@@ -2354,8 +2696,8 @@ gimple_call_use_set (gimple call)
static inline struct pt_solution *
gimple_call_clobber_set (gimple call)
{
- GIMPLE_CHECK (call, GIMPLE_CALL);
- return &call->gimple_call.call_clobbered;
+ gimple_statement_call *call_stmt = as_a <gimple_statement_call> (call);
+ return &call_stmt->call_clobbered;
}
@@ -2377,7 +2719,7 @@ static inline enum tree_code
gimple_cond_code (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
- return (enum tree_code) gs->gsbase.subcode;
+ return (enum tree_code) gs->subcode;
}
@@ -2387,7 +2729,7 @@ static inline void
gimple_cond_set_code (gimple gs, enum tree_code code)
{
GIMPLE_CHECK (gs, GIMPLE_COND);
- gs->gsbase.subcode = code;
+ gs->subcode = code;
}
@@ -2503,7 +2845,7 @@ gimple_cond_make_false (gimple gs)
{
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_rhs (gs, boolean_false_node);
- gs->gsbase.subcode = EQ_EXPR;
+ gs->subcode = EQ_EXPR;
}
@@ -2514,7 +2856,7 @@ gimple_cond_make_true (gimple gs)
{
gimple_cond_set_lhs (gs, boolean_true_node);
gimple_cond_set_rhs (gs, boolean_true_node);
- gs->gsbase.subcode = EQ_EXPR;
+ gs->subcode = EQ_EXPR;
}
/* Check if conditional statemente GS is of the form 'if (1 == 1)',
@@ -2623,8 +2965,9 @@ gimple_goto_set_dest (gimple gs, tree dest)
static inline tree
gimple_bind_vars (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return gs->gimple_bind.vars;
+ const gimple_statement_bind *bind_stmt =
+ as_a <const gimple_statement_bind> (gs);
+ return bind_stmt->vars;
}
@@ -2634,8 +2977,8 @@ gimple_bind_vars (const_gimple gs)
static inline void
gimple_bind_set_vars (gimple gs, tree vars)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.vars = vars;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->vars = vars;
}
@@ -2645,16 +2988,16 @@ gimple_bind_set_vars (gimple gs, tree vars)
static inline void
gimple_bind_append_vars (gimple gs, tree vars)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.vars = chainon (gs->gimple_bind.vars, vars);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->vars = chainon (bind_stmt->vars, vars);
}
static inline gimple_seq *
gimple_bind_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return &gs->gimple_bind.body;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ return &bind_stmt->body;
}
/* Return the GIMPLE sequence contained in the GIMPLE_BIND statement GS. */
@@ -2672,8 +3015,8 @@ gimple_bind_body (gimple gs)
static inline void
gimple_bind_set_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gs->gimple_bind.body = seq;
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ bind_stmt->body = seq;
}
@@ -2682,8 +3025,8 @@ gimple_bind_set_body (gimple gs, gimple_seq seq)
static inline void
gimple_bind_add_stmt (gimple gs, gimple stmt)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gimple_seq_add_stmt (&gs->gimple_bind.body, stmt);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ gimple_seq_add_stmt (&bind_stmt->body, stmt);
}
@@ -2692,8 +3035,8 @@ gimple_bind_add_stmt (gimple gs, gimple stmt)
static inline void
gimple_bind_add_seq (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- gimple_seq_add_seq (&gs->gimple_bind.body, seq);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
+ gimple_seq_add_seq (&bind_stmt->body, seq);
}
@@ -2703,8 +3046,9 @@ gimple_bind_add_seq (gimple gs, gimple_seq seq)
static inline tree
gimple_bind_block (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
- return gs->gimple_bind.block;
+ const gimple_statement_bind *bind_stmt =
+ as_a <const gimple_statement_bind> (gs);
+ return bind_stmt->block;
}
@@ -2714,10 +3058,10 @@ gimple_bind_block (const_gimple gs)
static inline void
gimple_bind_set_block (gimple gs, tree block)
{
- GIMPLE_CHECK (gs, GIMPLE_BIND);
+ gimple_statement_bind *bind_stmt = as_a <gimple_statement_bind> (gs);
gcc_gimple_checking_assert (block == NULL_TREE
|| TREE_CODE (block) == BLOCK);
- gs->gimple_bind.block = block;
+ bind_stmt->block = block;
}
@@ -2726,8 +3070,9 @@ gimple_bind_set_block (gimple gs, tree block)
static inline unsigned
gimple_asm_ninputs (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.ni;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->ni;
}
@@ -2736,8 +3081,9 @@ gimple_asm_ninputs (const_gimple gs)
static inline unsigned
gimple_asm_noutputs (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.no;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->no;
}
@@ -2746,8 +3092,9 @@ gimple_asm_noutputs (const_gimple gs)
static inline unsigned
gimple_asm_nclobbers (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.nc;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->nc;
}
/* Return the number of label operands for GIMPLE_ASM GS. */
@@ -2755,8 +3102,9 @@ gimple_asm_nclobbers (const_gimple gs)
static inline unsigned
gimple_asm_nlabels (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.nl;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->nl;
}
/* Return input operand INDEX of GIMPLE_ASM GS. */
@@ -2764,9 +3112,10 @@ gimple_asm_nlabels (const_gimple gs)
static inline tree
gimple_asm_input_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
- return gimple_op (gs, index + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni);
+ return gimple_op (gs, index + asm_stmt->no);
}
/* Return a pointer to input operand INDEX of GIMPLE_ASM GS. */
@@ -2774,9 +3123,10 @@ gimple_asm_input_op (const_gimple gs, unsigned index)
static inline tree *
gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni);
- return gimple_op_ptr (gs, index + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni);
+ return gimple_op_ptr (gs, index + asm_stmt->no);
}
@@ -2785,10 +3135,10 @@ gimple_asm_input_op_ptr (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.ni
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->ni
&& TREE_CODE (in_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.no, in_op);
+ gimple_set_op (gs, index + asm_stmt->no, in_op);
}
@@ -2797,8 +3147,9 @@ gimple_asm_set_input_op (gimple gs, unsigned index, tree in_op)
static inline tree
gimple_asm_output_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no);
return gimple_op (gs, index);
}
@@ -2807,8 +3158,9 @@ gimple_asm_output_op (const_gimple gs, unsigned index)
static inline tree *
gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no);
return gimple_op_ptr (gs, index);
}
@@ -2818,8 +3170,8 @@ gimple_asm_output_op_ptr (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.no
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->no
&& TREE_CODE (out_op) == TREE_LIST);
gimple_set_op (gs, index, out_op);
}
@@ -2830,9 +3182,10 @@ gimple_asm_set_output_op (gimple gs, unsigned index, tree out_op)
static inline tree
gimple_asm_clobber_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nc);
- return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nc);
+ return gimple_op (gs, index + asm_stmt->ni + asm_stmt->no);
}
@@ -2841,10 +3194,10 @@ gimple_asm_clobber_op (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nc
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nc
&& TREE_CODE (clobber_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.no, clobber_op);
+ gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->no, clobber_op);
}
/* Return label operand INDEX of GIMPLE_ASM GS. */
@@ -2852,9 +3205,10 @@ gimple_asm_set_clobber_op (gimple gs, unsigned index, tree clobber_op)
static inline tree
gimple_asm_label_op (const_gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nl);
- return gimple_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc);
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nl);
+ return gimple_op (gs, index + asm_stmt->ni + asm_stmt->nc);
}
/* Set LABEL_OP to be label operand INDEX in GIMPLE_ASM GS. */
@@ -2862,10 +3216,10 @@ gimple_asm_label_op (const_gimple gs, unsigned index)
static inline void
gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- gcc_gimple_checking_assert (index < gs->gimple_asm.nl
+ gimple_statement_asm *asm_stmt = as_a <gimple_statement_asm> (gs);
+ gcc_gimple_checking_assert (index < asm_stmt->nl
&& TREE_CODE (label_op) == TREE_LIST);
- gimple_set_op (gs, index + gs->gimple_asm.ni + gs->gimple_asm.nc, label_op);
+ gimple_set_op (gs, index + asm_stmt->ni + asm_stmt->nc, label_op);
}
/* Return the string representing the assembly instruction in
@@ -2874,8 +3228,9 @@ gimple_asm_set_label_op (gimple gs, unsigned index, tree label_op)
static inline const char *
gimple_asm_string (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_ASM);
- return gs->gimple_asm.string;
+ const gimple_statement_asm *asm_stmt =
+ as_a <const gimple_statement_asm> (gs);
+ return asm_stmt->string;
}
@@ -2885,7 +3240,7 @@ static inline bool
gimple_asm_volatile_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
- return (gs->gsbase.subcode & GF_ASM_VOLATILE) != 0;
+ return (gs->subcode & GF_ASM_VOLATILE) != 0;
}
@@ -2896,9 +3251,9 @@ gimple_asm_set_volatile (gimple gs, bool volatile_p)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
if (volatile_p)
- gs->gsbase.subcode |= GF_ASM_VOLATILE;
+ gs->subcode |= GF_ASM_VOLATILE;
else
- gs->gsbase.subcode &= ~GF_ASM_VOLATILE;
+ gs->subcode &= ~GF_ASM_VOLATILE;
}
@@ -2909,9 +3264,9 @@ gimple_asm_set_input (gimple gs, bool input_p)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
if (input_p)
- gs->gsbase.subcode |= GF_ASM_INPUT;
+ gs->subcode |= GF_ASM_INPUT;
else
- gs->gsbase.subcode &= ~GF_ASM_INPUT;
+ gs->subcode &= ~GF_ASM_INPUT;
}
@@ -2921,7 +3276,7 @@ static inline bool
gimple_asm_input_p (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_ASM);
- return (gs->gsbase.subcode & GF_ASM_INPUT) != 0;
+ return (gs->subcode & GF_ASM_INPUT) != 0;
}
@@ -2930,8 +3285,9 @@ gimple_asm_input_p (const_gimple gs)
static inline tree
gimple_catch_types (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return gs->gimple_catch.types;
+ const gimple_statement_catch *catch_stmt =
+ as_a <const gimple_statement_catch> (gs);
+ return catch_stmt->types;
}
@@ -2940,8 +3296,8 @@ gimple_catch_types (const_gimple gs)
static inline tree *
gimple_catch_types_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return &gs->gimple_catch.types;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ return &catch_stmt->types;
}
@@ -2951,8 +3307,8 @@ gimple_catch_types_ptr (gimple gs)
static inline gimple_seq *
gimple_catch_handler_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- return &gs->gimple_catch.handler;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ return &catch_stmt->handler;
}
@@ -2971,8 +3327,8 @@ gimple_catch_handler (gimple gs)
static inline void
gimple_catch_set_types (gimple gs, tree t)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- gs->gimple_catch.types = t;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ catch_stmt->types = t;
}
@@ -2981,8 +3337,8 @@ gimple_catch_set_types (gimple gs, tree t)
static inline void
gimple_catch_set_handler (gimple gs, gimple_seq handler)
{
- GIMPLE_CHECK (gs, GIMPLE_CATCH);
- gs->gimple_catch.handler = handler;
+ gimple_statement_catch *catch_stmt = as_a <gimple_statement_catch> (gs);
+ catch_stmt->handler = handler;
}
@@ -2991,8 +3347,9 @@ gimple_catch_set_handler (gimple gs, gimple_seq handler)
static inline tree
gimple_eh_filter_types (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return gs->gimple_eh_filter.types;
+ const gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <const gimple_statement_eh_filter> (gs);
+ return eh_filter_stmt->types;
}
@@ -3002,8 +3359,9 @@ gimple_eh_filter_types (const_gimple gs)
static inline tree *
gimple_eh_filter_types_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return &gs->gimple_eh_filter.types;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ return &eh_filter_stmt->types;
}
@@ -3013,8 +3371,9 @@ gimple_eh_filter_types_ptr (gimple gs)
static inline gimple_seq *
gimple_eh_filter_failure_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- return &gs->gimple_eh_filter.failure;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ return &eh_filter_stmt->failure;
}
@@ -3033,8 +3392,9 @@ gimple_eh_filter_failure (gimple gs)
static inline void
gimple_eh_filter_set_types (gimple gs, tree types)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- gs->gimple_eh_filter.types = types;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ eh_filter_stmt->types = types;
}
@@ -3044,8 +3404,9 @@ gimple_eh_filter_set_types (gimple gs, tree types)
static inline void
gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_FILTER);
- gs->gimple_eh_filter.failure = failure;
+ gimple_statement_eh_filter *eh_filter_stmt =
+ as_a <gimple_statement_eh_filter> (gs);
+ eh_filter_stmt->failure = failure;
}
/* Get the function decl to be called by the MUST_NOT_THROW region. */
@@ -3053,8 +3414,8 @@ gimple_eh_filter_set_failure (gimple gs, gimple_seq failure)
static inline tree
gimple_eh_must_not_throw_fndecl (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
- return gs->gimple_eh_mnt.fndecl;
+ gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+ return eh_mnt_stmt->fndecl;
}
/* Set the function decl to be called by GS to DECL. */
@@ -3062,8 +3423,8 @@ gimple_eh_must_not_throw_fndecl (gimple gs)
static inline void
gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_MUST_NOT_THROW);
- gs->gimple_eh_mnt.fndecl = decl;
+ gimple_statement_eh_mnt *eh_mnt_stmt = as_a <gimple_statement_eh_mnt> (gs);
+ eh_mnt_stmt->fndecl = decl;
}
/* GIMPLE_EH_ELSE accessors. */
@@ -3071,8 +3432,9 @@ gimple_eh_must_not_throw_set_fndecl (gimple gs, tree decl)
static inline gimple_seq *
gimple_eh_else_n_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- return &gs->gimple_eh_else.n_body;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ return &eh_else_stmt->n_body;
}
static inline gimple_seq
@@ -3084,8 +3446,9 @@ gimple_eh_else_n_body (gimple gs)
static inline gimple_seq *
gimple_eh_else_e_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- return &gs->gimple_eh_else.e_body;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ return &eh_else_stmt->e_body;
}
static inline gimple_seq
@@ -3097,15 +3460,17 @@ gimple_eh_else_e_body (gimple gs)
static inline void
gimple_eh_else_set_n_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- gs->gimple_eh_else.n_body = seq;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ eh_else_stmt->n_body = seq;
}
static inline void
gimple_eh_else_set_e_body (gimple gs, gimple_seq seq)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_ELSE);
- gs->gimple_eh_else.e_body = seq;
+ gimple_statement_eh_else *eh_else_stmt =
+ as_a <gimple_statement_eh_else> (gs);
+ eh_else_stmt->e_body = seq;
}
/* GIMPLE_TRY accessors. */
@@ -3117,7 +3482,7 @@ static inline enum gimple_try_flags
gimple_try_kind (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_TRY);
- return (enum gimple_try_flags) (gs->gsbase.subcode & GIMPLE_TRY_KIND);
+ return (enum gimple_try_flags) (gs->subcode & GIMPLE_TRY_KIND);
}
@@ -3130,7 +3495,7 @@ gimple_try_set_kind (gimple gs, enum gimple_try_flags kind)
gcc_gimple_checking_assert (kind == GIMPLE_TRY_CATCH
|| kind == GIMPLE_TRY_FINALLY);
if (gimple_try_kind (gs) != kind)
- gs->gsbase.subcode = (unsigned int) kind;
+ gs->subcode = (unsigned int) kind;
}
@@ -3140,7 +3505,7 @@ static inline bool
gimple_try_catch_is_cleanup (const_gimple gs)
{
gcc_gimple_checking_assert (gimple_try_kind (gs) == GIMPLE_TRY_CATCH);
- return (gs->gsbase.subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
+ return (gs->subcode & GIMPLE_TRY_CATCH_IS_CLEANUP) != 0;
}
@@ -3150,8 +3515,8 @@ gimple_try_catch_is_cleanup (const_gimple gs)
static inline gimple_seq *
gimple_try_eval_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- return &gs->gimple_try.eval;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ return &try_stmt->eval;
}
@@ -3170,8 +3535,8 @@ gimple_try_eval (gimple gs)
static inline gimple_seq *
gimple_try_cleanup_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- return &gs->gimple_try.cleanup;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ return &try_stmt->cleanup;
}
@@ -3192,9 +3557,9 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
{
gcc_gimple_checking_assert (gimple_try_kind (g) == GIMPLE_TRY_CATCH);
if (catch_is_cleanup)
- g->gsbase.subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
+ g->subcode |= GIMPLE_TRY_CATCH_IS_CLEANUP;
else
- g->gsbase.subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
+ g->subcode &= ~GIMPLE_TRY_CATCH_IS_CLEANUP;
}
@@ -3204,8 +3569,8 @@ gimple_try_set_catch_is_cleanup (gimple g, bool catch_is_cleanup)
static inline void
gimple_try_set_eval (gimple gs, gimple_seq eval)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- gs->gimple_try.eval = eval;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ try_stmt->eval = eval;
}
@@ -3215,8 +3580,8 @@ gimple_try_set_eval (gimple gs, gimple_seq eval)
static inline void
gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
{
- GIMPLE_CHECK (gs, GIMPLE_TRY);
- gs->gimple_try.cleanup = cleanup;
+ gimple_statement_try *try_stmt = as_a <gimple_statement_try> (gs);
+ try_stmt->cleanup = cleanup;
}
@@ -3225,8 +3590,8 @@ gimple_try_set_cleanup (gimple gs, gimple_seq cleanup)
static inline gimple_seq *
gimple_wce_cleanup_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- return &gs->gimple_wce.cleanup;
+ gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+ return &wce_stmt->cleanup;
}
@@ -3244,8 +3609,8 @@ gimple_wce_cleanup (gimple gs)
static inline void
gimple_wce_set_cleanup (gimple gs, gimple_seq cleanup)
{
- GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- gs->gimple_wce.cleanup = cleanup;
+ gimple_statement_wce *wce_stmt = as_a <gimple_statement_wce> (gs);
+ wce_stmt->cleanup = cleanup;
}
@@ -3255,7 +3620,7 @@ static inline bool
gimple_wce_cleanup_eh_only (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- return gs->gsbase.subcode != 0;
+ return gs->subcode != 0;
}
@@ -3265,7 +3630,7 @@ static inline void
gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
{
GIMPLE_CHECK (gs, GIMPLE_WITH_CLEANUP_EXPR);
- gs->gsbase.subcode = (unsigned int) eh_only_p;
+ gs->subcode = (unsigned int) eh_only_p;
}
@@ -3274,8 +3639,9 @@ gimple_wce_set_cleanup_eh_only (gimple gs, bool eh_only_p)
static inline unsigned
gimple_phi_capacity (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.capacity;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->capacity;
}
@@ -3286,8 +3652,9 @@ gimple_phi_capacity (const_gimple gs)
static inline unsigned
gimple_phi_num_args (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.nargs;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->nargs;
}
@@ -3296,8 +3663,9 @@ gimple_phi_num_args (const_gimple gs)
static inline tree
gimple_phi_result (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return gs->gimple_phi.result;
+ const gimple_statement_phi *phi_stmt =
+ as_a <const gimple_statement_phi> (gs);
+ return phi_stmt->result;
}
/* Return a pointer to the SSA name created by GIMPLE_PHI GS. */
@@ -3305,8 +3673,8 @@ gimple_phi_result (const_gimple gs)
static inline tree *
gimple_phi_result_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- return &gs->gimple_phi.result;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ return &phi_stmt->result;
}
/* Set RESULT to be the SSA name created by GIMPLE_PHI GS. */
@@ -3314,8 +3682,8 @@ gimple_phi_result_ptr (gimple gs)
static inline void
gimple_phi_set_result (gimple gs, tree result)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gs->gimple_phi.result = result;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ phi_stmt->result = result;
if (result && TREE_CODE (result) == SSA_NAME)
SSA_NAME_DEF_STMT (result) = gs;
}
@@ -3327,9 +3695,9 @@ gimple_phi_set_result (gimple gs, tree result)
static inline struct phi_arg_d *
gimple_phi_arg (gimple gs, unsigned index)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gcc_gimple_checking_assert (index <= gs->gimple_phi.capacity);
- return &(gs->gimple_phi.args[index]);
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (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
@@ -3338,9 +3706,9 @@ gimple_phi_arg (gimple gs, unsigned index)
static inline void
gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
{
- GIMPLE_CHECK (gs, GIMPLE_PHI);
- gcc_gimple_checking_assert (index <= gs->gimple_phi.nargs);
- gs->gimple_phi.args[index] = *phiarg;
+ gimple_statement_phi *phi_stmt = as_a <gimple_statement_phi> (gs);
+ gcc_gimple_checking_assert (index <= phi_stmt->nargs);
+ phi_stmt->args[index] = *phiarg;
}
/* Return the PHI nodes for basic block BB, or NULL if there are no
@@ -3425,8 +3793,9 @@ gimple_phi_arg_has_location (gimple gs, size_t i)
static inline int
gimple_resx_region (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_RESX);
- return gs->gimple_eh_ctrl.region;
+ const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <const gimple_statement_eh_ctrl> (gs);
+ return eh_ctrl_stmt->region;
}
/* Set REGION to be the region number for GIMPLE_RESX GS. */
@@ -3434,8 +3803,9 @@ gimple_resx_region (const_gimple gs)
static inline void
gimple_resx_set_region (gimple gs, int region)
{
- GIMPLE_CHECK (gs, GIMPLE_RESX);
- gs->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <gimple_statement_eh_ctrl> (gs);
+ eh_ctrl_stmt->region = region;
}
/* Return the region number for GIMPLE_EH_DISPATCH GS. */
@@ -3443,8 +3813,9 @@ gimple_resx_set_region (gimple gs, int region)
static inline int
gimple_eh_dispatch_region (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
- return gs->gimple_eh_ctrl.region;
+ const gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <const gimple_statement_eh_ctrl> (gs);
+ return eh_ctrl_stmt->region;
}
/* Set REGION to be the region number for GIMPLE_EH_DISPATCH GS. */
@@ -3452,8 +3823,9 @@ gimple_eh_dispatch_region (const_gimple gs)
static inline void
gimple_eh_dispatch_set_region (gimple gs, int region)
{
- GIMPLE_CHECK (gs, GIMPLE_EH_DISPATCH);
- gs->gimple_eh_ctrl.region = region;
+ gimple_statement_eh_ctrl *eh_ctrl_stmt =
+ as_a <gimple_statement_eh_ctrl> (gs);
+ eh_ctrl_stmt->region = region;
}
/* Return the number of labels associated with the switch statement GS. */
@@ -3566,7 +3938,7 @@ static inline bool
gimple_debug_bind_p (const_gimple s)
{
if (is_gimple_debug (s))
- return s->gsbase.subcode == GIMPLE_DEBUG_BIND;
+ return s->subcode == GIMPLE_DEBUG_BIND;
return false;
}
@@ -3658,7 +4030,7 @@ static inline bool
gimple_debug_source_bind_p (const_gimple s)
{
if (is_gimple_debug (s))
- return s->gsbase.subcode == GIMPLE_DEBUG_SOURCE_BIND;
+ return s->subcode == GIMPLE_DEBUG_SOURCE_BIND;
return false;
}
@@ -3738,7 +4110,7 @@ get_lineno (const_gimple stmt)
static inline gimple_seq *
gimple_omp_body_ptr (gimple gs)
{
- return &gs->omp.body;
+ return &static_cast <gimple_statement_omp *> (gs)->body;
}
/* Return the body for the OMP statement GS. */
@@ -3754,7 +4126,7 @@ gimple_omp_body (gimple gs)
static inline void
gimple_omp_set_body (gimple gs, gimple_seq body)
{
- gs->omp.body = body;
+ static_cast <gimple_statement_omp *> (gs)->body = body;
}
@@ -3763,8 +4135,9 @@ gimple_omp_set_body (gimple gs, gimple_seq body)
static inline tree
gimple_omp_critical_name (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- return gs->gimple_omp_critical.name;
+ const gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <const gimple_statement_omp_critical> (gs);
+ return omp_critical_stmt->name;
}
@@ -3773,8 +4146,9 @@ gimple_omp_critical_name (const_gimple gs)
static inline tree *
gimple_omp_critical_name_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- return &gs->gimple_omp_critical.name;
+ gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <gimple_statement_omp_critical> (gs);
+ return &omp_critical_stmt->name;
}
@@ -3783,8 +4157,9 @@ gimple_omp_critical_name_ptr (gimple gs)
static inline void
gimple_omp_critical_set_name (gimple gs, tree name)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_CRITICAL);
- gs->gimple_omp_critical.name = name;
+ gimple_statement_omp_critical *omp_critical_stmt =
+ as_a <gimple_statement_omp_critical> (gs);
+ omp_critical_stmt->name = name;
}
@@ -3804,7 +4179,7 @@ static inline void
gimple_omp_for_set_kind (gimple g, int kind)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
- g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_FOR_KIND_MASK)
+ g->subcode = (g->subcode & ~GF_OMP_FOR_KIND_MASK)
| (kind & GF_OMP_FOR_KIND_MASK);
}
@@ -3828,9 +4203,9 @@ gimple_omp_for_set_combined_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_FOR_COMBINED;
+ g->subcode |= GF_OMP_FOR_COMBINED;
else
- g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED;
+ g->subcode &= ~GF_OMP_FOR_COMBINED;
}
@@ -3853,9 +4228,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
{
GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
if (combined_p)
- g->gsbase.subcode |= GF_OMP_FOR_COMBINED_INTO;
+ g->subcode |= GF_OMP_FOR_COMBINED_INTO;
else
- g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED_INTO;
+ g->subcode &= ~GF_OMP_FOR_COMBINED_INTO;
}
@@ -3864,8 +4239,9 @@ gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
static inline tree
gimple_omp_for_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return gs->gimple_omp_for.clauses;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ return omp_for_stmt->clauses;
}
@@ -3874,8 +4250,9 @@ gimple_omp_for_clauses (const_gimple gs)
static inline tree *
gimple_omp_for_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return &gs->gimple_omp_for.clauses;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return &omp_for_stmt->clauses;
}
@@ -3884,8 +4261,9 @@ gimple_omp_for_clauses_ptr (gimple gs)
static inline void
gimple_omp_for_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gs->gimple_omp_for.clauses = clauses;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ omp_for_stmt->clauses = clauses;
}
@@ -3894,8 +4272,9 @@ gimple_omp_for_set_clauses (gimple gs, tree clauses)
static inline size_t
gimple_omp_for_collapse (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- return gs->gimple_omp_for.collapse;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return omp_for_stmt->collapse;
}
@@ -3904,9 +4283,10 @@ gimple_omp_for_collapse (gimple gs)
static inline tree
gimple_omp_for_index (const_gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].index;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].index;
}
@@ -3915,9 +4295,10 @@ gimple_omp_for_index (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_index_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].index;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].index;
}
@@ -3926,9 +4307,10 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].index = index;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].index = index;
}
@@ -3937,9 +4319,10 @@ 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)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].initial;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].initial;
}
@@ -3948,9 +4331,10 @@ gimple_omp_for_initial (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_initial_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].initial;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].initial;
}
@@ -3959,9 +4343,10 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].initial = initial;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].initial = initial;
}
@@ -3970,9 +4355,10 @@ 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)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].final;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].final;
}
@@ -3981,9 +4367,10 @@ gimple_omp_for_final (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_final_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].final;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].final;
}
@@ -3992,9 +4379,10 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].final = final;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].final = final;
}
@@ -4003,9 +4391,10 @@ 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)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].incr;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].incr;
}
@@ -4014,9 +4403,10 @@ gimple_omp_for_incr (const_gimple gs, size_t i)
static inline tree *
gimple_omp_for_incr_ptr (gimple gs, size_t i)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return &gs->gimple_omp_for.iter[i].incr;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return &omp_for_stmt->iter[i].incr;
}
@@ -4025,9 +4415,10 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].incr = incr;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].incr = incr;
}
@@ -4037,8 +4428,9 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
- return &gs->gimple_omp_for.pre_body;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ return &omp_for_stmt->pre_body;
}
@@ -4058,8 +4450,9 @@ gimple_omp_for_pre_body (gimple gs)
static inline void
gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gs->gimple_omp_for.pre_body = pre_body;
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
+ omp_for_stmt->pre_body = pre_body;
}
@@ -4068,8 +4461,9 @@ gimple_omp_for_set_pre_body (gimple gs, gimple_seq pre_body)
static inline tree
gimple_omp_parallel_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4078,8 +4472,9 @@ gimple_omp_parallel_clauses (const_gimple gs)
static inline tree *
gimple_omp_parallel_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4089,8 +4484,9 @@ gimple_omp_parallel_clauses_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4099,8 +4495,9 @@ gimple_omp_parallel_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_parallel_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4109,8 +4506,9 @@ gimple_omp_parallel_child_fn (const_gimple gs)
static inline tree *
gimple_omp_parallel_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4119,8 +4517,9 @@ gimple_omp_parallel_child_fn_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4130,8 +4529,9 @@ gimple_omp_parallel_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_parallel_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4140,8 +4540,9 @@ gimple_omp_parallel_data_arg (const_gimple gs)
static inline tree *
gimple_omp_parallel_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4150,8 +4551,9 @@ gimple_omp_parallel_data_arg_ptr (gimple gs)
static inline void
gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_PARALLEL);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4160,8 +4562,9 @@ gimple_omp_parallel_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_task_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->clauses;
}
@@ -4170,8 +4573,9 @@ gimple_omp_task_clauses (const_gimple gs)
static inline tree *
gimple_omp_task_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->clauses;
}
@@ -4181,8 +4585,9 @@ gimple_omp_task_clauses_ptr (gimple gs)
static inline void
gimple_omp_task_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->clauses = clauses;
}
@@ -4191,8 +4596,9 @@ gimple_omp_task_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_task_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4201,8 +4607,9 @@ gimple_omp_task_child_fn (const_gimple gs)
static inline tree *
gimple_omp_task_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->child_fn;
}
@@ -4211,8 +4618,9 @@ gimple_omp_task_child_fn_ptr (gimple gs)
static inline void
gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->child_fn = child_fn;
}
@@ -4222,8 +4630,9 @@ gimple_omp_task_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_task_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->data_arg;
}
@@ -4232,8 +4641,9 @@ gimple_omp_task_data_arg (const_gimple gs)
static inline tree *
gimple_omp_task_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->data_arg;
}
@@ -4242,8 +4652,9 @@ gimple_omp_task_data_arg_ptr (gimple gs)
static inline void
gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->data_arg = data_arg;
}
@@ -4252,9 +4663,9 @@ gimple_omp_task_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_taskreg_clauses (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4263,9 +4674,9 @@ gimple_omp_taskreg_clauses (const_gimple gs)
static inline tree *
gimple_omp_taskreg_clauses_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4275,9 +4686,9 @@ gimple_omp_taskreg_clauses_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4286,9 +4697,9 @@ gimple_omp_taskreg_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_taskreg_child_fn (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4297,9 +4708,9 @@ gimple_omp_taskreg_child_fn (const_gimple gs)
static inline tree *
gimple_omp_taskreg_child_fn_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4308,9 +4719,9 @@ gimple_omp_taskreg_child_fn_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4320,9 +4731,9 @@ gimple_omp_taskreg_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_taskreg_data_arg (const_gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4331,9 +4742,9 @@ gimple_omp_taskreg_data_arg (const_gimple gs)
static inline tree *
gimple_omp_taskreg_data_arg_ptr (gimple gs)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4342,9 +4753,9 @@ gimple_omp_taskreg_data_arg_ptr (gimple gs)
static inline void
gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
{
- if (gimple_code (gs) != GIMPLE_OMP_PARALLEL)
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4353,8 +4764,9 @@ gimple_omp_taskreg_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_task_copy_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.copy_fn;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->copy_fn;
}
/* Return a pointer to the copy function used to hold the body of
@@ -4363,8 +4775,9 @@ gimple_omp_task_copy_fn (const_gimple gs)
static inline tree *
gimple_omp_task_copy_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.copy_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->copy_fn;
}
@@ -4373,8 +4786,9 @@ gimple_omp_task_copy_fn_ptr (gimple gs)
static inline void
gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.copy_fn = copy_fn;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->copy_fn = copy_fn;
}
@@ -4383,8 +4797,9 @@ gimple_omp_task_set_copy_fn (gimple gs, tree copy_fn)
static inline tree
gimple_omp_task_arg_size (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.arg_size;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->arg_size;
}
@@ -4393,8 +4808,9 @@ gimple_omp_task_arg_size (const_gimple gs)
static inline tree *
gimple_omp_task_arg_size_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.arg_size;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->arg_size;
}
@@ -4403,8 +4819,9 @@ gimple_omp_task_arg_size_ptr (gimple gs)
static inline void
gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.arg_size = arg_size;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->arg_size = arg_size;
}
@@ -4413,8 +4830,9 @@ gimple_omp_task_set_arg_size (gimple gs, tree arg_size)
static inline tree
gimple_omp_task_arg_align (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return gs->gimple_omp_task.arg_align;
+ const gimple_statement_omp_task *omp_task_stmt =
+ as_a <const gimple_statement_omp_task> (gs);
+ return omp_task_stmt->arg_align;
}
@@ -4423,8 +4841,9 @@ gimple_omp_task_arg_align (const_gimple gs)
static inline tree *
gimple_omp_task_arg_align_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- return &gs->gimple_omp_task.arg_align;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ return &omp_task_stmt->arg_align;
}
@@ -4433,8 +4852,9 @@ gimple_omp_task_arg_align_ptr (gimple gs)
static inline void
gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TASK);
- gs->gimple_omp_task.arg_align = arg_align;
+ gimple_statement_omp_task *omp_task_stmt =
+ as_a <gimple_statement_omp_task> (gs);
+ omp_task_stmt->arg_align = arg_align;
}
@@ -4443,8 +4863,9 @@ gimple_omp_task_set_arg_align (gimple gs, tree arg_align)
static inline tree
gimple_omp_single_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- return gs->gimple_omp_single.clauses;
+ const gimple_statement_omp_single *omp_single_stmt =
+ as_a <const gimple_statement_omp_single> (gs);
+ return omp_single_stmt->clauses;
}
@@ -4453,8 +4874,9 @@ gimple_omp_single_clauses (const_gimple gs)
static inline tree *
gimple_omp_single_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- return &gs->gimple_omp_single.clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ return &omp_single_stmt->clauses;
}
@@ -4463,8 +4885,9 @@ gimple_omp_single_clauses_ptr (gimple gs)
static inline void
gimple_omp_single_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SINGLE);
- gs->gimple_omp_single.clauses = clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ omp_single_stmt->clauses = clauses;
}
@@ -4473,8 +4896,9 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_target_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.clauses;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->clauses;
}
@@ -4483,8 +4907,9 @@ gimple_omp_target_clauses (const_gimple gs)
static inline tree *
gimple_omp_target_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->clauses;
}
@@ -4493,8 +4918,9 @@ gimple_omp_target_clauses_ptr (gimple gs)
static inline void
gimple_omp_target_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.clauses = clauses;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->clauses = clauses;
}
@@ -4514,7 +4940,7 @@ static inline void
gimple_omp_target_set_kind (gimple g, int kind)
{
GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
- g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_TARGET_KIND_MASK)
+ g->subcode = (g->subcode & ~GF_OMP_TARGET_KIND_MASK)
| (kind & GF_OMP_TARGET_KIND_MASK);
}
@@ -4524,8 +4950,9 @@ gimple_omp_target_set_kind (gimple g, int kind)
static inline tree
gimple_omp_target_child_fn (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.child_fn;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->child_fn;
}
/* Return a pointer to the child function used to hold the body of
@@ -4534,8 +4961,9 @@ gimple_omp_target_child_fn (const_gimple gs)
static inline tree *
gimple_omp_target_child_fn_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->child_fn;
}
@@ -4544,8 +4972,9 @@ gimple_omp_target_child_fn_ptr (gimple gs)
static inline void
gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.child_fn = child_fn;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->child_fn = child_fn;
}
@@ -4555,8 +4984,9 @@ gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
static inline tree
gimple_omp_target_data_arg (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return gs->gimple_omp_parallel.data_arg;
+ const gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <const gimple_statement_omp_parallel> (gs);
+ return omp_parallel_stmt->data_arg;
}
@@ -4565,8 +4995,9 @@ gimple_omp_target_data_arg (const_gimple gs)
static inline tree *
gimple_omp_target_data_arg_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- return &gs->gimple_omp_parallel.data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ return &omp_parallel_stmt->data_arg;
}
@@ -4575,8 +5006,9 @@ gimple_omp_target_data_arg_ptr (gimple gs)
static inline void
gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
- gs->gimple_omp_parallel.data_arg = data_arg;
+ gimple_statement_omp_parallel *omp_parallel_stmt =
+ as_a <gimple_statement_omp_parallel> (gs);
+ omp_parallel_stmt->data_arg = data_arg;
}
@@ -4585,8 +5017,9 @@ gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
static inline tree
gimple_omp_teams_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- return gs->gimple_omp_single.clauses;
+ const gimple_statement_omp_single *omp_single_stmt =
+ as_a <const gimple_statement_omp_single> (gs);
+ return omp_single_stmt->clauses;
}
@@ -4595,8 +5028,9 @@ gimple_omp_teams_clauses (const_gimple gs)
static inline tree *
gimple_omp_teams_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- return &gs->gimple_omp_single.clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ return &omp_single_stmt->clauses;
}
@@ -4605,8 +5039,9 @@ gimple_omp_teams_clauses_ptr (gimple gs)
static inline void
gimple_omp_teams_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
- gs->gimple_omp_single.clauses = clauses;
+ gimple_statement_omp_single *omp_single_stmt =
+ as_a <gimple_statement_omp_single> (gs);
+ omp_single_stmt->clauses = clauses;
}
@@ -4615,8 +5050,9 @@ gimple_omp_teams_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_sections_clauses (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return gs->gimple_omp_sections.clauses;
+ const gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <const gimple_statement_omp_sections> (gs);
+ return omp_sections_stmt->clauses;
}
@@ -4625,8 +5061,9 @@ gimple_omp_sections_clauses (const_gimple gs)
static inline tree *
gimple_omp_sections_clauses_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return &gs->gimple_omp_sections.clauses;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ return &omp_sections_stmt->clauses;
}
@@ -4636,8 +5073,9 @@ gimple_omp_sections_clauses_ptr (gimple gs)
static inline void
gimple_omp_sections_set_clauses (gimple gs, tree clauses)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- gs->gimple_omp_sections.clauses = clauses;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ omp_sections_stmt->clauses = clauses;
}
@@ -4647,8 +5085,9 @@ gimple_omp_sections_set_clauses (gimple gs, tree clauses)
static inline tree
gimple_omp_sections_control (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return gs->gimple_omp_sections.control;
+ const gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <const gimple_statement_omp_sections> (gs);
+ return omp_sections_stmt->control;
}
@@ -4658,8 +5097,9 @@ gimple_omp_sections_control (const_gimple gs)
static inline tree *
gimple_omp_sections_control_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- return &gs->gimple_omp_sections.control;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ return &omp_sections_stmt->control;
}
@@ -4669,8 +5109,9 @@ gimple_omp_sections_control_ptr (gimple gs)
static inline void
gimple_omp_sections_set_control (gimple gs, tree control)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_SECTIONS);
- gs->gimple_omp_sections.control = control;
+ gimple_statement_omp_sections *omp_sections_stmt =
+ as_a <gimple_statement_omp_sections> (gs);
+ omp_sections_stmt->control = control;
}
@@ -4679,10 +5120,11 @@ 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_CHECK (gs, GIMPLE_OMP_FOR);
+ gimple_statement_omp_for *omp_for_stmt =
+ as_a <gimple_statement_omp_for> (gs);
gcc_gimple_checking_assert (TREE_CODE_CLASS (cond) == tcc_comparison
- && i < gs->gimple_omp_for.collapse);
- gs->gimple_omp_for.iter[i].cond = cond;
+ && i < omp_for_stmt->collapse);
+ omp_for_stmt->iter[i].cond = cond;
}
@@ -4691,9 +5133,10 @@ 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)
{
- GIMPLE_CHECK (gs, GIMPLE_OMP_FOR);
- gcc_gimple_checking_assert (i < gs->gimple_omp_for.collapse);
- return gs->gimple_omp_for.iter[i].cond;
+ const gimple_statement_omp_for *omp_for_stmt =
+ as_a <const gimple_statement_omp_for> (gs);
+ gcc_gimple_checking_assert (i < omp_for_stmt->collapse);
+ return omp_for_stmt->iter[i].cond;
}
@@ -4702,8 +5145,9 @@ gimple_omp_for_cond (const_gimple gs, size_t i)
static inline void
gimple_omp_atomic_store_set_val (gimple g, tree val)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- g->gimple_omp_atomic_store.val = val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ omp_atomic_store_stmt->val = val;
}
@@ -4712,8 +5156,9 @@ gimple_omp_atomic_store_set_val (gimple g, tree val)
static inline tree
gimple_omp_atomic_store_val (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- return g->gimple_omp_atomic_store.val;
+ const gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <const gimple_statement_omp_atomic_store> (g);
+ return omp_atomic_store_stmt->val;
}
@@ -4722,8 +5167,9 @@ gimple_omp_atomic_store_val (const_gimple g)
static inline tree *
gimple_omp_atomic_store_val_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
- return &g->gimple_omp_atomic_store.val;
+ gimple_statement_omp_atomic_store *omp_atomic_store_stmt =
+ as_a <gimple_statement_omp_atomic_store> (g);
+ return &omp_atomic_store_stmt->val;
}
@@ -4732,8 +5178,9 @@ gimple_omp_atomic_store_val_ptr (gimple g)
static inline void
gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- g->gimple_omp_atomic_load.lhs = lhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ omp_atomic_load_stmt->lhs = lhs;
}
@@ -4742,8 +5189,9 @@ gimple_omp_atomic_load_set_lhs (gimple g, tree lhs)
static inline tree
gimple_omp_atomic_load_lhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return g->gimple_omp_atomic_load.lhs;
+ const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <const gimple_statement_omp_atomic_load> (g);
+ return omp_atomic_load_stmt->lhs;
}
@@ -4752,8 +5200,9 @@ gimple_omp_atomic_load_lhs (const_gimple g)
static inline tree *
gimple_omp_atomic_load_lhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return &g->gimple_omp_atomic_load.lhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ return &omp_atomic_load_stmt->lhs;
}
@@ -4762,8 +5211,9 @@ gimple_omp_atomic_load_lhs_ptr (gimple g)
static inline void
gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- g->gimple_omp_atomic_load.rhs = rhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ omp_atomic_load_stmt->rhs = rhs;
}
@@ -4772,8 +5222,9 @@ gimple_omp_atomic_load_set_rhs (gimple g, tree rhs)
static inline tree
gimple_omp_atomic_load_rhs (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return g->gimple_omp_atomic_load.rhs;
+ const gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <const gimple_statement_omp_atomic_load> (g);
+ return omp_atomic_load_stmt->rhs;
}
@@ -4782,8 +5233,9 @@ gimple_omp_atomic_load_rhs (const_gimple g)
static inline tree *
gimple_omp_atomic_load_rhs_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_LOAD);
- return &g->gimple_omp_atomic_load.rhs;
+ gimple_statement_omp_atomic_load *omp_atomic_load_stmt =
+ as_a <gimple_statement_omp_atomic_load> (g);
+ return &omp_atomic_load_stmt->rhs;
}
@@ -4792,8 +5244,9 @@ gimple_omp_atomic_load_rhs_ptr (gimple g)
static inline tree
gimple_omp_continue_control_def (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return g->gimple_omp_continue.control_def;
+ const gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <const gimple_statement_omp_continue> (g);
+ return omp_continue_stmt->control_def;
}
/* The same as above, but return the address. */
@@ -4801,8 +5254,9 @@ gimple_omp_continue_control_def (const_gimple g)
static inline tree *
gimple_omp_continue_control_def_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return &g->gimple_omp_continue.control_def;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ return &omp_continue_stmt->control_def;
}
/* Set the definition of the control variable in a GIMPLE_OMP_CONTINUE. */
@@ -4810,8 +5264,9 @@ gimple_omp_continue_control_def_ptr (gimple g)
static inline void
gimple_omp_continue_set_control_def (gimple g, tree def)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- g->gimple_omp_continue.control_def = def;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ omp_continue_stmt->control_def = def;
}
@@ -4820,8 +5275,9 @@ gimple_omp_continue_set_control_def (gimple g, tree def)
static inline tree
gimple_omp_continue_control_use (const_gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return g->gimple_omp_continue.control_use;
+ const gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <const gimple_statement_omp_continue> (g);
+ return omp_continue_stmt->control_use;
}
@@ -4830,8 +5286,9 @@ gimple_omp_continue_control_use (const_gimple g)
static inline tree *
gimple_omp_continue_control_use_ptr (gimple g)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- return &g->gimple_omp_continue.control_use;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ return &omp_continue_stmt->control_use;
}
@@ -4840,8 +5297,9 @@ gimple_omp_continue_control_use_ptr (gimple g)
static inline void
gimple_omp_continue_set_control_use (gimple g, tree use)
{
- GIMPLE_CHECK (g, GIMPLE_OMP_CONTINUE);
- g->gimple_omp_continue.control_use = use;
+ gimple_statement_omp_continue *omp_continue_stmt =
+ as_a <gimple_statement_omp_continue> (g);
+ omp_continue_stmt->control_use = use;
}
/* Return a pointer to the body for the GIMPLE_TRANSACTION statement GS. */
@@ -4849,8 +5307,9 @@ gimple_omp_continue_set_control_use (gimple g, tree use)
static inline gimple_seq *
gimple_transaction_body_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return &gs->gimple_transaction.body;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ return &transaction_stmt->body;
}
/* Return the body for the GIMPLE_TRANSACTION statement GS. */
@@ -4866,15 +5325,17 @@ gimple_transaction_body (gimple gs)
static inline tree
gimple_transaction_label (const_gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return gs->gimple_transaction.label;
+ const gimple_statement_transaction *transaction_stmt =
+ as_a <const gimple_statement_transaction> (gs);
+ return transaction_stmt->label;
}
static inline tree *
gimple_transaction_label_ptr (gimple gs)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return &gs->gimple_transaction.label;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ return &transaction_stmt->label;
}
/* Return the subcode associated with a GIMPLE_TRANSACTION. */
@@ -4883,7 +5344,7 @@ static inline unsigned int
gimple_transaction_subcode (const_gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- return gs->gsbase.subcode;
+ return gs->subcode;
}
/* Set BODY to be the body for the GIMPLE_TRANSACTION statement GS. */
@@ -4891,8 +5352,9 @@ gimple_transaction_subcode (const_gimple gs)
static inline void
gimple_transaction_set_body (gimple gs, gimple_seq body)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gimple_transaction.body = body;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ transaction_stmt->body = body;
}
/* Set the label associated with a GIMPLE_TRANSACTION. */
@@ -4900,8 +5362,9 @@ gimple_transaction_set_body (gimple gs, gimple_seq body)
static inline void
gimple_transaction_set_label (gimple gs, tree label)
{
- GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gimple_transaction.label = label;
+ gimple_statement_transaction *transaction_stmt =
+ as_a <gimple_statement_transaction> (gs);
+ transaction_stmt->label = label;
}
/* Set the subcode associated with a GIMPLE_TRANSACTION. */
@@ -4910,7 +5373,7 @@ static inline void
gimple_transaction_set_subcode (gimple gs, unsigned int subcode)
{
GIMPLE_CHECK (gs, GIMPLE_TRANSACTION);
- gs->gsbase.subcode = subcode;
+ gs->subcode = subcode;
}
@@ -5020,7 +5483,7 @@ static inline enum br_predictor
gimple_predict_predictor (gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- return (enum br_predictor) (gs->gsbase.subcode & ~GF_PREDICT_TAKEN);
+ return (enum br_predictor) (gs->subcode & ~GF_PREDICT_TAKEN);
}
@@ -5030,7 +5493,7 @@ static inline void
gimple_predict_set_predictor (gimple gs, enum br_predictor predictor)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- gs->gsbase.subcode = (gs->gsbase.subcode & GF_PREDICT_TAKEN)
+ gs->subcode = (gs->subcode & GF_PREDICT_TAKEN)
| (unsigned) predictor;
}
@@ -5041,7 +5504,7 @@ static inline enum prediction
gimple_predict_outcome (gimple gs)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
- return (gs->gsbase.subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
+ return (gs->subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
}
@@ -5052,9 +5515,9 @@ gimple_predict_set_outcome (gimple gs, enum prediction outcome)
{
GIMPLE_CHECK (gs, GIMPLE_PREDICT);
if (outcome == TAKEN)
- gs->gsbase.subcode |= GF_PREDICT_TAKEN;
+ gs->subcode |= GF_PREDICT_TAKEN;
else
- gs->gsbase.subcode &= ~GF_PREDICT_TAKEN;
+ gs->subcode &= ~GF_PREDICT_TAKEN;
}
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 8baa4dc..5c71d2c 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -5009,7 +5009,7 @@ gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p)
}
else
{
- gimple gtry;
+ gimple_statement_try *gtry;
gimple_seq seq;
enum gimple_try_flags kind;
@@ -5023,7 +5023,7 @@ gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p)
/* Do not use gsi_replace here, as it may scan operands.
We want to do a simple structural modification only. */
gsi_set_stmt (&iter, gtry);
- iter = gsi_start (gtry->gimple_try.eval);
+ iter = gsi_start (gtry->eval);
}
}
else
diff --git a/gcc/system.h b/gcc/system.h
index a1fc6de..87ebe3c 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1013,7 +1013,7 @@ helper_const_non_const_cast (const char *p)
#define CONST_CAST_TREE(X) CONST_CAST (union tree_node *, (X))
#define CONST_CAST_RTX(X) CONST_CAST (struct rtx_def *, (X))
#define CONST_CAST_BB(X) CONST_CAST (struct basic_block_def *, (X))
-#define CONST_CAST_GIMPLE(X) CONST_CAST (union gimple_statement_d *, (X))
+#define CONST_CAST_GIMPLE(X) CONST_CAST (struct gimple_statement_base *, (X))
/* Activate certain diagnostics as warnings (not errors via the
-Werror flag). */
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 0a39ee6..6ef8bb4 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2635,7 +2635,7 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
&& TREE_CODE ((**debug_args)[i + 1]) == DEBUG_EXPR_DECL)
{
t = (**debug_args)[i + 1];
- stmt->gsbase.subcode = GIMPLE_DEBUG_BIND;
+ stmt->subcode = GIMPLE_DEBUG_BIND;
gimple_debug_bind_set_value (stmt, t);
break;
}
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c
index dffad68..bf024ac 100644
--- a/gcc/tree-phinodes.c
+++ b/gcc/tree-phinodes.c
@@ -94,10 +94,10 @@ phinodes_print_statistics (void)
happens to contain a PHI node with LEN arguments or more, return
that one. */
-static inline gimple
+static inline gimple_statement_phi *
allocate_phi_node (size_t len)
{
- gimple phi;
+ gimple_statement_phi *phi;
size_t bucket = NUM_BUCKETS - 2;
size_t size = sizeof (struct gimple_statement_phi)
+ (len - 1) * sizeof (struct phi_arg_d);
@@ -112,7 +112,7 @@ allocate_phi_node (size_t len)
&& gimple_phi_capacity ((*free_phinodes[bucket])[0]) >= len)
{
free_phinode_count--;
- phi = free_phinodes[bucket]->pop ();
+ phi = as_a <gimple_statement_phi> (free_phinodes[bucket]->pop ());
if (free_phinodes[bucket]->is_empty ())
vec_free (free_phinodes[bucket]);
if (GATHER_STATISTICS)
@@ -120,7 +120,8 @@ allocate_phi_node (size_t len)
}
else
{
- phi = ggc_alloc_gimple_statement_d (size);
+ phi = static_cast <gimple_statement_phi *> (
+ ggc_internal_alloc_stat (size MEM_STAT_INFO));
if (GATHER_STATISTICS)
{
enum gimple_alloc_kind kind = gimple_alloc_kind (GIMPLE_PHI);
@@ -172,7 +173,7 @@ ideal_phi_node_len (int len)
static gimple
make_phi_node (tree var, int len)
{
- gimple phi;
+ gimple_statement_phi *phi;
int capacity, i;
capacity = ideal_phi_node_len (len);
@@ -185,10 +186,10 @@ make_phi_node (tree var, int len)
memset (phi, 0, (sizeof (struct gimple_statement_phi)
- sizeof (struct phi_arg_d)
+ sizeof (struct phi_arg_d) * len));
- phi->gsbase.code = GIMPLE_PHI;
+ phi->code = GIMPLE_PHI;
gimple_init_singleton (phi);
- phi->gimple_phi.nargs = len;
- phi->gimple_phi.capacity = capacity;
+ phi->nargs = len;
+ phi->capacity = capacity;
if (!var)
;
else if (TREE_CODE (var) == SSA_NAME)
@@ -237,11 +238,11 @@ release_phi_node (gimple phi)
/* Resize an existing PHI node. The only way is up. Return the
possibly relocated phi. */
-static gimple
-resize_phi_node (gimple phi, size_t len)
+static gimple_statement_phi *
+resize_phi_node (gimple_statement_phi *phi, size_t len)
{
size_t old_size, i;
- gimple new_phi;
+ gimple_statement_phi *new_phi;
gcc_assert (len > gimple_phi_capacity (phi));
@@ -264,7 +265,7 @@ resize_phi_node (gimple phi, size_t len)
relink_imm_use_stmt (imm, old_imm, new_phi);
}
- new_phi->gimple_phi.capacity = len;
+ new_phi->capacity = len;
for (i = gimple_phi_num_args (new_phi); i < len; i++)
{
@@ -292,11 +293,12 @@ reserve_phi_args_for_new_edge (basic_block bb)
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- gimple stmt = gsi_stmt (gsi);
+ gimple_statement_phi *stmt =
+ as_a <gimple_statement_phi> (gsi_stmt (gsi));
if (len > gimple_phi_capacity (stmt))
{
- gimple new_phi = resize_phi_node (stmt, cap);
+ gimple_statement_phi *new_phi = resize_phi_node (stmt, cap);
/* The result of the PHI is defined by this PHI node. */
SSA_NAME_DEF_STMT (gimple_phi_result (new_phi)) = new_phi;
@@ -316,7 +318,7 @@ reserve_phi_args_for_new_edge (basic_block bb)
SET_PHI_ARG_DEF (stmt, len - 1, NULL_TREE);
gimple_phi_arg_set_location (stmt, len - 1, UNKNOWN_LOCATION);
- stmt->gimple_phi.nargs++;
+ stmt->nargs++;
}
}
@@ -392,7 +394,7 @@ add_phi_arg (gimple phi, tree def, edge e, source_location locus)
is consistent with how we remove an edge from the edge vector. */
static void
-remove_phi_arg_num (gimple phi, int i)
+remove_phi_arg_num (gimple_statement_phi *phi, int i)
{
int num_elem = gimple_phi_num_args (phi);
@@ -419,7 +421,7 @@ remove_phi_arg_num (gimple phi, int i)
/* Shrink the vector and return. Note that we do not have to clear
PHI_ARG_DEF because the garbage collector will not look at those
elements beyond the first PHI_NUM_ARGS elements of the array. */
- phi->gimple_phi.nargs--;
+ phi->nargs--;
}
@@ -431,7 +433,8 @@ remove_phi_args (edge e)
gimple_stmt_iterator gsi;
for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
- remove_phi_arg_num (gsi_stmt (gsi), e->dest_idx);
+ remove_phi_arg_num (as_a <gimple_statement_phi> (gsi_stmt (gsi)),
+ e->dest_idx);
}
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index d8ef822..6a542b8 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -1766,7 +1766,7 @@ evaluate_stmt (gimple stmt)
return val;
}
-typedef hash_table <pointer_hash <gimple_statement_d> > gimple_htab;
+typedef hash_table <pointer_hash <gimple_statement_base> > gimple_htab;
/* Given a BUILT_IN_STACK_SAVE value SAVED_VAL, insert a clobber of VAR before
each matching BUILT_IN_STACK_RESTORE. Mark visited phis in VISITED. */