GCC Middle and Back End API Reference
|
Go to the source code of this file.
Macros | |
#define | ALLOC_REG_SET(OBSTACK) |
#define | FREE_REG_SET(REGSET) |
#define | INIT_REG_SET(HEAD) |
#define | CLEAR_REG_SET(HEAD) |
#define | REG_SET_EMPTY_P(HEAD) |
#define | COPY_REG_SET(TO, FROM) |
#define | REG_SET_EQUAL_P(A, B) |
#define | AND_REG_SET(TO, FROM) |
#define | AND_COMPL_REG_SET(TO, FROM) |
#define | IOR_REG_SET(TO, FROM) |
#define | IOR_REG_SET_HRS(TO, FROM) |
#define | XOR_REG_SET(TO, FROM) |
#define | IOR_AND_COMPL_REG_SET(TO, FROM1, FROM2) |
#define | CLEAR_REGNO_REG_SET(HEAD, REG) |
#define | SET_REGNO_REG_SET(HEAD, REG) |
#define | REGNO_REG_SET_P(TO, REG) |
#define | REG_SET_TO_HARD_REG_SET(TO, FROM) |
#define | EXECUTE_IF_SET_IN_REG_SET(REGSET, MIN, REGNUM, RSI) |
#define | EXECUTE_IF_AND_COMPL_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, RSI) |
#define | EXECUTE_IF_AND_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, RSI) |
Typedefs | |
typedef bitmap_head | regset_head |
typedef bitmap | regset |
typedef bitmap_iterator | reg_set_iterator |
Functions | |
void | reg_set_to_hard_reg_set (HARD_REG_SET *, const_bitmap) |
void | dump_regset (regset, FILE *) |
Variables | |
bitmap_obstack | reg_obstack |
#define ALLOC_REG_SET | ( | OBSTACK | ) |
Allocate a register set with oballoc.
Referenced by alloc_gcse_mem(), compute_hash_table_work(), copy_fixed_regs(), one_cprop_pass(), and simplify_using_initial_values().
#define AND_COMPL_REG_SET | ( | TO, | |
FROM ) |
`and' the complement of a register set with a register set.
Referenced by finish_spills().
#define AND_REG_SET | ( | TO, | |
FROM ) |
`and' a register set with a second register set.
#define CLEAR_REG_SET | ( | HEAD | ) |
Clear a register set by freeing up the linked list.
Referenced by build_insn_chain(), compute_hash_table_work(), finish_spills(), insert_one_insn(), order_regs_for_reload(), peep2_update_life(), reload(), reload_as_needed(), reset_opr_set_tables(), simplify_using_initial_values(), and thread_jump().
#define CLEAR_REGNO_REG_SET | ( | HEAD, | |
REG ) |
Clear a single register in a register set.
Referenced by finish_spills(), ira_reassign_pseudos(), maybe_fix_stack_asms(), and move_insn_for_shrink_wrap().
#define COPY_REG_SET | ( | TO, | |
FROM ) |
Copy a register set to another register set.
Referenced by insert_one_insn(), peep2_fill_buffer(), peep2_reinit_state(), peep2_update_life(), and peephole2_optimize().
#define EXECUTE_IF_AND_COMPL_IN_REG_SET | ( | REGSET1, | |
REGSET2, | |||
MIN, | |||
REGNUM, | |||
RSI ) |
Loop over all registers in REGSET1 and REGSET2, starting with MIN, setting REGNUM to the register number and executing CODE for all registers that are set in the first regset and not set in the second.
#define EXECUTE_IF_AND_IN_REG_SET | ( | REGSET1, | |
REGSET2, | |||
MIN, | |||
REGNUM, | |||
RSI ) |
Loop over all registers in REGSET1 and REGSET2, starting with MIN, setting REGNUM to the register number and executing CODE for all registers that are set in both regsets.
#define EXECUTE_IF_SET_IN_REG_SET | ( | REGSET, | |
MIN, | |||
REGNUM, | |||
RSI ) |
Loop over all registers in REGSET, starting with MIN, setting REGNUM to the register number and executing CODE for all registers that are set.
Referenced by change_loop(), compute_use_by_pseudos(), create_bb_allocnos(), create_loop_allocnos(), dump_regset(), find_reg(), finish_spills(), forget_marked_reloads(), generate_edge_moves(), order_regs_for_reload(), save_call_clobbered_regs(), and setup_save_areas().
#define FREE_REG_SET | ( | REGSET | ) |
Do any cleanup needed on a regset when it is no longer used.
Referenced by compute_hash_table_work(), free_gcse_mem(), one_cprop_pass(), and simplify_using_initial_values().
#define INIT_REG_SET | ( | HEAD | ) |
Initialize a new regset.
Referenced by init_reload(), ira_mark_new_stack_slot(), new_insn_chain(), peep2_update_life(), and reload_as_needed().
#define IOR_AND_COMPL_REG_SET | ( | TO, | |
FROM1, | |||
FROM2 ) |
Or into TO the register set FROM1 `and'ed with the complement of FROM2.
#define IOR_REG_SET | ( | TO, | |
FROM ) |
Inclusive or a register set with a second register set.
Referenced by simplify_using_initial_values(), and try_head_merge_bb().
#define IOR_REG_SET_HRS | ( | TO, | |
FROM ) |
Same, but with FROM being a HARD_REG_SET.
Referenced by df_get_exit_block_use_set(), and simplify_using_initial_values().
#define REG_SET_EMPTY_P | ( | HEAD | ) |
#define REG_SET_EQUAL_P | ( | A, | |
B ) |
Compare two register sets.
#define REG_SET_TO_HARD_REG_SET | ( | TO, | |
FROM ) |
Referenced by add_range_and_copies_from_move_list(), can_get_prologue(), choose_reload_regs_init(), finish_spills(), init_rename_info(), mark_target_live_regs(), order_regs_for_reload(), peep2_find_free_register(), process_bb_lives(), process_bb_node_lives(), regrename_analyze(), reload_combine(), save_call_clobbered_regs(), and setup_save_areas().
#define REGNO_REG_SET_P | ( | TO, | |
REG ) |
Return true if a register is set in a register set.
Referenced by allocate_initial_values(), altered_reg_used(), count_pseudo(), count_spilled_pseudo(), discover_loop(), discover_loops(), emit_reload_insns(), forget_marked_reloads(), forget_old_reloads_1(), gen_call_used_regs_seq(), get_last_value(), get_last_value_validate(), live_edge_for_reg(), mentions_nonequal_regs(), move_insn_for_shrink_wrap(), note_add_store(), peep2_reg_dead_p(), peep2_regno_dead_p(), reg_available_p(), reg_dead_at_p(), reg_nonzero_bits_for_combine(), reg_not_set_p(), reg_num_sign_bit_copies_for_combine(), regno_clobbered_at_setjmp(), scan_loop(), and set_nonzero_bits_and_sign_copies().
#define SET_REGNO_REG_SET | ( | HEAD, | |
REG ) |
Set a single register in a register set.
Referenced by add_stored_regs(), allocate_initial_values(), alter_reg(), choose_reload_regs(), count_pseudo(), count_spilled_pseudo(), emit_reload_insns(), finish_spills(), forget_old_reloads_1(), insert_restore(), insert_save(), ira_mark_new_stack_slot(), ira_reuse_stack_slot(), make_set_regs_unavailable(), mark_altered(), mark_oprs_set(), move_insn_for_shrink_wrap(), reload_as_needed(), and spill_hard_reg().
#define XOR_REG_SET | ( | TO, | |
FROM ) |
Exclusive or a register set with a second register set.
typedef bitmap_iterator reg_set_iterator |
typedef bitmap_head regset_head |
Define regsets. Copyright (C) 1987-2025 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/>.
TODO: regset is just a bitmap in its implementation. The compiler does not consistently use one or the other, i.e. sometimes variables are declared as bitmap but they are actually regsets and regset accessors are used, and vice versa, or mixed (see e.g. spilled_regs in IRA). This should be cleaned up, either by just dropping the regset type, or by changing all bitmaps that are really regsets to the regset type. For the latter option, a good start would be to change everything allocated on the reg_obstack to regset.
Head of register set linked list.
|
extern |
In df-core.cc (which should use regset consistently instead of bitmap...)
Write information about registers and basic blocks into FILE. This is part of making a debugging dump.
References EXECUTE_IF_SET_IN_REG_SET, i, NULL, r, and reg_names.
Referenced by debug_regset(), and dump_candidates_and_remat_bb_data().
|
extern |
Copy the hard registers in a register set to the hard register set.
Given a register bitmap, turn on the bits in a HARD_REG_SET that correspond to the hard registers, if any, set in that map. This could be done far more efficiently by having all sorts of special-cases with moving single words, but probably isn't worth the trouble.
References EXECUTE_IF_SET_IN_BITMAP, i, and SET_HARD_REG_BIT.
|
extern |
An obstack for regsets.
The obstack on which regsets are allocated.
Referenced by assign_by_spills(), assign_spill_hard_regs(), bb_valid_for_noce_process_p(), bbs_ok_for_cmove_arith(), calculate_bb_reg_pressure(), calculate_equiv_gains(), calculate_gen_cands(), calculate_loop_reg_pressure(), can_move_insns_across(), combine_stack_adjustments(), combine_stack_adjustments_for_block(), create_remat_bb_data(), dead_or_predicable(), do_remat(), dse_step0(), dse_step1(), cgraph_node::expand(), find_exits(), initialize_lra_reg_info_element(), initiate_live_solver(), lra(), lra_assign(), lra_coalesce(), lra_constraints(), lra_eliminate(), lra_inheritance(), lra_live_ranges_init(), lra_remat(), lra_split_hard_reg_for(), lra_undo_inheritance(), noce_convert_multiple_sets(), peephole2_optimize(), remove_scratches(), replace_read(), run_rtl_passes(), simplify_using_initial_values(), spill_pseudos(), spill_pseudos(), undo_optional_reloads(), and update_bad_spill_attribute().