GCC Middle and Back End API Reference
|
#include "array-traits.h"
Go to the source code of this file.
Data Structures | |
struct | hard_reg_set_container |
struct | hard_reg_set_iterator |
struct | simplifiable_subregs_hasher |
struct | target_hard_regs |
Typedefs | |
typedef unsigned HOST_WIDEST_FAST_INT | HARD_REG_ELT_TYPE |
typedef HARD_REG_ELT_TYPE | HARD_REG_SET |
typedef const HARD_REG_SET | const_hard_reg_set |
Functions | |
bool | hard_reg_set_subset_p (const_hard_reg_set x, const_hard_reg_set y) |
bool | hard_reg_set_intersect_p (const_hard_reg_set x, const_hard_reg_set y) |
bool | hard_reg_set_empty_p (const_hard_reg_set x) |
void | hard_reg_set_iter_init (hard_reg_set_iterator *iter, const_hard_reg_set set, unsigned min, unsigned *regno) |
bool | hard_reg_set_iter_set (hard_reg_set_iterator *iter, unsigned *regno) |
void | hard_reg_set_iter_next (hard_reg_set_iterator *iter, unsigned *regno) |
Variables | |
char | global_regs [FIRST_PSEUDO_REGISTER] |
HARD_REG_SET | global_reg_set |
struct target_hard_regs | default_target_hard_regs |
const char * | reg_class_names [] |
#define accessible_reg_set (this_target_hard_regs->x_accessible_reg_set) |
Referenced by asm_clobber_reg_is_valid(), init_reg_sets(), init_reg_sets_1(), make_decl_rtl(), restore_register_info(), and save_register_info().
#define class_only_fixed_regs (this_target_hard_regs->x_class_only_fixed_regs) |
Referenced by find_reloads(), and init_reg_sets_1().
#define CLEAR_HARD_REG_BIT | ( | SET, | |
BIT ) |
Referenced by clear_reload_reg_in_use(), create_new_chain(), do_remat(), emit_reload_insns(), fill_simple_delay_slots(), fill_slots_from_thread(), forget_marked_reloads(), forget_old_reloads_1(), init_caller_save(), init_reg_sets_1(), init_resource_info(), insert_restore(), invalidate_reg(), make_hard_regno_dead(), make_hard_regno_dead(), make_object_dead(), parms_set(), process_bb_lives(), remove_from_hard_reg_set(), remove_range_from_hard_reg_set(), scan_loop(), scan_rtx_reg(), setup_profitable_hard_regs(), setup_prohibited_mode_move_regs(), try_shrink_wrapping(), and update_live_status().
#define CLEAR_HARD_REG_SET | ( | TO | ) |
Referenced by add_allocno_hard_regs_to_forest(), asm_clobber_reg_is_valid(), assign_parm_setup_reg(), call_clobbers_in_region(), function_abi_aggregator::caller_save_regs(), choose_reload_regs_init(), clarify_prohibited_class_mode_regs(), debug_value_data(), default_zero_call_used_regs(), df_get_call_refs(), df_hard_reg_init(), do_remat(), emit_reload_insns(), expand_asm_loc(), expand_asm_stmt(), fast_allocation(), find_all_hard_reg_sets(), find_first_parameter_load(), find_hard_regno_for(), find_reg(), find_reload_regs(), form_allocno_hard_regs_nodes_forest(), gen_call_used_regs_seq(), inherit_in_ebb(), init_reg_info(), init_reg_sets(), init_reg_sets_1(), init_rename_info(), init_resource_info(), initialize_lra_reg_info_element(), ira_build_conflicts(), ira_create_allocno(), ira_implicitly_set_insn_hard_regs(), ira_init_register_move_cost(), ira_setup_eliminable_regset(), lra_create_live_ranges_1(), lra_fp_pseudo_p(), lra_update_fp2sp_elimination(), mark_target_live_regs(), match_reload(), maybe_fix_stack_asms(), new_basic_block(), old_insns_match_p(), prepare_shrink_wrap(), process_alt_operands(), process_bb_lives(), reginfo_cc_finalize(), reload(), reload_as_needed(), reload_combine(), reload_cse_simplify_operands(), rename_chains(), requires_stack_frame_p(), save_call_clobbered_regs(), scan_loop(), setup_class_hard_regs(), setup_pressure_classes(), setup_profitable_hard_regs(), setup_prohibited_and_exclude_class_mode_regs(), setup_reg_mode_hard_regset(), setup_save_areas(), setup_stack_reg_pressure_class(), simplifiable_subreg::simplifiable_subreg(), try_combine(), try_shrink_wrapping(), update_eliminables_and_spill(), update_reg_eliminate(), and validate_value_data().
#define eh_return_data_regs (this_target_hard_regs->x_eh_return_data_regs) |
Referenced by df_get_exit_block_use_set(), and init_reg_sets_1().
Referenced by compute_hash_table_work(), dataflow_set_clear_at_call(), invalidate_for_call(), record_dead_and_set_regs(), and record_opr_changes().
#define fixed_nonglobal_reg_set (this_target_hard_regs->x_fixed_nonglobal_reg_set) |
Referenced by init_reg_sets_1(), and setup_alloc_regs().
#define fixed_reg_set (this_target_hard_regs->x_fixed_reg_set) |
#define fixed_regs (this_target_hard_regs->x_fixed_regs) |
Referenced by aggregate_value_p(), build_insn_chain(), can_combine_def_p(), can_combine_p(), can_move_insns_across(), check_new_reg_p(), combinable_i3pat(), combine_reloads(), const_or_frame_p(), copy_value(), default_internal_arg_pointer(), df_exit_block_uses_collect(), df_get_eh_block_artificial_uses(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_get_regular_block_artificial_uses(), df_lr_local_compute(), do_reload(), dwarf2out_frame_debug_expr(), expand_builtin_nonlocal_goto(), expand_builtin_setjmp_receiver(), find_base_value(), find_dummy_reload(), fix_register(), fixed_base_plus_p(), gen_call_used_regs_seq(), gen_rtx_REG(), get_group_info(), globalize_reg(), hash_rtx(), init_reg_sets(), init_reg_sets_1(), init_set_costs(), invariant_p(), keep_with_call_p(), lra(), make_hard_regno_dead(), make_hard_regno_live(), mark_used_regs_combine(), nonzero_address_p(), peep2_find_free_register(), push_reload(), record_set(), reg_dead_at_p(), reload(), reload_combine(), reload_combine_recognize_pattern(), rename_chains(), restore_register_info(), rtx_addr_can_trap_p_1(), rtx_unstable_p(), rtx_varies_p(), save_register_info(), simplify_context::simplify_plus_minus(), update_reg_eliminate(), vt_init_cfa_base(), and vt_initialize().
#define HARD_CONST | ( | X | ) |
HARD_CONST is used to cast a constant to the appropriate type for use with a HARD_REG_SET.
Referenced by hard_reg_set_empty_p(), hard_reg_set_intersect_p(), and hard_reg_set_subset_p().
#define HARD_REG_ELT_BITS UHOST_BITS_PER_WIDE_INT |
Referenced by hard_reg_set_iter_init(), and hard_reg_set_iter_set().
#define inv_reg_alloc_order (this_target_hard_regs->x_inv_reg_alloc_order) |
Referenced by find_reg(), init_reg_sets_1(), and ira_better_spill_reload_regno_p().
#define operand_reg_set (this_target_hard_regs->x_operand_reg_set) |
Referenced by general_operand(), init_reg_sets(), init_reg_sets_1(), make_decl_rtl(), restore_register_info(), and save_register_info().
#define reg_alloc_order (this_target_hard_regs->x_reg_alloc_order) |
Referenced by find_reg(), init_reg_sets(), init_reg_sets_1(), peep2_find_free_register(), and setup_class_hard_regs().
#define REG_CAN_CHANGE_MODE_P | ( | REGN, | |
FROM, | |||
TO ) |
Given a hard REGN a FROM mode and a TO mode, return true if REGN can change from mode FROM to mode TO.
Referenced by insn_propagation::apply_to_rvalue_1(), choose_reload_regs(), copy_value(), find_oldest_value_reg(), general_operand(), inherit_piecemeal_p(), mode_change_ok(), move2add_valid_value_p(), push_reload(), reload_cse_simplify_operands(), reload_cse_simplify_set(), set_noop_p(), simplify_set(), simplify_subreg_regno(), and validate_subreg().
#define reg_class_contents (this_target_hard_regs->x_reg_class_contents) |
Referenced by allocate_reload_reg(), assign_hard_reg(), calculate_allocation_cost(), choose_reload_regs(), choose_split_class(), combine_reloads(), curr_insn_transform(), detach_value(), enough_allocatable_hard_regs_p(), fast_allocation(), find_costs_and_classes(), find_dummy_reload(), find_equiv_reg(), find_hard_regno_for(), find_hard_regno_for_1(), find_oldest_value_reg(), find_reloads(), find_rename_reg(), find_reusable_reload(), find_valid_class(), find_valid_class_1(), gen_call_used_regs_seq(), get_conflict_and_start_profitable_regs(), in_class_p(), inherit_in_ebb(), init_caller_save(), init_reg_sets(), init_reg_sets_1(), init_set_costs(), ira_bad_reload_regno_1(), ira_build_conflicts(), ira_init_register_move_cost(), maybe_fix_stack_asms(), peep2_find_free_register(), print_allocno_conflicts(), process_alt_operands(), process_bb_node_for_hard_reg_moves(), process_single_reg_class_operands(), prohibited_class_reg_set_mode_p(), push_reload(), record_operand_costs(), reg_class_subset_p(), reg_classes_intersect_p(), reg_fits_class_p(), reload_adjust_reg_for_temp(), reload_combine(), reload_combine_recognize_pattern(), restrict_cost_classes(), setup_allocno_and_important_classes(), setup_allocno_assignment_flags(), setup_allocno_class_and_costs(), setup_class_hard_regs(), setup_class_subset_and_memory_move_costs(), setup_class_translate_array(), setup_live_pseudos_and_spill_after_risky_transforms(), setup_pressure_classes(), setup_prohibited_and_exclude_class_mode_regs(), setup_reg_class_relations(), setup_reg_subclasses(), setup_regno_cost_classes_by_aclass(), setup_regno_cost_classes_by_mode(), setup_stack_reg_pressure_class(), setup_try_hard_regno_pseudos(), simplify_operand_subreg(), update_and_check_small_class_inputs(), and update_costs_from_allocno().
#define reg_class_size (this_target_hard_regs->x_reg_class_size) |
Referenced by combine_reloads(), default_class_likely_spilled_p(), find_costs_and_classes(), find_reloads(), find_reloads_address_1(), find_valid_class(), init_reg_sets_1(), ira_bad_reload_regno_1(), must_not_spill_p(), process_bb_node_for_hard_reg_moves(), process_regs_for_copy(), record_operand_costs(), reload_reg_class_lower(), and small_register_class_p().
#define reg_class_subclasses (this_target_hard_regs->x_reg_class_subclasses) |
#define reg_class_subunion (this_target_hard_regs->x_reg_class_subunion) |
#define reg_class_superunion (this_target_hard_regs->x_reg_class_superunion) |
Referenced by choose_reload_regs(), init_reg_sets_1(), regrename_find_superclass(), and setup_reg_class_relations().
#define reg_names (this_target_hard_regs->x_reg_names) |
Referenced by create_new_chain(), decode_reg_name_and_count(), df_print_regset(), df_scan_start_dump(), dump_def_use_chain(), dump_regset(), init_reg_sets(), ira_setup_eliminable_regset(), lookup_reg_by_dump_name(), rtx_writer::print_rtx_operand_code_r(), print_value(), regrename_analyze(), rename_chains(), restore_register_info(), save_register_info(), and scan_rtx_reg().
#define savable_regs (this_target_hard_regs->x_savable_regs) |
Referenced by init_caller_save(), init_reg_sets_1(), save_call_clobbered_regs(), and setup_save_areas().
#define SET_HARD_REG_BIT | ( | SET, | |
BIT ) |
Referenced by predefined_function_abi::add_full_reg_clobber(), add_range_to_hard_reg_set(), add_to_hard_reg_set(), assign_hard_reg(), choose_reload_regs(), clarify_prohibited_class_mode_regs(), collect_fn_hard_reg_usage(), create_new_chain(), debug_value_data(), default_zero_call_used_regs(), df_find_hard_reg_defs_1(), df_hard_reg_init(), do_remat(), emit_output_reload_insns(), emit_reload_insns(), expand_asm_stmt(), fill_slots_from_thread(), find_first_parameter_load(), find_hard_regno_for_1(), find_reg(), finish_spills(), form_allocno_hard_regs_nodes_forest(), gen_call_used_regs_seq(), globalize_reg(), improve_allocation(), inherit_in_ebb(), init_reg_sets(), init_reg_sets_1(), init_rename_info(), init_resource_info(), predefined_function_abi::initialize(), insert_save(), ira_build_conflicts(), ira_init_register_move_cost(), ira_setup_eliminable_regset(), make_hard_regno_dead(), make_hard_regno_dead(), make_hard_regno_live(), make_hard_regno_live(), mark_referenced_resources(), mark_set_regs(), mark_set_resources(), mark_target_live_regs(), match_reload(), maybe_fix_stack_asms(), merge_overlapping_regs(), old_insns_match_p(), peep2_find_free_register(), prepare_shrink_wrap(), process_bb_lives(), reg_set_to_hard_reg_set(), reload(), reload_as_needed(), reload_cse_simplify_operands(), save_call_clobbered_regs(), scan_rtx_reg(), setup_class_hard_regs(), setup_pressure_classes(), setup_prohibited_and_exclude_class_mode_regs(), setup_reg_mode_hard_regset(), setup_save_areas(), setup_stack_reg_pressure_class(), simplifiable_subregs(), spill_hard_reg(), spill_hard_reg_in_range(), update_eliminables(), update_live_status(), and validate_value_data().
#define SET_HARD_REG_SET | ( | TO | ) |
Referenced by check_pseudos_live_through_calls(), init_reg_sets(), init_reg_sets_1(), mark_referenced_resources(), mark_set_resources(), mark_target_live_regs(), process_bb_node_lives(), cgraph_node::rtl_info(), and setup_prohibited_mode_move_regs().
#define TEST_HARD_REG_BIT | ( | SET, | |
BIT ) |
Referenced by allocate_reload_reg(), assign_hard_reg(), assign_parm_setup_reg(), assign_spill_hard_regs(), build_insn_chain(), cant_combine_insn_p(), change_loop(), check_hard_reg_p(), check_new_reg_p(), choose_reload_regs(), choose_split_class(), clarify_prohibited_class_mode_regs(), function_abi::clobbers_at_least_part_of_reg_p(), predefined_function_abi::clobbers_at_least_part_of_reg_p(), function_abi::clobbers_full_reg_p(), predefined_function_abi::clobbers_full_reg_p(), combine_reloads(), constrain_operands(), debug_value_data(), default_zero_call_used_regs(), detach_value(), df_epilogue_uses_p(), df_get_call_refs(), df_ref_create_structure(), do_input_reload(), do_output_reload(), do_remat(), enough_allocatable_hard_regs_p(), expand_asm_reg_clobber_mem_blockage(), fast_allocation(), fill_simple_delay_slots(), fill_slots_from_thread(), find_dummy_reload(), find_hard_regno_for_1(), find_reg(), find_reloads(), find_rename_reg(), find_reusable_reload(), find_valid_class(), finish_spills(), forget_marked_reloads(), forget_old_reloads_1(), form_allocno_hard_regs_nodes_forest(), gen_call_used_regs_seq(), get_regno_pressure_class(), get_regno_pressure_class(), hard_reg_set_size(), in_class_p(), in_hard_reg_set_p(), init_caller_save(), init_reg_sets_1(), init_rename_info(), init_set_costs(), insert_restore(), insert_save(), invalidate_for_call(), invalidate_reg(), invariant_p(), ira_bad_reload_regno_1(), ira_hard_reg_in_set_p(), ira_hard_reg_set_intersection_p(), ira_propagate_hard_reg_costs(), ira_setup_eliminable_regset(), lra_create_live_ranges_1(), lra_eliminate_reg_if_possible(), make_hard_regno_dead(), make_hard_regno_live(), make_more_copies(), make_object_dead(), mark_hard_reg_dead(), mark_hard_reg_live(), maybe_fix_stack_asms(), move_spill_restore(), need_for_split_p(), overlaps_hard_reg_set_p(), parms_set(), peep2_find_free_register(), print_hard_reg_set(), print_hard_reg_set(), process_alt_operands(), process_bb_lives(), process_bb_node_for_hard_reg_moves(), process_bb_node_lives(), push_reload(), range_in_hard_reg_set_p(), range_overlaps_hard_reg_set_p(), record_operand_costs(), reg_dead_at_p(), reload_adjust_reg_for_temp(), reload_as_needed(), reload_combine(), reload_combine_recognize_pattern(), reload_cse_simplify_operands(), reload_reg_free_for_value_p(), reload_reg_free_p(), reload_reg_reaches_end_p(), replace_reg_with_saved_mem(), requires_stack_frame_p(), save_call_clobbered_regs(), setup_allocno_available_regs_num(), setup_allocno_class_and_costs(), setup_class_hard_regs(), setup_hard_regno_aclass(), setup_left_conflict_sizes_p(), setup_live_pseudos_and_spill_after_risky_transforms(), setup_profitable_hard_regs(), setup_save_areas(), spill_hard_reg_in_range(), spill_pseudos(), update_costs_from_allocno(), update_eliminables_and_spill(), update_equiv_regs_prescan(), validate_value_data(), verify_reg_in_set(), and zcur_select_mode_rtx().
#define this_target_hard_regs (&default_target_hard_regs) |
Referenced by simplifiable_subregs().
#define UHOST_BITS_PER_WIDE_INT ((unsigned) HOST_BITS_PER_WIDEST_FAST_INT) |
Define macros SET_HARD_REG_BIT, CLEAR_HARD_REG_BIT and TEST_HARD_REG_BIT to set, clear or test one bit in a hard reg set of type HARD_REG_SET. All three take two arguments: the set and the register number. In the case where sets are arrays of longs, the first argument is actually a pointer to a long. Define two macros for initializing a set: CLEAR_HARD_REG_SET and SET_HARD_REG_SET. These take just one argument. Also define: hard_reg_set_subset_p (X, Y), which returns true if X is a subset of Y. hard_reg_set_intersect_p (X, Y), which returns true if X and Y intersect. hard_reg_set_empty_p (X), which returns true if X is empty.
typedef const HARD_REG_SET const_hard_reg_set |
typedef unsigned HOST_WIDEST_FAST_INT HARD_REG_ELT_TYPE |
Sets (bit vectors) of hard registers, and operations on them. Copyright (C) 1987-2024 Free Software Foundation, Inc. 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/>.
Define the type of a set of hard registers.
HARD_REG_ELT_TYPE is a typedef of the unsigned integral type which will be used for hard reg sets, either alone or in an array. If HARD_REG_SET is a macro, its definition is HARD_REG_ELT_TYPE, and it has enough bits to represent all the target machine's hard registers. Otherwise, it is a typedef for a suitably sized array of HARD_REG_ELT_TYPEs. HARD_REG_SET_LONGS is defined as how many. Note that lots of code assumes that the first part of a regset is the same format as a HARD_REG_SET. To help make sure this is true, we only try the widest fast integer mode (HOST_WIDEST_FAST_INT) instead of all the smaller types. This approach loses only if there are very few registers and then only in the few cases where we have an array of HARD_REG_SETs, so it needn't be as complex as it used to be.
typedef HARD_REG_ELT_TYPE HARD_REG_SET |
|
inline |
References HARD_CONST.
Referenced by add_allocno_hard_regs(), assign_parm_setup_reg(), function_abi_aggregator::caller_save_regs(), default_zero_call_used_regs(), empty_profitable_hard_regs(), find_hard_regno_for_1(), form_allocno_hard_regs_nodes_forest(), gen_call_used_regs_seq(), ira_propagate_hard_reg_costs(), process_alt_operands(), restrict_cost_classes(), setup_class_subset_and_memory_move_costs(), setup_class_translate_array(), setup_pressure_classes(), setup_reg_class_relations(), setup_reg_subclasses(), spill_pseudos(), rtx_properties::try_to_add_insn(), and update_equiv_regs_prescan().
|
inline |
References HARD_CONST, and y.
Referenced by add_allocno_hard_regs_to_forest(), assign_hard_reg(), can_get_prologue(), collect_allocno_hard_regs_cover(), init_reg_sets_1(), ira_init_register_move_cost(), push_allocno_to_stack(), reg_classes_intersect_p(), requires_stack_frame_p(), resource_conflicts_p(), setup_left_conflict_sizes_p(), setup_reg_class_relations(), update_and_check_small_class_inputs(), and update_conflict_allocno_hard_prefs().
|
inline |
The implementation of the iterator functions is fully analogous to the bitmap iterators.
References hard_reg_set_iterator::bits, HARD_REG_ELT_BITS, hard_reg_set_iterator::length, hard_reg_set_iterator::pelt, and hard_reg_set_iterator::word_no.
|
inline |
References hard_reg_set_iterator::bits.
|
inline |
|
inline |
References HARD_CONST, and y.
Referenced by add_allocno_hard_regs_to_forest(), assign_hard_reg(), collect_allocno_hard_regs_cover(), collect_fn_hard_reg_usage(), enough_allocatable_hard_regs_p(), fast_allocation(), find_costs_and_classes(), find_hard_regno_for_1(), gen_call_used_regs_seq(), in_class_p(), inherit_in_ebb(), init_reg_sets_1(), process_alt_operands(), prohibited_class_reg_set_mode_p(), reg_class_subset_p(), restrict_cost_classes(), setup_allocno_and_important_classes(), setup_class_subset_and_memory_move_costs(), setup_left_conflict_sizes_p(), setup_pressure_classes(), setup_reg_class_relations(), setup_reg_subclasses(), setup_regno_cost_classes_by_aclass(), and update_left_conflict_sizes_p().
|
extern |
|
extern |
The set of global registers.
Referenced by globalize_reg(), init_reg_sets_1(), reginfo_cc_finalize(), and rtx_properties::try_to_add_insn().
|
extern |
Define some standard sets of registers.
Indexed by hard register number, contains 1 for registers that are being used for global register decls. These must be exempt from ordinary flow analysis and are also considered fixed.
Indexed by hard register number, contains 1 for registers that are being used for global register decls. These must be exempt from ordinary flow analysis and are also considered fixed.
Referenced by can_combine_p(), can_move_insns_across(), check_new_reg_p(), clear_global_regs_cache(), copy_value(), deletable_insn_p(), df_get_call_refs(), df_get_entry_block_def_set(), df_get_exit_block_use_set(), df_lr_local_compute(), distribute_notes(), do_reload(), ext_dce_process_bb(), get_defs(), globalize_reg(), hash_rtx(), init_reg_sets_1(), init_resource_info(), ira_setup_eliminable_regset(), mark_referenced_resources(), mark_target_live_regs(), peep2_find_free_register(), reload_combine_recognize_pattern(), rename_chains(), simplify_context::simplify_plus_minus(), and rtx_properties::try_to_add_insn().
|
extern |
Vector indexed by reg class giving its name.
Array containing all of the register class names.
Referenced by assign_by_spills(), calculate_bb_reg_pressure(), calculate_loop_reg_pressure(), debug_reload_to_stream(), dump_def_use_chain(), dump_reg_info(), find_costs_and_classes(), inherit_reload_reg(), lra_change_class(), lra_create_new_reg_with_unique_value(), print_allocno_costs(), print_loop_title(), print_pseudo_costs(), print_translated_classes(), print_uniform_and_important_classes(), process_alt_operands(), record_reg_classes(), scan_one_insn(), setup_allocno_available_regs_num(), setup_preferred_alternate_classes_for_new_pseudos(), spill_failure(), and split_reg().