diff options
Diffstat (limited to 'gcc/tree-flow.h')
-rw-r--r-- | gcc/tree-flow.h | 97 |
1 files changed, 14 insertions, 83 deletions
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index cf7883985c2..15c14654b22 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -45,9 +45,6 @@ struct GTY(()) tm_restart_node { gimple_ accessor defined in tree-flow-inline.h, all publicly modifiable fields should have gimple_set accessor. */ struct GTY(()) gimple_df { - /* Array of all variables referenced in the function. */ - htab_t GTY((param_is (union tree_node))) referenced_vars; - /* A vector of all the noreturn calls passed to modify_stmt. cleanup_control_flow uses it to detect cases where a mid-block indirect call has been turned into a noreturn call. When this @@ -77,9 +74,11 @@ struct GTY(()) gimple_df { for this variable with an empty defining statement. */ htab_t GTY((param_is (union tree_node))) default_defs; - /* Symbols whose SSA form needs to be updated or created for the first - time. */ - bitmap syms_to_rename; + /* 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; @@ -100,7 +99,6 @@ struct GTY(()) gimple_df { #define SSANAMES(fun) (fun)->gimple_df->ssa_names #define MODIFIED_NORETURN_CALLS(fun) (fun)->gimple_df->modified_noreturn_calls #define DEFAULT_DEFS(fun) (fun)->gimple_df->default_defs -#define SYMS_TO_RENAME(fun) (fun)->gimple_df->syms_to_rename typedef struct { @@ -176,28 +174,6 @@ enum need_phi_state { }; -struct GTY(()) var_ann_d { - /* Used when building base variable structures in a var_map. */ - unsigned base_var_processed : 1; - - /* Nonzero if this variable was used after SSA optimizations were - applied. We set this when translating out of SSA form. */ - unsigned used : 1; - - /* This field indicates whether or not the variable may need PHI nodes. - See the enum's definition for more detailed information about the - states. */ - ENUM_BITFIELD (need_phi_state) need_phi_state : 2; - - /* Used by var_map for the base index of ssa base variables. */ - unsigned base_index; - - /* During into-ssa and the dominator optimizer, this field holds the - current version of this variable (an SSA_NAME). */ - tree current_def; -}; - - /* Immediate use lists are used to directly access all uses for an SSA name and get pointers to the statement for each use. @@ -292,9 +268,6 @@ typedef struct immediate_use_iterator_d -typedef struct var_ann_d *var_ann_t; - -static inline var_ann_t var_ann (const_tree); static inline void update_stmt (gimple); static inline int get_lineno (const_gimple); @@ -316,24 +289,6 @@ extern int int_tree_map_eq (const void *, const void *); extern unsigned int uid_decl_map_hash (const void *); extern int uid_decl_map_eq (const void *, const void *); -typedef struct -{ - htab_iterator hti; -} referenced_var_iterator; - -/* This macro loops over all the referenced vars, one at a time, putting the - current var in VAR. Note: You are not allowed to add referenced variables - to the hashtable while using this macro. Doing so may cause it to behave - erratically. */ - -#define FOR_EACH_REFERENCED_VAR(FN, VAR, ITER) \ - for ((VAR) = first_referenced_var ((FN), &(ITER)); \ - !end_referenced_vars_p (&(ITER)); \ - (VAR) = next_referenced_var (&(ITER))) - -extern tree referenced_var_lookup (struct function *, unsigned int); -#define num_referenced_vars htab_elements (gimple_referenced_vars (cfun)) - #define num_ssa_names (VEC_length (tree, cfun->gimple_df->ssa_names)) #define ssa_name(i) (VEC_index (tree, cfun->gimple_df->ssa_names, (i))) @@ -414,7 +369,7 @@ extern bool is_ctrl_altering_stmt (gimple); extern bool simple_goto_p (gimple); extern bool stmt_can_make_abnormal_goto (gimple); extern basic_block single_noncomplex_succ (basic_block bb); -extern void gimple_dump_bb (basic_block, FILE *, int, int); +extern void gimple_dump_bb (FILE *, basic_block, int, int); extern void gimple_debug_bb (basic_block); extern basic_block gimple_debug_bb_n (int); extern void gimple_dump_cfg (FILE *, int); @@ -428,6 +383,7 @@ extern void debug_loop_num (unsigned, int); extern void print_loops (FILE *, int); extern void print_loops_bb (FILE *, basic_block, int, int); extern void cleanup_dead_labels (void); +extern void group_case_labels_stmt (gimple); extern void group_case_labels (void); extern gimple first_stmt (basic_block); extern gimple last_stmt (basic_block); @@ -486,21 +442,14 @@ extern void renumber_gimple_stmt_uids (void); extern void renumber_gimple_stmt_uids_in_blocks (basic_block *, int); extern void dump_dfa_stats (FILE *); extern void debug_dfa_stats (void); -extern void debug_referenced_vars (void); -extern void dump_referenced_vars (FILE *); extern void dump_variable (FILE *, tree); extern void debug_variable (tree); -extern bool add_referenced_var_1 (tree, struct function *); -#define add_referenced_var(v) add_referenced_var_1 ((v), cfun) -extern void remove_referenced_var (tree); -extern tree make_rename_temp (tree, const char *); -extern void set_default_def (tree, tree); -extern tree gimple_default_def (struct function *, tree); +extern void set_ssa_default_def (struct function *, tree, tree); +extern tree ssa_default_def (struct function *, tree); +extern tree get_or_create_ssa_default_def (struct function *, tree); extern bool stmt_references_abnormal_ssa_name (gimple); -extern tree get_ref_base_and_extent (tree, HOST_WIDE_INT *, - HOST_WIDE_INT *, HOST_WIDE_INT *); extern tree get_addr_base_and_unit_offset (tree, HOST_WIDE_INT *); -extern void find_referenced_vars_in (gimple); +extern void dump_enumerated_decls (FILE *, int); /* In tree-phinodes.c */ extern void reserve_phi_args_for_new_edge (basic_block); @@ -511,9 +460,7 @@ extern void remove_phi_args (edge); extern void remove_phi_node (gimple_stmt_iterator *, bool); extern void remove_phi_nodes (basic_block); extern void release_phi_node (gimple); -#ifdef GATHER_STATISTICS extern void phinodes_print_statistics (void); -#endif /* In gimple-low.c */ extern void record_vars_into (tree, tree); @@ -569,16 +516,11 @@ void release_defs_bitset (bitmap toremove); /* In tree-into-ssa.c */ void update_ssa (unsigned); void delete_update_ssa (void); -void register_new_name_mapping (tree, tree); tree create_new_def_for (tree, gimple, def_operand_p); bool need_ssa_update_p (struct function *); -bool name_mappings_registered_p (void); bool name_registered_for_update_p (tree); void release_ssa_name_after_update_ssa (tree); -void compute_global_livein (bitmap, bitmap); -void mark_sym_for_renaming (tree); -void mark_set_for_renaming (bitmap); -bool symbol_marked_for_renaming (tree); +void mark_virtual_operands_for_renaming (struct function *); tree get_current_def (tree); void set_current_def (tree, tree); @@ -586,7 +528,8 @@ void set_current_def (tree, tree); extern void init_ssanames (struct function *, int); extern void fini_ssanames (void); extern tree make_ssa_name_fn (struct function *, tree, gimple); -extern tree duplicate_ssa_name (tree, gimple); +extern tree copy_ssa_name_fn (struct function *, tree, gimple); +extern tree duplicate_ssa_name_fn (struct function *, tree, gimple); extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *); extern void release_ssa_name (tree); extern void release_defs (gimple); @@ -599,9 +542,7 @@ extern void set_ptr_info_alignment (struct ptr_info_def *, unsigned int, extern void adjust_ptr_info_misalignment (struct ptr_info_def *, unsigned int); -#ifdef GATHER_STATISTICS extern void ssanames_print_statistics (void); -#endif /* In tree-ssa-ccp.c */ tree fold_const_aggregate_ref (tree); @@ -730,7 +671,6 @@ void tree_transform_and_unroll_loop (struct loop *, unsigned, transform_callback, void *); bool contains_abnormal_ssa_name_p (tree); bool stmt_dominates_stmt_p (gimple, gimple); -void mark_virtual_ops_for_renaming (gimple); /* In tree-ssa-dce.c */ void mark_virtual_operand_for_renaming (tree); @@ -763,7 +703,6 @@ extern enum move_pos movement_possibility (gimple); char *get_lsm_tmp_name (tree, unsigned); /* In tree-flow-inline.h */ -static inline void set_is_used (tree); static inline bool unmodifiable_var_p (const_tree); static inline bool ref_contains_array_ref (const_tree); @@ -810,14 +749,6 @@ bool expr_invariant_in_loop_p (struct loop *, tree); bool stmt_invariant_in_loop_p (struct loop *, gimple); bool multiplier_allowed_in_address_p (HOST_WIDE_INT, enum machine_mode, addr_space_t); -void initialize_costs (void); -void finalize_costs (void); -unsigned multiply_by_const_cost (HOST_WIDE_INT, enum machine_mode, bool); -unsigned add_regs_cost (enum machine_mode, bool); -unsigned multiply_regs_cost (enum machine_mode, bool); -unsigned add_const_cost (enum machine_mode, bool); -unsigned extend_or_trunc_reg_cost (tree, tree, bool); -unsigned negate_reg_cost (enum machine_mode, bool); bool may_be_nonaddressable_p (tree expr); /* In tree-ssa-threadupdate.c. */ |