gcc/gcc/gimple-ssa.h

202 lines
5.4 KiB
C
Raw Normal View History

tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
/* Header file for routines that straddle the border between GIMPLE and
SSA in gimple.
Copyright (C) 2009-2017 Free Software Foundation, Inc.
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_GIMPLE_SSA_H
#define GCC_GIMPLE_SSA_H
#include "tree-ssa-operands.h"
/* This structure is used to map a gimple statement to a label,
or list of labels to represent transaction restart. */
struct GTY((for_user)) tm_restart_node {
gimple *stmt;
tree label_or_list;
};
/* Hasher for tm_restart_node. */
hash-traits.h (ggc_hasher): Rename to... gcc/ * hash-traits.h (ggc_hasher): Rename to... (ggc_remover): ...this and remove typedefs. (ggc_cache_hasher): Update accordingly. Add typedefs. (ggc_ptr_hash): New class. * hash-table.h: Update comment. * cfgloop.h (loop_exit_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. * cgraph.h (section_name_hasher, cgraph_edge_hasher): Likewise. (tree_descriptor_hasher): Likewise. * cgraph.c (function_version_hasher): Likewise. * dwarf2out.c (indirect_string_hasher, dwarf_file_hasher): Likewise. (decl_die_hasher, block_die_hasher, decl_loc_hasher): Likewise. (dw_loc_list_hasher, addr_hasher): Likewise. * function.h (used_type_hasher): Likewise. * function.c (temp_address_hasher): Likewise. * gimple-ssa.h (tm_restart_hasher, ssa_name_hasher): Likewise. * libfuncs.h (libfunc_hasher): Likewise. * lto-streamer.h (decl_state_hasher): Likewise. * optabs.c (libfunc_decl_hasher): Likewise. * tree-scalar-evolution.c (scev_info_hasher): Likewise. * varasm.c (section_hasher, object_block_hasher): Likewise. (const_rtx_desc_hasher): Likewise. * config/darwin.c (indirection_hasher, cfstring_hasher): Likewise. * config/rs6000/rs6000.c (toc_hasher, builtin_hasher): Likewise. gcc/c-family/ * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. gcc/cp/ * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (constexpr_call_hasher): Likewise. * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise. * decl.c (typename_hasher): Likewise. * mangle.c (conv_type_hasher): Likewise. * pt.c (spec_hasher): Likewise. * tree.c (cplus_array_hasher, list_hasher): Likewise. * typeck2.c (abstract_type_hasher): Likewise. gcc/fortran/ * trans-decl.c (module_hasher): Likewise. * trans.h (module_decl_hasher): Likewise. gcc/java/ * java-tree.h (treetreehasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (ict_hasher, type_assertion_hasher): Likewise. gcc/objc/ * objc-act.c (objc_string_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. From-SVN: r224959
2015-06-25 19:06:36 +02:00
struct tm_restart_hasher : ggc_ptr_hash<tm_restart_node>
{
static hashval_t hash (tm_restart_node *n) { return htab_hash_pointer (n); }
static bool
equal (tm_restart_node *a, tm_restart_node *b)
{
return a == b;
}
};
extern void gt_ggc_mx (gimple *&);
extern void gt_pch_nx (gimple *&);
hash-traits.h (ggc_hasher): Rename to... gcc/ * hash-traits.h (ggc_hasher): Rename to... (ggc_remover): ...this and remove typedefs. (ggc_cache_hasher): Update accordingly. Add typedefs. (ggc_ptr_hash): New class. * hash-table.h: Update comment. * cfgloop.h (loop_exit_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. * cgraph.h (section_name_hasher, cgraph_edge_hasher): Likewise. (tree_descriptor_hasher): Likewise. * cgraph.c (function_version_hasher): Likewise. * dwarf2out.c (indirect_string_hasher, dwarf_file_hasher): Likewise. (decl_die_hasher, block_die_hasher, decl_loc_hasher): Likewise. (dw_loc_list_hasher, addr_hasher): Likewise. * function.h (used_type_hasher): Likewise. * function.c (temp_address_hasher): Likewise. * gimple-ssa.h (tm_restart_hasher, ssa_name_hasher): Likewise. * libfuncs.h (libfunc_hasher): Likewise. * lto-streamer.h (decl_state_hasher): Likewise. * optabs.c (libfunc_decl_hasher): Likewise. * tree-scalar-evolution.c (scev_info_hasher): Likewise. * varasm.c (section_hasher, object_block_hasher): Likewise. (const_rtx_desc_hasher): Likewise. * config/darwin.c (indirection_hasher, cfstring_hasher): Likewise. * config/rs6000/rs6000.c (toc_hasher, builtin_hasher): Likewise. gcc/c-family/ * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. gcc/cp/ * constexpr.c (constexpr_fundef_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (constexpr_call_hasher): Likewise. * cp-tree.h (cxx_int_tree_map_hasher, named_label_hasher): Likewise. * decl.c (typename_hasher): Likewise. * mangle.c (conv_type_hasher): Likewise. * pt.c (spec_hasher): Likewise. * tree.c (cplus_array_hasher, list_hasher): Likewise. * typeck2.c (abstract_type_hasher): Likewise. gcc/fortran/ * trans-decl.c (module_hasher): Likewise. * trans.h (module_decl_hasher): Likewise. gcc/java/ * java-tree.h (treetreehasher): Inherit from ggc_ptr_hash rather than ggc_hasher. (ict_hasher, type_assertion_hasher): Likewise. gcc/objc/ * objc-act.c (objc_string_hasher): Inherit from ggc_ptr_hash rather than ggc_hasher. From-SVN: r224959
2015-06-25 19:06:36 +02:00
struct ssa_name_hasher : ggc_ptr_hash<tree_node>
{
/* Hash a tree in a uid_decl_map. */
static hashval_t
hash (tree item)
{
return item->ssa_name.var->decl_minimal.uid;
}
/* Return true if the DECL_UID in both trees are equal. */
static bool
equal (tree a, tree b)
{
return (a->ssa_name.var->decl_minimal.uid == b->ssa_name.var->decl_minimal.uid);
}
};
/* Gimple dataflow datastructure. All publicly available fields shall have
gimple_ accessor defined, all publicly modifiable fields should have
gimple_set accessor. */
struct GTY(()) gimple_df {
/* Array of all SSA_NAMEs used in the function. */
vec<tree, va_gc> *ssa_names;
/* Artificial variable used for the virtual operand FUD chain. */
tree vop;
/* The PTA solution for the ESCAPED artificial variable. */
struct pt_solution escaped;
/* A map of decls to artificial ssa-names that point to the partition
of the decl. */
hash_map<tree, tree> * GTY((skip(""))) decls_to_pointers;
/* Free list of SSA_NAMEs. */
vec<tree, va_gc> *free_ssanames;
/* Queue of SSA_NAMEs to be freed at the next opportunity. */
vec<tree, va_gc> *free_ssanames_queue;
/* Hashtable holding definition for symbol. If this field is not NULL, it
means that the first reference to this variable in the function is a
USE or a VUSE. In those cases, the SSA renamer creates an SSA name
for this variable with an empty defining statement. */
hash_table<ssa_name_hasher> *default_defs;
/* True if there are any symbols that need to be renamed. */
unsigned int ssa_renaming_needed : 1;
/* True if all virtual operands need to be renamed. */
unsigned int rename_vops : 1;
/* True if the code is in ssa form. */
unsigned int in_ssa_p : 1;
/* True if IPA points-to information was computed for this function. */
unsigned int ipa_pta : 1;
struct ssa_operands ssa_operands;
/* Map gimple stmt to tree label (or list of labels) for transaction
restart and abort. */
hash_table<tm_restart_hasher> *tm_restart;
};
/* Return true when gimple SSA form was built.
gimple_in_ssa_p is queried by gimplifier in various early stages before SSA
infrastructure is initialized. Check for presence of the datastructures
at first place. */
static inline bool
gimple_in_ssa_p (const struct function *fun)
{
return fun && fun->gimple_df && fun->gimple_df->in_ssa_p;
}
/* Artificial variable used for the virtual operand FUD chain. */
static inline tree
gimple_vop (const struct function *fun)
{
gcc_checking_assert (fun && fun->gimple_df);
return fun->gimple_df->vop;
}
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
/* Return the set of VUSE operand for statement G. */
static inline use_operand_p
gimple_vuse_op (const gimple *g)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
{
struct use_optype_d *ops;
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
const gimple_statement_with_memory_ops *mem_ops_stmt =
Change is-a.h to support typedefs of pointers gcc/ * is-a.h: Update comments to reflect the following changes to the "pointerness" of the API, making the template parameter match the return type, allowing use of is-a.h with typedefs of pointers. (is_a_helper::cast): Return a T rather then a pointer to a T, so that the return type matches the parameter to the is_a_helper. (as_a): Likewise. (dyn_cast): Likewise. * cgraph.c (cgraph_node_for_asm): Update for removal of implicit pointer from the is-a.h API. * cgraph.h (is_a_helper <cgraph_node>::test): Convert to... (is_a_helper <cgraph_node *>::test): ...this, matching change to is-a.h API. (is_a_helper <varpool_node>::test): Likewise, convert to... (is_a_helper <varpool_node *>::test): ...this. (varpool_first_variable): Update for removal of implicit pointer from the is-a.h API. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_alias_target): Likewise. (varpool_alias_target): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. (symtab_real_symbol_p): Likewise. * cgraphunit.c (referred_to_p): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimple-ssa.h (gimple_vuse_op): Likewise. (gimple_vdef_op): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. (gimple_build_resx): Likewise. (gimple_build_eh_dispatch): Likewise. (gimple_build_omp_for): Likewise. (gimple_omp_for_set_clauses): Likewise. * gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to... (is_a_helper <gimple_statement_asm *>::test): ...this. (is_a_helper <gimple_statement_bind>::test): Convert to... (is_a_helper <gimple_statement_bind *>::test): ...this. (is_a_helper <gimple_statement_call>::test): Convert to... (is_a_helper <gimple_statement_call *>::test): ...this. (is_a_helper <gimple_statement_catch>::test): Convert to... (is_a_helper <gimple_statement_catch *>::test): ...this. (is_a_helper <gimple_statement_resx>::test): Convert to... (is_a_helper <gimple_statement_resx *>::test): ...this. (is_a_helper <gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else>::test): Convert to... (is_a_helper <gimple_statement_eh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter>::test): Convert to... (is_a_helper <gimple_statement_eh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt>::test): Convert to... (is_a_helper <gimple_statement_eh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_return>::test): Convert to... (is_a_helper <gimple_statement_omp_return *>::test): ...this. (is_a_helper <gimple_statement_omp_continue>::test): Convert to... (is_a_helper <gimple_statement_omp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical>::test): Convert to... (is_a_helper <gimple_statement_omp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for>::test): Convert to... (is_a_helper <gimple_statement_omp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target>::test): Convert to... (is_a_helper <gimple_statement_omp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections>::test): Convert to... (is_a_helper <gimple_statement_omp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single>::test): Convert to... (is_a_helper <gimple_statement_omp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams>::test): Convert to... (is_a_helper <gimple_statement_omp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task>::test): Convert to... (is_a_helper <gimple_statement_omp_task *>::test): ...this. (is_a_helper <gimple_statement_phi>::test): Convert to... (is_a_helper <gimple_statement_phi *>::test): ...this. (is_a_helper <gimple_statement_transaction>::test): Convert to... (is_a_helper <gimple_statement_transaction *>::test): ...this. (is_a_helper <gimple_statement_try>::test): Convert to... (is_a_helper <gimple_statement_try *>::test): ...this. (is_a_helper <gimple_statement_wce>::test): Convert to... (is_a_helper <gimple_statement_wce *>::test): ...this. (is_a_helper <const gimple_statement_asm>::test): Convert to... (is_a_helper <const gimple_statement_asm *>::test): ...this. (is_a_helper <const gimple_statement_bind>::test): Convert to... (is_a_helper <const gimple_statement_bind *>::test): ...this. (is_a_helper <const gimple_statement_call>::test): Convert to... (is_a_helper <const gimple_statement_call *>::test): ...this. (is_a_helper <const gimple_statement_catch>::test): Convert to... (is_a_helper <const gimple_statement_catch *>::test): ...this. (is_a_helper <const gimple_statement_resx>::test): Convert to... (is_a_helper <const gimple_statement_resx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <const gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter>::test): Convert to... (is_a_helper <const gimple_statement_eh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_return>::test): Convert to... (is_a_helper <const gimple_statement_omp_return *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue>::test): Convert to... (is_a_helper <const gimple_statement_omp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical>::test): Convert to... (is_a_helper <const gimple_statement_omp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for>::test): Convert to... (is_a_helper <const gimple_statement_omp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <const gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target>::test): Convert to... (is_a_helper <const gimple_statement_omp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections>::test): Convert to... (is_a_helper <const gimple_statement_omp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single>::test): Convert to... (is_a_helper <const gimple_statement_omp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams>::test): Convert to... (is_a_helper <const gimple_statement_omp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task>::test): Convert to... (is_a_helper <const gimple_statement_omp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi>::test): Convert to... (is_a_helper <const gimple_statement_phi *>::test): ...this. (is_a_helper <const gimple_statement_transaction>::test): Convert to... (is_a_helper <const gimple_statement_transaction *>::test): ...this. (is_a_helper <const gimple_statement_with_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_ops *>::test): ...this. (is_a_helper <gimple_statement_with_ops>::test): Convert to... (is_a_helper <gimple_statement_with_ops *>::test): ...this. (is_a_helper <const gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_memory_ops *>::test): ...this. (is_a_helper <gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <gimple_statement_with_memory_ops *>::test): ...this. (gimple_use_ops): Update for removal of implicit pointer from the is-a.h API. (gimple_set_use_ops): Likewise. (gimple_vuse): Likewise. (gimple_vdef): Likewise. (gimple_vuse_ptr): Likewise. (gimple_vdef_ptr): Likewise. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_omp_return_set_lhs): Likewise. (gimple_omp_return_lhs): Likewise. (gimple_omp_return_lhs_ptr): Likewise. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_bind_vars): Likewise. (gimple_bind_set_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_block): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Likewise. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_set_output_op): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_catch_types): Likewise. (gimple_catch_types_ptr): Likewise. (gimple_catch_handler_ptr): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Likewise. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Likewise. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Likewise. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_eval_ptr): Likewise. (gimple_try_cleanup_ptr): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_wce_cleanup_ptr): Likewise. (gimple_wce_set_cleanup): Likewise. (gimple_phi_capacity): Likewise. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_set_result): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_arg): Likewise. (gimple_resx_region): Likewise. (gimple_resx_set_region): Likewise. (gimple_eh_dispatch_region): Likewise. (gimple_eh_dispatch_set_region): Likewise. (gimple_omp_critical_name): Likewise. (gimple_omp_critical_name_ptr): Likewise. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_clauses): Likewise. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body_ptr): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Likewise. (gimple_omp_parallel_clauses_ptr): Likewise. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_task_clauses): Likewise. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Likewise. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Likewise. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Likewise. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Likewise. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Likewise. (gimple_omp_target_child_fn): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_teams_clauses): Likewise. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Likewise. (gimple_omp_sections_clauses): Likewise. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Likewise. (gimple_omp_atomic_store_val): Likewise. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Likewise. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Likewise. (gimple_omp_continue_control_def_ptr): Likewise. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Likewise. (gimple_transaction_label): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_set_body): Likewise. (gimple_transaction_set_label): Likewise. * ipa-devirt.c (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. * ipa-reference.c (analyze_function): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. * lto-cgraph.c (lto_output_ref): Likewise. (add_references): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_ref): Likewise. (input_cgraph_1): Likewise. (output_cgraph_opt_summary): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. * lto-streamer.h (lsei_next_function_in_partition): Likewise. (lsei_start_function_in_partition): Likewise. (lsei_next_variable_in_partition): Likewise. (lsei_start_variable_in_partition): Likewise. * symtab.c (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (dump_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (symtab_make_decl_local): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (symtab_get_symbol_partitioning_class): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. (reserve_phi_args_for_new_edge): Likewise. (remove_phi_args): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/lto/ * lto-partition.c (add_references_to_partition): Update for removal of implicit pointer from the is-a.h API. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (undo_partition): Likewise. (lto_balanced_map): Likewise. (promote_symbol): Likewise. * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r209719
2014-04-23 21:06:40 +02:00
dyn_cast <const gimple_statement_with_memory_ops *> (g);
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
if (!mem_ops_stmt)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
return NULL_USE_OPERAND_P;
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
ops = mem_ops_stmt->use_ops;
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
if (ops
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
&& USE_OP_PTR (ops)->use == &mem_ops_stmt->vuse)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
return USE_OP_PTR (ops);
return NULL_USE_OPERAND_P;
}
/* Return the set of VDEF operand for statement G. */
static inline def_operand_p
gimple_vdef_op (gimple *g)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
{
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
gimple_statement_with_memory_ops *mem_ops_stmt =
Change is-a.h to support typedefs of pointers gcc/ * is-a.h: Update comments to reflect the following changes to the "pointerness" of the API, making the template parameter match the return type, allowing use of is-a.h with typedefs of pointers. (is_a_helper::cast): Return a T rather then a pointer to a T, so that the return type matches the parameter to the is_a_helper. (as_a): Likewise. (dyn_cast): Likewise. * cgraph.c (cgraph_node_for_asm): Update for removal of implicit pointer from the is-a.h API. * cgraph.h (is_a_helper <cgraph_node>::test): Convert to... (is_a_helper <cgraph_node *>::test): ...this, matching change to is-a.h API. (is_a_helper <varpool_node>::test): Likewise, convert to... (is_a_helper <varpool_node *>::test): ...this. (varpool_first_variable): Update for removal of implicit pointer from the is-a.h API. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_alias_target): Likewise. (varpool_alias_target): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. (symtab_real_symbol_p): Likewise. * cgraphunit.c (referred_to_p): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimple-ssa.h (gimple_vuse_op): Likewise. (gimple_vdef_op): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. (gimple_build_resx): Likewise. (gimple_build_eh_dispatch): Likewise. (gimple_build_omp_for): Likewise. (gimple_omp_for_set_clauses): Likewise. * gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to... (is_a_helper <gimple_statement_asm *>::test): ...this. (is_a_helper <gimple_statement_bind>::test): Convert to... (is_a_helper <gimple_statement_bind *>::test): ...this. (is_a_helper <gimple_statement_call>::test): Convert to... (is_a_helper <gimple_statement_call *>::test): ...this. (is_a_helper <gimple_statement_catch>::test): Convert to... (is_a_helper <gimple_statement_catch *>::test): ...this. (is_a_helper <gimple_statement_resx>::test): Convert to... (is_a_helper <gimple_statement_resx *>::test): ...this. (is_a_helper <gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else>::test): Convert to... (is_a_helper <gimple_statement_eh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter>::test): Convert to... (is_a_helper <gimple_statement_eh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt>::test): Convert to... (is_a_helper <gimple_statement_eh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_return>::test): Convert to... (is_a_helper <gimple_statement_omp_return *>::test): ...this. (is_a_helper <gimple_statement_omp_continue>::test): Convert to... (is_a_helper <gimple_statement_omp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical>::test): Convert to... (is_a_helper <gimple_statement_omp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for>::test): Convert to... (is_a_helper <gimple_statement_omp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target>::test): Convert to... (is_a_helper <gimple_statement_omp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections>::test): Convert to... (is_a_helper <gimple_statement_omp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single>::test): Convert to... (is_a_helper <gimple_statement_omp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams>::test): Convert to... (is_a_helper <gimple_statement_omp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task>::test): Convert to... (is_a_helper <gimple_statement_omp_task *>::test): ...this. (is_a_helper <gimple_statement_phi>::test): Convert to... (is_a_helper <gimple_statement_phi *>::test): ...this. (is_a_helper <gimple_statement_transaction>::test): Convert to... (is_a_helper <gimple_statement_transaction *>::test): ...this. (is_a_helper <gimple_statement_try>::test): Convert to... (is_a_helper <gimple_statement_try *>::test): ...this. (is_a_helper <gimple_statement_wce>::test): Convert to... (is_a_helper <gimple_statement_wce *>::test): ...this. (is_a_helper <const gimple_statement_asm>::test): Convert to... (is_a_helper <const gimple_statement_asm *>::test): ...this. (is_a_helper <const gimple_statement_bind>::test): Convert to... (is_a_helper <const gimple_statement_bind *>::test): ...this. (is_a_helper <const gimple_statement_call>::test): Convert to... (is_a_helper <const gimple_statement_call *>::test): ...this. (is_a_helper <const gimple_statement_catch>::test): Convert to... (is_a_helper <const gimple_statement_catch *>::test): ...this. (is_a_helper <const gimple_statement_resx>::test): Convert to... (is_a_helper <const gimple_statement_resx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <const gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter>::test): Convert to... (is_a_helper <const gimple_statement_eh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_return>::test): Convert to... (is_a_helper <const gimple_statement_omp_return *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue>::test): Convert to... (is_a_helper <const gimple_statement_omp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical>::test): Convert to... (is_a_helper <const gimple_statement_omp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for>::test): Convert to... (is_a_helper <const gimple_statement_omp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <const gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target>::test): Convert to... (is_a_helper <const gimple_statement_omp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections>::test): Convert to... (is_a_helper <const gimple_statement_omp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single>::test): Convert to... (is_a_helper <const gimple_statement_omp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams>::test): Convert to... (is_a_helper <const gimple_statement_omp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task>::test): Convert to... (is_a_helper <const gimple_statement_omp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi>::test): Convert to... (is_a_helper <const gimple_statement_phi *>::test): ...this. (is_a_helper <const gimple_statement_transaction>::test): Convert to... (is_a_helper <const gimple_statement_transaction *>::test): ...this. (is_a_helper <const gimple_statement_with_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_ops *>::test): ...this. (is_a_helper <gimple_statement_with_ops>::test): Convert to... (is_a_helper <gimple_statement_with_ops *>::test): ...this. (is_a_helper <const gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_memory_ops *>::test): ...this. (is_a_helper <gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <gimple_statement_with_memory_ops *>::test): ...this. (gimple_use_ops): Update for removal of implicit pointer from the is-a.h API. (gimple_set_use_ops): Likewise. (gimple_vuse): Likewise. (gimple_vdef): Likewise. (gimple_vuse_ptr): Likewise. (gimple_vdef_ptr): Likewise. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_omp_return_set_lhs): Likewise. (gimple_omp_return_lhs): Likewise. (gimple_omp_return_lhs_ptr): Likewise. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_bind_vars): Likewise. (gimple_bind_set_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_block): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Likewise. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_set_output_op): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_catch_types): Likewise. (gimple_catch_types_ptr): Likewise. (gimple_catch_handler_ptr): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Likewise. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Likewise. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Likewise. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_eval_ptr): Likewise. (gimple_try_cleanup_ptr): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_wce_cleanup_ptr): Likewise. (gimple_wce_set_cleanup): Likewise. (gimple_phi_capacity): Likewise. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_set_result): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_arg): Likewise. (gimple_resx_region): Likewise. (gimple_resx_set_region): Likewise. (gimple_eh_dispatch_region): Likewise. (gimple_eh_dispatch_set_region): Likewise. (gimple_omp_critical_name): Likewise. (gimple_omp_critical_name_ptr): Likewise. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_clauses): Likewise. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body_ptr): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Likewise. (gimple_omp_parallel_clauses_ptr): Likewise. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_task_clauses): Likewise. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Likewise. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Likewise. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Likewise. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Likewise. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Likewise. (gimple_omp_target_child_fn): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_teams_clauses): Likewise. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Likewise. (gimple_omp_sections_clauses): Likewise. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Likewise. (gimple_omp_atomic_store_val): Likewise. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Likewise. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Likewise. (gimple_omp_continue_control_def_ptr): Likewise. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Likewise. (gimple_transaction_label): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_set_body): Likewise. (gimple_transaction_set_label): Likewise. * ipa-devirt.c (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. * ipa-reference.c (analyze_function): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. * lto-cgraph.c (lto_output_ref): Likewise. (add_references): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_ref): Likewise. (input_cgraph_1): Likewise. (output_cgraph_opt_summary): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. * lto-streamer.h (lsei_next_function_in_partition): Likewise. (lsei_start_function_in_partition): Likewise. (lsei_next_variable_in_partition): Likewise. (lsei_start_variable_in_partition): Likewise. * symtab.c (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (dump_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (symtab_make_decl_local): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (symtab_get_symbol_partitioning_class): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. (reserve_phi_args_for_new_edge): Likewise. (remove_phi_args): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/lto/ * lto-partition.c (add_references_to_partition): Update for removal of implicit pointer from the is-a.h API. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (undo_partition): Likewise. (lto_balanced_map): Likewise. (promote_symbol): Likewise. * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r209719
2014-04-23 21:06:40 +02:00
dyn_cast <gimple_statement_with_memory_ops *> (g);
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
if (!mem_ops_stmt)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
return NULL_DEF_OPERAND_P;
Convert gimple types from a union to C++ inheritance Patch partially autogenerated by refactor_gimple.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 05fc808c61bd8ddd2372f29b79ceb2491360d298 * 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. From-SVN: r205034
2013-11-19 16:50:46 +01:00
if (mem_ops_stmt->vdef)
return &mem_ops_stmt->vdef;
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
return NULL_DEF_OPERAND_P;
}
/* Mark statement S as modified, and update it. */
static inline void
update_stmt (gimple *s)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
{
if (gimple_has_ops (s))
{
gimple_set_modified (s, true);
update_stmt_operands (cfun, s);
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
}
}
/* Update statement S if it has been optimized. */
static inline void
update_stmt_if_modified (gimple *s)
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
{
if (gimple_modified_p (s))
update_stmt_operands (cfun, s);
}
/* Mark statement S as modified, and update it. */
static inline void
update_stmt_fn (struct function *fn, gimple *s)
{
if (gimple_has_ops (s))
{
gimple_set_modified (s, true);
update_stmt_operands (fn, s);
}
tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. * tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. (dump_decl_set): Move to gimple.c. * gimple.h: Don't include tree-ssa-operands.h. (dump_decl_set): Add prototype. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Move to gimple-ssa.h. (phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location): Relocate from tree-flow-inline.h * gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather than PHI_ARG_DEF. (dump_decl_set): Relocate here. * gimple-ssa.h: New file. (gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified): Relocate from gimple.h. * tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to... * tree-ssa-operands.c (swap_ssa_operands): Rename from swap_tree_operands and remove non-ssa path. (has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c. * tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use swap_ssa_operands. * tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction, vect_is_simple_reduction_1): Use swap_ssa_operands. * tree-flow.h: Move various prototypes to tree-phinodes.h. (enum need_phi_state): Move to tree-into-ssa.c. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h. (swap_tree_operands): Rename and move prototype to tree-ssa-operands.h. * tree-flow-inline.h (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses): Move to ssa-iterators.h. (get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to tree-phinodes.h. (op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h. (gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location, gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes, phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h. (set_phi_nodes): Move to tree-phinodes.h. * tree-ssa-operands.h (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h. (dump_decl_set): Remove prototype. (get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h. * tree-phinodes.h: New file. Move some prototypes from tree-flow.h. (set_phi_nodes): Relocate from tree-flow-inline.h. (gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from tree-flow-inline.h * tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to include list. Temporarily add gimple.h to include list. * ssa-iterators.h: New file. (struct immediate_use_iterator_d, FOR_EACH_IMM_*, BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h. (enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Relocate from tree-ssa-operands.h. (delink_imm_use, link_imm_use_to_list, link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use, next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use, num_imm_uses, get_use_from_ptr, get_def_from_ptr, phi_arg_index_from_use, op_iter_done, op_iter_next_def, op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init, op_iter_init_use, op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use, single_phi_def, op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt): Relocate from tree-flow-inline.h. * tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H. From-SVN: r203068
2013-10-01 17:46:53 +02:00
}
#endif /* GCC_GIMPLE_SSA_H */