#include "config.h"#include "system.h"#include "hard-reg-set.h"#include "rtl.h"#include "expr.h"#include "tm_p.h"#include "flags.h"#include "basic-block.h"#include "regs.h"#include "function.h"#include "insn-config.h"#include "recog.h"#include "reload.h"#include "real.h"#include "toplev.h"#include "output.h"#include "ggc.h"#include "gt-regclass.h"

Go to the source code of this file.
Data Types | |
| type | costs |
| type | reg_pref |
Defines | |
| #define | REGISTER_MOVE_COST(m, x, y) 2 |
| #define | N_REG_INTS ((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32) |
Functions/Subroutines | |
| static void init_reg_sets_1 | PARAMS ((void)) |
| static | GTY (()) |
| void | init_reg_sets () |
| static void | init_reg_sets_1 () |
| static void | init_reg_modes () |
| void | init_regs () |
| void | init_fake_stack_mems () |
| enum machine_mode | choose_hard_reg_mode (regno, unsigned int nregs) |
| void | fix_register (char *name, int fixed, int call_used) const |
| void | globalize_reg (int i) |
| static rtx scan_one_insn | PARAMS ((rtx, int)) |
| static void record_operand_costs | PARAMS ((rtx, struct costs *, struct reg_pref *)) |
| static void dump_regclass | PARAMS ((FILE *)) |
| static void record_reg_classes | PARAMS ((int, int, rtx *, enum machine_mode *, const char **, rtx, struct costs *, struct reg_pref *)) |
| static int copy_cost | PARAMS ((rtx, enum machine_mode, enum reg_class, int)) |
| static void record_address_regs | PARAMS ((rtx, enum reg_class, int)) |
| static void reg_scan_mark_refs | PARAMS ((rtx, rtx, int, unsigned int)) |
| enum reg_class | reg_preferred_class (int regno) |
| enum reg_class | reg_alternate_class (int regno) |
| void | regclass_init () |
| static void | dump_regclass (FILE *dump) |
| static void | record_operand_costs (rtx insn, struct costs *op_costs, struct reg_pref *reg_pref) |
| static rtx | scan_one_insn (rtx insn, int pass) |
| static void | init_reg_autoinc () |
| void | regclass (rtx f, int nregs, FILE *dump) |
| static void | record_reg_classes (int n_alts, int n_ops, rtx *ops, enum machine_mode *modes, const char **constraints, rtx insn, struct costs *op_costs, struct reg_pref *reg_pref) |
| static int | copy_cost (rtx x, mode, enum reg_class class, to_p) |
| static void | record_address_regs (rtx x, enum reg_class class, int scale) |
| void | allocate_reg_info (size_t num_regs, int new_p, int renumber_p) |
| void | free_reg_info () |
| void | reg_scan (rtx f, unsigned int nregs, repeat) |
| void | reg_scan_update (rtx first, rtx last, unsigned int old_max_regno) |
| static void | reg_scan_mark_refs (rtx x, rtx insn, int note_flag, unsigned int min_regno) |
| int | reg_class_subset_p (enum reg_class c1, enum reg_class c2) |
| int | reg_classes_intersect_p (enum reg_class c1, enum reg_class c2) |
| void | regset_release_memory () |
Variables | |
| char | fixed_regs [FIRST_PSEUDO_REGISTER] |
| HARD_REG_SET | fixed_reg_set |
| static const char | initial_fixed_regs [] = FIXED_REGISTERS |
| char | call_used_regs [FIRST_PSEUDO_REGISTER] |
| HARD_REG_SET | call_used_reg_set |
| HARD_REG_SET | losing_caller_save_reg_set |
| static const char | initial_call_used_regs [] = CALL_USED_REGISTERS |
| char | call_fixed_regs [FIRST_PSEUDO_REGISTER] |
| HARD_REG_SET | call_fixed_reg_set |
| int | n_non_fixed_regs |
| char | global_regs [FIRST_PSEUDO_REGISTER] |
| HARD_REG_SET | regs_invalidated_by_call |
| HARD_REG_SET | reg_class_contents [N_REG_CLASSES] |
| static const unsigned | int_reg_class_contents [N_REG_CLASSES][N_REG_INTS] = REG_CLASS_CONTENTS |
| unsigned int | reg_class_size [N_REG_CLASSES] |
| enum reg_class | reg_class_superclasses [N_REG_CLASSES][N_REG_CLASSES] |
| enum reg_class | reg_class_subclasses [N_REG_CLASSES][N_REG_CLASSES] |
| enum reg_class | reg_class_subunion [N_REG_CLASSES][N_REG_CLASSES] |
| enum reg_class | reg_class_superunion [N_REG_CLASSES][N_REG_CLASSES] |
| enum machine_mode | reg_raw_mode [FIRST_PSEUDO_REGISTER] |
| static char | contains_reg_of_mode [N_REG_CLASSES][MAX_MACHINE_MODE] |
| static int | move_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] |
| static int | may_move_in_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] |
| static int | may_move_out_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] |
| static struct reg_info_data * | reg_info_head |
| static int | no_global_reg_vars = 0 |
| static struct costs * | costs |
| static struct costs | init_cost |
| static struct reg_pref * | reg_pref |
| static struct reg_pref * | reg_pref_buffer |
| static int | frequency |
| static short * | renumber |
| static size_t | regno_allocated |
| static unsigned int | reg_n_max |
| int | max_parallel |
| static int | max_set_parallel |
| #define N_REG_INTS ((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32) |
Definition at line 164 of file regclass.c.
| #define REGISTER_MOVE_COST | ( | m, | |||
| x, | |||||
| y | ) | 2 |
Definition at line 54 of file regclass.c.
Definition at line 2176 of file regclass.c.
Referenced by allocate_reg_life_data(), branch_prob(), bypass_jumps(), dead_or_predicable(), df_ri_alloc(), emit_colors(), gcse_main(), gmalloc(), if_convert(), reg_alloc(), reg_scan(), reg_scan_update(), rest_of_compilation(), rest_of_handle_local_alloc(), rest_of_handle_old_regalloc(), rest_of_handle_sms(), rtl_find_values_to_profile(), rtl_value_profile_transformations(), and setup_renumber().
| enum machine_mode choose_hard_reg_mode | ( | regno | , | |
| unsigned int | nregs | |||
| ) |
Definition at line 671 of file regclass.c.
References GET_CLASS_NARROWEST_MODE, GET_MODE_WIDER_MODE, HARD_REGNO_MODE_OK, HARD_REGNO_NREGS, MODE_FLOAT, MODE_INT, MODE_VECTOR_FLOAT, MODE_VECTOR_INT, and NUM_MACHINE_MODES.
Referenced by init_reg_modes(), and init_reg_modes_once().
Definition at line 1891 of file regclass.c.
References copy_cost, COSTS_N_INSNS, GET_CODE, int, MEM, MEMORY_MOVE_COST, NO_REGS, PREFERRED_RELOAD_CLASS, REG, REGNO, REGNO_REG_CLASS, SECONDARY_INPUT_RELOAD_CLASS, and SECONDARY_OUTPUT_RELOAD_CLASS.
Definition at line 924 of file regclass.c.
References CANNOT_CHANGE_MODE_CLASS, FIRST_PSEUDO_REGISTER, fprintf(), i, int, invalid_mode_change_p(), max_regno, PSEUDO_REGNO_MODE, reg_class_names, REG_CLASS_NAMES, and REG_N_REFS.
Referenced by regclass().
| void fix_register | ( | char * | name, | |
| int | fixed, | |||
| int | call_used | |||
| ) | const |
Definition at line 740 of file regclass.c.
References decode_reg_name(), error(), FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM, i, STACK_POINTER_REGNUM, and warning.
Referenced by common_handle_option(), and decode_f_option().
| void globalize_reg | ( | int | i | ) |
| static GTY | ( | () | ) | [static] |
Definition at line 1159 of file regclass.c.
References FIRST_PSEUDO_REGISTER, gen_rtx_raw_REG, HARD_REGNO_MODE_OK, i, int, MODE_BASE_REG_CLASS, N_REG_CLASSES, NO_REGS, PUT_MODE, r, REGNO, SECONDARY_INPUT_RELOAD_CLASS, SECONDARY_OUTPUT_RELOAD_CLASS, SECONDARY_RELOAD_CLASS, and TEST_HARD_REG_BIT.
Referenced by init_regs().
| static void init_reg_modes | ( | ) | [static] |
Definition at line 559 of file regclass.c.
References choose_hard_reg_mode(), FIRST_PSEUDO_REGISTER, i, and word_mode.
Referenced by init_regs().
Definition at line 273 of file regclass.c.
Referenced by general_init(), and parse_options_and_default_flags().
Definition at line 308 of file regclass.c.
References ARG_POINTER_REGNUM, c, CALL_REALLY_USED_REGISTERS, CLASS_LIKELY_SPILLED_P, CLASS_MAX_NREGS, CLEAR_HARD_REG_SET, CONDITIONAL_REGISTER_USAGE, COPY_HARD_REG_SET, FIRST_PSEUDO_REGISTER, FRAME_POINTER_REGNUM, GO_IF_HARD_REG_SUBSET, HARD_FRAME_POINTER_REGNUM, HARD_REG_SET, HARD_REGNO_MODE_OK, i, int, IOR_HARD_REG_SET, LIM_REG_CLASSES, MAX, memcpy, memset, N_REG_CLASSES, NO_REGS, p, p1, p2, PIC_OFFSET_TABLE_REGNUM, reg_class_subset_p(), REGISTER_MOVE_COST, REGNO_REG_CLASS, SET_HARD_REG_BIT, STACK_POINTER_REGNUM, and TEST_HARD_REG_BIT.
Referenced by init_regs().
| static int copy_cost PARAMS | ( | (rtx, enum machine_mode, enum reg_class, int) | ) | [static] |
| static void record_reg_classes PARAMS | ( | (int, int, rtx *, enum machine_mode *, const char **, rtx, struct costs *, struct reg_pref *) | ) | [static] |
Definition at line 77 of file cplus-dem.c.
Definition at line 1956 of file regclass.c.
References CONST, CONSTANT_P, costs::cost, FIRST_PSEUDO_REGISTER, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, INDEX_REG_CLASS, MAX_REGS_PER_ADDRESS, costs::mem_cost, MEMORY_MOVE_COST, MODE_BASE_REG_CLASS, N_REG_CLASSES, PC, PLUS, Pmode, REG, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REG_P, REG_POINTER, REGNO, SUBREG_REG, and XEXP.
Referenced by record_address_regs(), record_operand_costs(), and scan_one_insn().
| static void record_operand_costs | ( | rtx | insn, | |
| struct costs * | op_costs, | |||
| struct reg_pref * | reg_pref | |||
| ) | [static] |
Definition at line 957 of file regclass.c.
References EXTRA_ADDRESS_CONSTRAINT, GET_CODE, i, init_cost, int, MAX_RECOG_OPERANDS, MEM, MODE_BASE_REG_CLASS, modes, record_address_regs(), record_reg_classes(), SUBREG_REG, and XEXP.
Referenced by scan_one_insn().
| static void record_reg_classes | ( | int | n_alts, | |
| int | n_ops, | |||
| rtx * | ops, | |||
| enum machine_mode * | modes, | |||
| const char ** | constraints, | |||
| rtx | insn, | |||
| struct costs * | op_costs, | |||
| struct reg_pref * | reg_pref | |||
| ) | [static] |
Definition at line 1407 of file regclass.c.
References address_operand(), c, char, CLASS_MAX_NREGS, CONST_DOUBLE_OK_FOR_LETTER_P, CONST_OK_FOR_LETTER_P, CONSTANT_P, copy_cost, costs::cost, EXTRA_ADDRESS_CONSTRAINT, EXTRA_CONSTRAINT, EXTRA_MEMORY_CONSTRAINT, find_reg_note(), find_regno_note(), FIRST_PSEUDO_REGISTER, flag_pic, GENERAL_REGS, GET_CODE, GET_MODE, GET_MODE_CLASS, HARD_REGNO_NREGS, i, int, INTVAL, LEGITIMATE_PIC_OPERAND_P, MEM, costs::mem_cost, MEMORY_MOVE_COST, memset, MIN, MODE_BASE_REG_CLASS, MODE_VECTOR_FLOAT, N_REG_CLASSES, NO_REGS, nr, OP_IN, OP_INOUT, OP_OUT, p, reg_pref::prefclass, REG, REG_CLASS_FROM_LETTER, REG_DEAD, reg_fits_class_p(), REGISTER_MOVE_COST, REGNO, rtx_equal_p(), SET_DEST, SET_SRC, single_set, TEST_HARD_REG_BIT, unsigned, and XEXP.
Referenced by record_operand_costs().
| enum reg_class reg_alternate_class | ( | int | regno | ) |
Definition at line 894 of file regclass.c.
Referenced by alloc_qty(), colorize_one_web(), df_urec_local_compute(), df_urec_mark_reg_use_for_earlyclobber(), dump_flow_info(), find_reloads(), global_alloc(), handle_asm_insn(), init_one_web_common(), mark_reg_use_for_earlyclobber(), modify_reg_pav(), remember_web_was_spilled(), retry_global_alloc(), and update_qty_class().
Definition at line 2574 of file regclass.c.
Referenced by bfin_memory_move_cost(), bfin_secondary_reload(), combine_reloads(), default_secondary_reload(), find_reg(), find_reloads(), find_reusable_reload(), init_reg_sets_1(), ix86_preferred_reload_class(), mcore_reload_class(), mips_preferred_reload_class(), mips_register_move_cost(), mips_secondary_reload_class(), preferred_reload_class(), push_reload(), push_secondary_reload(), recompute_gain_for_pattern_seq(), reg_meets_class_p(), regclass_compatible_p(), s390_preferred_reload_class(), score_preferred_reload_class(), secondary_input_reload_class(), update_qty_class(), and xstormy16_secondary_reload_class().
Definition at line 2592 of file regclass.c.
Referenced by choose_reload_regs(), crx_memory_move_cost(), crx_secondary_reload_class(), df_urec_mark_reg_use_for_earlyclobber(), mark_reg_use_for_earlyclobber(), mips_cannot_change_mode_class(), rs6000_memory_move_cost(), rs6000_register_move_cost(), s390_secondary_input_reload_class(), s390_secondary_output_reload_class(), and sh_cannot_change_mode_class().
| enum reg_class reg_preferred_class | ( | int | regno | ) |
Definition at line 885 of file regclass.c.
Referenced by alloc_qty(), colorize_one_web(), df_urec_local_compute(), df_urec_mark_reg_use_for_earlyclobber(), dump_flow_info(), find_reg(), find_reloads(), handle_asm_insn(), init_one_web_common(), mark_reg_use_for_earlyclobber(), modify_reg_pav(), prune_preferences(), reg_meets_class_p(), regmove_optimize(), remember_web_was_spilled(), update_equiv_regs(), and update_qty_class().
Definition at line 2329 of file regclass.c.
References allocate_reg_info(), FALSE, GET_CODE, insn, NEXT_INSN, PATTERN, REG_NOTES, reg_scan_mark_refs(), TRUE, and XVECLEN.
Referenced by convert_to_ssa(), fix_edges_for_rarely_executed_code(), loop_optimize(), rest_of_compilation(), rest_of_handle_cfg(), rest_of_handle_cse(), rest_of_handle_cse2(), rest_of_handle_gcse(), rest_of_handle_if_conversion(), rest_of_handle_jump2(), rest_of_handle_jump_bypass(), rest_of_handle_loop2(), rest_of_handle_loop_optimize(), rest_of_handle_see(), rest_of_handle_tracer(), rest_of_handle_web(), and rtl_loop_done().
Definition at line 2393 of file regclass.c.
References CONST, dest, find_reg_note(), FIRST_PSEUDO_REGISTER, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, INSN_UID, MAX, PC, PLUS, REG, REG_EQUAL, REG_N_REFS, REG_N_SETS, REG_P, REG_POINTER, REG_USERVAR_P, REGNO, REGNO_DECL, REGNO_FIRST_UID, REGNO_LAST_NOTE_UID, REGNO_LAST_UID, SET, SET_DEST, SET_SRC, SIGN_EXTEND, src, subreg_lowpart_p(), TRUNCATE, XEXP, XVEC, XVECEXP, and XVECLEN.
Referenced by reg_scan(), reg_scan_mark_refs(), and reg_scan_update().
Definition at line 2363 of file regclass.c.
Referenced by duplicate_loop_exit_test(), reg_alloc(), and scan_loop().
Definition at line 1215 of file regclass.c.
Referenced by Allocate_Register(), Assign_Registers_For_OP(), LRA_Estimate_Fat_Points(), reg_alloc(), rest_of_compilation(), rest_of_handle_local_alloc(), and rest_of_handle_old_regalloc().
Definition at line 906 of file regclass.c.
Referenced by rest_of_compilation(), and rest_of_handle_life().
| void regset_release_memory | ( | ) |
Definition at line 2619 of file regclass.c.
References bitmap_release_memory().
Referenced by rest_of_compilation().
Definition at line 1030 of file regclass.c.
References b, CONSTANT_P, costs::cost, dest, emit_insn_before(), extract_insn(), find_reg_note(), FIRST_PSEUDO_REGISTER, FOR_EACH_BB, gen_lowpart, gen_move_insn(), GENERAL_REGS, GET_CODE, GET_MODE, GET_RTX_CLASS, basic_block_def::head, i, MEM, costs::mem_cost, MEMORY_MOVE_COST, MODE_BASE_REG_CLASS, MODES_TIEABLE_P, N_REG_CLASSES, NULL_RTX, optimize, p, PATTERN, PREV_INSN, prev_real_insn(), q, record_address_regs(), record_operand_costs(), REG, REG_EQUIV, REG_FREQ, REG_N_REFS, REG_N_SETS, REGNO, rtx_equal_p(), SET_DEST, SET_SRC, single_set, USE, and XEXP.
Referenced by regclass().
| HARD_REG_SET call_fixed_reg_set |
Definition at line 125 of file regclass.c.
| char call_fixed_regs[FIRST_PSEUDO_REGISTER] |
Definition at line 121 of file regclass.c.
| HARD_REG_SET call_used_reg_set |
Definition at line 98 of file regclass.c.
| char call_used_regs[FIRST_PSEUDO_REGISTER] |
Definition at line 94 of file regclass.c.
char contains_reg_of_mode[N_REG_CLASSES][MAX_MACHINE_MODE] [static] |
Definition at line 208 of file regclass.c.
Referenced by dump_regclass(), init_reg_sets_1(), and regclass().
Definition at line 847 of file regclass.c.
| HARD_REG_SET fixed_reg_set |
Definition at line 82 of file regclass.c.
| char fixed_regs[FIRST_PSEUDO_REGISTER] |
Definition at line 78 of file regclass.c.
int frequency [static] |
Definition at line 864 of file regclass.c.
Referenced by estimate_bb_frequencies(), extended_coalesce_2(), propagate_freq(), scale_bbs_frequencies_gcov_type(), and scale_bbs_frequencies_int().
| char global_regs[FIRST_PSEUDO_REGISTER] |
Definition at line 136 of file regclass.c.
Definition at line 851 of file regclass.c.
Referenced by record_operand_costs(), and regclass_init().
const char initial_call_used_regs[] = CALL_USED_REGISTERS [static] |
const char initial_fixed_regs[] = FIXED_REGISTERS [static] |
const unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS] = REG_CLASS_CONTENTS [static] |
| HARD_REG_SET losing_caller_save_reg_set |
Definition at line 101 of file regclass.c.
| int max_parallel |
int max_set_parallel [static] |
Definition at line 2326 of file regclass.c.
int may_move_in_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static] |
Definition at line 218 of file regclass.c.
Referenced by init_reg_sets_1(), record_address_regs(), and record_reg_classes().
int may_move_out_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static] |
Definition at line 223 of file regclass.c.
Referenced by init_reg_sets_1(), and record_reg_classes().
int move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static] |
| int n_non_fixed_regs |
Definition at line 129 of file regclass.c.
int no_global_reg_vars = 0 [static] |
Definition at line 266 of file regclass.c.
| HARD_REG_SET reg_class_contents[N_REG_CLASSES] |
Definition at line 157 of file regclass.c.
| unsigned int reg_class_size[N_REG_CLASSES] |
Definition at line 172 of file regclass.c.
| enum reg_class reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES] |
Definition at line 180 of file regclass.c.
| enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES] |
Definition at line 185 of file regclass.c.
| enum reg_class reg_class_superclasses[N_REG_CLASSES][N_REG_CLASSES] |
Definition at line 176 of file regclass.c.
| enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES] |
Definition at line 190 of file regclass.c.
struct reg_info_data* reg_info_head [static] |
Definition at line 261 of file regclass.c.
unsigned int reg_n_max [static] |
Definition at line 2166 of file regclass.c.
Definition at line 856 of file regclass.c.
struct reg_pref* reg_pref_buffer [static] |
Definition at line 860 of file regclass.c.
| enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER] |
Definition at line 204 of file regclass.c.
Referenced by apply_args_size(), apply_result_size(), cselib_process_insn(), distribute_notes(), gen_rtx_REG(), inherit_piecemeal_p(), init_emit_once(), init_reg_modes_once(), parts_to_webs(), safe_insert_insn_on_edge(), and sched_analyze().
size_t regno_allocated [static] |
Definition at line 2165 of file regclass.c.
| HARD_REG_SET regs_invalidated_by_call |
Definition at line 145 of file regclass.c.
short* renumber [static] |
Definition at line 2164 of file regclass.c.
1.5.6