GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | hard_reg_set_container |
struct | hard_reg_set_iterator |
struct | target_hard_regs |
Typedefs | |
typedef unsigned HOST_WIDEST_FAST_INT | HARD_REG_ELT_TYPE |
Functions | |
static bool | hard_reg_set_subset_p () |
static bool | hard_reg_set_equal_p () |
static bool | hard_reg_set_intersect_p () |
static bool | hard_reg_set_empty_p () |
static void | hard_reg_set_iter_init (hard_reg_set_iterator *iter, HARD_REG_SET set, unsigned min, unsigned *regno) |
static bool | hard_reg_set_iter_set () |
static void | hard_reg_set_iter_next () |
Variables | |
char | global_regs [FIRST_PSEUDO_REGISTER] |
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 save_register_info().
#define AND_COMPL_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) &= ~ (FROM)) |
#define AND_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) &= (FROM)) |
Referenced by ira_debug_disposition(), and save_call_clobbered_regs().
#define call_fixed_reg_set (this_target_hard_regs->x_call_fixed_reg_set) |
Referenced by init_caller_save(), and save_call_clobbered_regs().
#define call_really_used_regs (this_target_hard_regs->x_call_really_used_regs) |
Referenced by save_register_info().
#define call_used_reg_set (this_target_hard_regs->x_call_used_reg_set) |
#define call_used_regs (this_target_hard_regs->x_call_used_regs) |
Referenced by init_caller_save(), merge_overlapping_regs(), save_register_info(), and seq_cost().
#define class_only_fixed_regs (this_target_hard_regs->x_class_only_fixed_regs) |
#define CLEAR_HARD_REG_BIT | ( | SET, | |
BIT | |||
) | ((SET) &= ~(HARD_CONST (1) << (BIT))) |
Referenced by make_hard_regno_born(), reload_as_needed(), and replace_reg_with_saved_mem().
#define CLEAR_HARD_REG_SET | ( | TO | ) | ((TO) = HARD_CONST (0)) |
#define COMPL_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) = ~(FROM)) |
#define COPY_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) = (FROM)) |
Referenced by btr_def_live_range(), find_reg_classes(), ira_debug_disposition(), mark_target_live_regs(), process_alt_operands(), restore_costs_from_copies(), save_register_info(), saved_hard_reg_compare_func(), setup_allocno_and_important_classes(), setup_cost_classes(), setup_stack_reg_pressure_class(), setup_uniform_class_p(), update_costs_from_copies(), and update_left_conflict_sizes_p().
#define fixed_reg_set (this_target_hard_regs->x_fixed_reg_set) |
#define fixed_regs (this_target_hard_regs->x_fixed_regs) |
#define HARD_CONST | ( | X | ) | ((HARD_REG_ELT_TYPE) (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_equal_p(), and hard_reg_set_intersect_p().
#define HARD_REG_ELT_BITS UHOST_BITS_PER_WIDE_INT |
Referenced by hard_reg_set_iter_init().
#define HARD_REG_SET HARD_REG_ELT_TYPE |
Referenced by btr_def_live_range(), do_warn_unused_parameter(), finish_live_reload_and_inheritance_pseudos(), print_hard_reg_set(), process_alt_operands(), process_reg_shuffles(), return_insn_p(), save_call_clobbered_regs(), saved_hard_reg_compare_func(), setup_alloc_regs(), setup_cost_classes(), setup_stack_reg_pressure_class(), setup_uniform_class_p(), split_all_insns(), and tree_conflicts_with_clobbers_p().
#define inv_reg_alloc_order (this_target_hard_regs->x_inv_reg_alloc_order) |
#define IOR_COMPL_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) |= ~ (FROM)) |
#define IOR_HARD_REG_SET | ( | TO, | |
FROM | |||
) | ((TO) |= (FROM)) |
#define no_caller_save_reg_set (this_target_hard_regs->x_no_caller_save_reg_set) |
Referenced by reg_restore_code().
#define operand_reg_set (this_target_hard_regs->x_operand_reg_set) |
Referenced by save_register_info().
#define reg_alloc_order (this_target_hard_regs->x_reg_alloc_order) |
Referenced by split_all_insns().
#define REG_CANNOT_CHANGE_MODE_P | ( | REGN, | |
FROM, | |||
TO | |||
) | CANNOT_CHANGE_MODE_CLASS (FROM, TO, REGNO_REG_CLASS (REGN)) |
Given a hard REGN a FROM mode and a TO mode, return nonzero if REGN cannot change modes between the specified modes.
Referenced by validate_subreg().
#define reg_class_contents (this_target_hard_regs->x_reg_class_contents) |
Referenced by find_best_rename_reg(), find_dummy_reload(), find_reg_classes(), find_replacement(), find_valid_class(), find_valid_class_1(), ira_debug_disposition(), lra_setup_reg_renumber(), process_alt_operands(), reg_set_to_hard_reg_set(), restore_costs_from_copies(), seq_cost(), setup_allocno_and_important_classes(), setup_cost_classes(), setup_stack_reg_pressure_class(), and setup_uniform_class_p().
#define reg_class_size (this_target_hard_regs->x_reg_class_size) |
Referenced by default_memory_move_cost(), and find_valid_class().
#define reg_class_subclasses (this_target_hard_regs->x_reg_class_subclasses) |
#define reg_class_subunion (this_target_hard_regs->x_reg_class_subunion) |
Referenced by process_alt_operands().
#define reg_class_superunion (this_target_hard_regs->x_reg_class_superunion) |
#define reg_names (this_target_hard_regs->x_reg_names) |
#define regs_invalidated_by_call (this_target_hard_regs->x_regs_invalidated_by_call) |
#define SET_HARD_REG_BIT | ( | SET, | |
BIT | |||
) | ((SET) |= HARD_CONST (1) << (BIT)) |
Referenced by debug_value_data(), in_hard_reg_set_p(), init_caller_save(), insert_restore(), insn_contains_asm(), insn_contains_asm_1(), lra_intersected_live_ranges_p(), reg_set_to_hard_reg_set(), save_call_clobbered_regs(), scan_paradoxical_subregs(), set_of_1(), setup_hard_regno_aclass(), setup_reg_class_nregs(), spill_pseudos(), and split_all_insns().
#define SET_HARD_REG_SET | ( | TO | ) | ((TO) = ~ HARD_CONST (0)) |
Referenced by process_bb_node_lives().
#define TEST_HARD_REG_BIT | ( | SET, | |
BIT | |||
) | (!!((SET) & (HARD_CONST (1) << (BIT)))) |
Referenced by count_pseudo(), debug_value_data(), df_refs_add_to_chains(), find_best_rename_reg(), find_call_crossed_cheap_reg(), find_dummy_reload(), find_valid_class_1(), init_caller_save(), insert_restore(), ira_pref_iter_init(), ira_reassign_pseudos(), lra_intersected_live_ranges_p(), mark_pseudo_regno_subword_dead(), merge_overlapping_regs(), print_unform_and_important_classes(), reload_as_needed(), remove_from_hard_reg_set(), replace_reg_with_saved_mem(), save_call_clobbered_regs(), seq_cost(), setup_reg_class_nregs(), and substitute_pseudo().
#define this_target_hard_regs (&default_target_hard_regs) |
#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 macros for copying hard reg sets: COPY_HARD_REG_SET and COMPL_HARD_REG_SET. These take two arguments TO and FROM; they read from FROM and store into TO. COMPL_HARD_REG_SET complements each bit.
Also define macros for combining hard reg sets: IOR_HARD_REG_SET and AND_HARD_REG_SET. These take two arguments TO and FROM; they read from FROM and combine bitwise into TO. Define also two variants IOR_COMPL_HARD_REG_SET and AND_COMPL_HARD_REG_SET which use the complement of the set FROM.
Also define:
hard_reg_set_subset_p (X, Y), which returns true if X is a subset of Y. hard_reg_set_equal_p (X, Y), which returns true if X and Y are equal. 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 unsigned HOST_WIDEST_FAST_INT HARD_REG_ELT_TYPE |
Sets (bit vectors) of hard registers, and operations on them. Copyright (C) 1987-2013 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.
|
inlinestatic |
|
inlinestatic |
References HARD_CONST.
Referenced by setup_uniform_class_p().
|
inlinestatic |
References HARD_CONST.
Referenced by bucket_allocno_compare_func().
|
inlinestatic |
The implementation of the iterator functions is fully analogous to the bitmap iterators.
This is required for correct search of the next bit.
References hard_reg_set_iterator::bits, HARD_REG_ELT_BITS, hard_reg_set_iterator::pelt, and hard_reg_set_iterator::word_no.
|
inlinestatic |
|
inlinestatic |
Return false when we're advanced past the end of the set.
Find the correct bit and return it.
Round to the beginning of the next word.
Find the next non-zero word.
|
inlinestatic |
Referenced by process_alt_operands(), setup_allocno_and_important_classes(), and setup_cost_classes().
struct target_hard_regs default_target_hard_regs |
char global_regs[FIRST_PSEUDO_REGISTER] |
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 fprint_ul(), merge_overlapping_regs(), and split_all_insns().
const char* reg_class_names[] |
Vector indexed by reg class giving its name.
Array containing all of the register class names.
Referenced by regrename_chain_from_id(), and scan_one_insn().