#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "machmode.h"#include "hard-reg-set.h"#include "rtl.h"#include "tm_p.h"#include "flags.h"#include "regs.h"#include "function.h"#include "insn-config.h"#include "recog.h"#include "reload.h"#include "output.h"#include "toplev.h"

Go to the source code of this file.
| #define BB_INFO_BY_INDEX | ( | N | ) | BB_INFO (BASIC_BLOCK(N)) |
| #define CLEAR_ALLOCNO_LIVE | ( | I | ) |
| #define CONFLICTP | ( | I, | |||
| J | ) |
| #define EXECUTE_IF_SET_IN_ALLOCNO_SET | ( | ALLOCNO_SET, | |||
| ALLOCNO, | |||||
| CODE | ) |
Value:
do { \ int i_; \ int allocno_; \ INT_TYPE *p_ = (ALLOCNO_SET); \ \ for (i_ = allocno_row_words - 1, allocno_ = 0; i_ >= 0; \ i_--, allocno_ += INT_BITS) \ { \ unsigned INT_TYPE word_ = (unsigned INT_TYPE) *p_++; \ \ for ((ALLOCNO) = allocno_; word_; word_ >>= 1, (ALLOCNO)++) \ { \ if (word_ & 1) \ {CODE;} \ } \ } \ } while (0)
| #define SET_ALLOCNO_LIVE | ( | I | ) |
| #define SET_REGBIT | ( | TABLE, | |||
| I, | |||||
| J | ) | SET_HARD_REG_BIT (allocno[I].TABLE, J) |
Definition at line 2035 of file global.c.
References alloc_aux_for_blocks(), basic_block_def::aux, bb_info::avloc, BITMAP_ALLOC, bitmap_copy(), BITMAP_FREE, bitmap_set_bit(), bb_info::earlyclobber, FIRST_PSEUDO_REGISTER, FOR_EACH_BB, i, bb_info::killed, bb_info::live_pavin, bb_info::live_pavout, and NULL.
Referenced by make_accurate_live_analysis().
Definition at line 643 of file global.c.
References double, floor_log2, allocno::freq, REG_FREQ_MAX, and size.
Definition at line 1807 of file global.c.
References ALLOC_REG_SET, b, BARRIER_P, BB_END, BB_HEAD, c, CLEAR_REG_SET, COPY_REG_SET, eliminable_regset, ENTRY_BLOCK_PTR, EXECUTE_IF_SET_IN_BITMAP, EXIT_BLOCK_PTR, FIRST_PSEUDO_REGISTER, FREE_REG_SET, gcc_assert, GET_CODE, GET_MODE, basic_block_def::global_live_at_start, i, if(), basic_block_def::index, INSN_P, JUMP_P, live_relevant_regs, new_insn_chain(), basic_block_def::next_bb, NEXT_INSN, NOTE_P, note_stores(), p, PATTERN, prev, prev_real_insn(), reg_becomes_live(), REG_DEAD, reg_dies(), REG_NOTE_KIND, REG_NOTES, reg_obstack, REG_P, reg_renumber, REG_UNUSED, REGNO, reload_insn_chain, SET_REGNO_REG_SET, TEST_HARD_REG_BIT, USE, and XEXP.
Definition at line 2237 of file global.c.
References BB_END, BB_HEAD, check_earlyclobber(), earlyclobber_regclass, FOR_EACH_BB, insn, INSN_P, mark_reg_change(), mark_reg_use_for_earlyclobber_1(), NEXT_INSN, note_stores(), note_uses(), PATTERN, and VARRAY_INT_INIT.
Referenced by make_accurate_live_analysis().
Definition at line 2296 of file global.c.
References bb_info::avloc, BB_INFO, BITMAP_ALLOC, bitmap_and_into(), bitmap_copy(), bitmap_equal_p(), BITMAP_FREE, bitmap_ior_and_compl(), bitmap_ior_into(), edge::dest, ENTRY_BLOCK, EXIT_BLOCK, FOR_EACH_BB, FOR_EACH_EDGE, basic_block_def::global_live_at_end, basic_block_def::global_live_at_start, i, basic_block_def::index, bb_info::killed, bb_info::live_pavin, bb_info::live_pavout, n_basic_blocks, new_bbs, NULL, bb_info::pred, qsort(), rpost_cmp(), sbitmap_alloc(), sbitmap_free, sbitmap_zero(), SET_BIT, edge::src, bb_info::succ, temp_bitmap, TEST_BIT, VARRAY_ACTIVE_SIZE, VARRAY_BB, VARRAY_BB_INIT, VARRAY_POP_ALL, VARRAY_PUSH_BB, and varray_type.
Referenced by make_accurate_live_analysis().
Definition at line 2115 of file global.c.
References c, CONSTRAINT_LEN, earlyclobber_regclass, extract_insn(), GENERAL_REGS, i, NO_REGS, p, REG_CLASS_FROM_CONSTRAINT, VARRAY_ACTIVE_SIZE, VARRAY_INT, VARRAY_POP_ALL, and VARRAY_PUSH_INT.
Referenced by calculate_local_reg_bb_info(), and reload_reg_free_for_value_p().
Definition at line 1912 of file global.c.
References allocno_order, CONFLICTP, FIRST_PSEUDO_REGISTER, fprintf(), i, max_allocno, max_regno, nregs, reg_allocno, reg_renumber, size, and TEST_HARD_REG_BIT.
Definition at line 1969 of file global.c.
References FIRST_PSEUDO_REGISTER, fprintf(), i, max_regno, reg_renumber, and regs_ever_live.
Definition at line 895 of file global.c.
References a1, a2, CONFLICTP, get_insns(), insn, INSN_P, IOR_HARD_REG_SET, NEXT_INSN, reg_allocno, REG_DEAD, REG_NOTE_KIND, REG_NOTES, REG_P, REGNO, SET_DEST, SET_SRC, single_set, and XEXP.
| static void find_reg | ( | int | num, | |
| HARD_REG_SET | losers, | |||
| int | alt_regs_p, | |||
| int | accept_call_clobbered, | |||
| int | retrying | |||
| ) | [static] |
Definition at line 1034 of file global.c.
References allocno_row_words, AND_COMPL_HARD_REG_SET, caller_save_needed, CALLER_SAVE_PROFITABLE, CANNOT_CHANGE_MODE_CLASS, CLEAR_HARD_REG_SET, conflicts, COPY_HARD_REG_SET, double, EXECUTE_IF_SET_IN_ALLOCNO_SET, find_reg(), FIRST_PSEUDO_REGISTER, flag_caller_saves, for(), GO_IF_HARD_REG_SUBSET, HARD_REG_SET, HARD_REGNO_CALL_PART_CLOBBERED, HARD_REGNO_MODE_OK, hard_regno_nregs, i, if(), invalid_mode_change_p(), IOR_COMPL_HARD_REG_SET, IOR_HARD_REG_SET, LAST_STACK_REG, local_reg_freq, local_reg_live_length, local_reg_n_refs, losing_caller_save_reg_set, max_regno, mode, NO_REGS, PSEUDO_REGNO_MODE, r, reg_allocno, reg_class_contents, reg_class_subset_p(), reg_may_share, reg_preferred_class(), reg_renumber, REGNO_REG_CLASS, regs_used_so_far, SET_HARD_REG_BIT, size, STACK_REGS, TEST_HARD_REG_BIT, tmp1, and tmp2.
Definition at line 2063 of file global.c.
References bb_info::avloc, BB_INFO, BITMAP_FREE, bb_info::earlyclobber, FOR_EACH_BB, free_aux_for_blocks(), bb_info::killed, bb_info::live_pavin, and bb_info::live_pavout.
| int global_alloc | ( | FILE * | file | ) |
Definition at line 334 of file global.c.
References abort, allocno_compare(), allocno_order, allocno_row_words, allocnos_live, AND_COMPL_HARD_REG_SET, ARRAY_SIZE, build_insn_chain(), call_used_regs, allocno::calls_crossed, CAN_ELIMINATE, CLEAR_HARD_REG_SET, conflicts, current_function_calls_alloca, current_function_has_nonlocal_label, dump_conflicts(), ELIMINABLE_REGS, eliminable_regset, error(), EXIT_IGNORE_STACK, expand_preferences(), find_reg(), FIRST_PSEUDO_REGISTER, flag_omit_frame_pointer, FRAME_POINTER_REGNUM, FRAME_POINTER_REQUIRED, free(), allocno::freq, gcc_assert, get_insns(), global_conflicts(), HARD_FRAME_POINTER_REGNUM, allocno::hard_reg_conflicts, allocno::hard_reg_copy_preferences, allocno::hard_reg_preferences, HARD_REGNO_NREGS, hard_regno_nregs, i, INT_BITS, INT_TYPE, leaf_function_p(), LEAF_REGISTERS, allocno::live_length, local_reg_freq, local_reg_live_length, local_reg_n_refs, make_accurate_live_analysis(), max_allocno, max_regno, memset, mirror_conflicts(), n_basic_blocks, allocno::n_refs, N_REG_CLASSES, no_global_alloc_regs, NO_REGS, only_leaf_regs_used(), prune_preferences(), PSEUDO_REGNO_MODE, PSEUDO_REGNO_SIZE, qsort(), allocno::reg, reg_allocno, reg_alternate_class(), REG_FREQ, REG_LIVE_LENGTH, reg_may_share, REG_N_CALLS_CROSSED, REG_N_REFS, REG_N_THROWING_CALLS_CROSSED, reg_names, reg_renumber, REGNO, regs_asm_clobbered, regs_ever_live, regs_may_share, regs_used_so_far, reload(), SET_HARD_REG_BIT, allocno::size, size, size_t, STACK_POINTER_REGNUM, allocno::throwing_calls_crossed, x, xcalloc(), XEXP, and xmalloc().
Definition at line 671 of file global.c.
References a, allocno_row_words, allocnos_live, b, BB_END, BB_HEAD, call_used_regs, current_function_has_nonlocal_label, EDGE_ABNORMAL, EXECUTE_IF_SET_IN_ALLOCNO_SET, EXECUTE_IF_SET_IN_REG_SET, find_regno_note(), FIRST_PSEUDO_REGISTER, FIRST_STACK_REG, edge::flags, FOR_EACH_BB, FOR_EACH_EDGE, free(), GET_CODE, basic_block_def::global_live_at_start, hard_regs_live, i, insn, INT_TYPE, LAST_STACK_REG, mark_reg_clobber(), mark_reg_conflicts(), mark_reg_death(), mark_reg_live_nc(), mark_reg_store(), max_allocno, max_parallel, memset, multiple_sets(), n_regs_set, NEXT_INSN, note_stores(), NULL, NULL_RTX, PATTERN, PSEUDO_REGNO_MODE, record_conflicts(), record_one_conflict(), reg_allocno, REG_DEAD, REG_INC, REG_NO_CONFLICT, REG_NOTE_KIND, REG_NOTES, reg_overlap_mentioned_p(), REG_P, reg_renumber, REG_SET_TO_HARD_REG_SET, REG_UNUSED, REGNO, regs_set, RTX_CODE, rtx_equal_p(), SET, SET_ALLOCNO_LIVE, SET_DEST, XEXP, xmalloc(), XVECEXP, and XVECLEN.
Definition at line 2442 of file global.c.
References allocate_bb_info(), BB_INFO, bitmap_and_into(), calculate_local_reg_bb_info(), calculate_reg_pav(), compact_blocks(), FOR_EACH_BB, free_bb_info(), basic_block_def::global_live_at_end, basic_block_def::global_live_at_start, bb_info::live_pavin, bb_info::live_pavout, max_reg_num(), max_regno, modify_reg_pav(), and set_up_bb_rts_numbers().
Referenced by global_alloc().
| void mark_elimination | ( | int | from, | |
| int | to | |||
| ) |
Definition at line 1730 of file global.c.
References CLEAR_REGNO_REG_SET, FOR_EACH_BB, basic_block_def::global_live_at_start, r, REGNO_REG_SET_P, and SET_REGNO_REG_SET.
Definition at line 2084 of file global.c.
References bb_info::avloc, BB_INFO, bitmap_clear_bit(), bitmap_set_bit(), GET_CODE, bb_info::killed, REG_P, REGNO, and SUBREG_REG.
Referenced by calculate_local_reg_bb_info().
Definition at line 1528 of file global.c.
References FIRST_PSEUDO_REGISTER, fixed_regs, GET_CODE, GET_MODE, hard_regno_nregs, last, record_one_conflict(), reg_allocno, REG_P, reg_renumber, REGNO, and SUBREG_REG.
Definition at line 1567 of file global.c.
References CLEAR_ALLOCNO_LIVE, CLEAR_HARD_REG_BIT, FIRST_PSEUDO_REGISTER, fixed_regs, GET_MODE, hard_regno_nregs, hard_regs_live, last, reg_allocno, reg_renumber, and REGNO.
| static void mark_reg_live_nc | ( | int | regno, | |
| enum machine_mode | mode | |||
| ) | [static] |
Definition at line 1603 of file global.c.
References hard_regno_nregs, hard_regs_live, last, and SET_HARD_REG_BIT.
Definition at line 1471 of file global.c.
References FIRST_PSEUDO_REGISTER, fixed_regs, GET_CODE, GET_MODE, hard_regno_nregs, hard_regs_live, last, n_regs_set, record_one_conflict(), reg_allocno, REG_P, reg_renumber, REGNO, regs_set, SET_ALLOCNO_LIVE, SET_HARD_REG_BIT, set_preference(), SET_SRC, and SUBREG_REG.
Definition at line 2195 of file global.c.
References bb_info::avloc, BB_INFO, bitmap_bit_p(), bitmap_set_bit(), bb_info::earlyclobber, earlyclobber_regclass, FIRST_PSEUDO_REGISTER, GET_CODE, i, bb_info::killed, NO_REGS, REG, reg_alternate_class(), reg_classes_intersect_p(), reg_preferred_class(), REGNO, VARRAY_ACTIVE_SIZE, and VARRAY_INT.
Referenced by mark_reg_use_for_earlyclobber_1().
Definition at line 2229 of file global.c.
References for_each_rtx(), and mark_reg_use_for_earlyclobber().
Referenced by calculate_local_reg_bb_info().
Definition at line 2370 of file global.c.
References AND_HARD_REG_SET, BB_INFO, BITMAP_ALLOC, BITMAP_FREE, bitmap_ior_into(), bitmap_set_bit(), CLEAR_HARD_REG_SET, COPY_HARD_REG_SET, bb_info::earlyclobber, FIRST_PSEUDO_REGISTER, FIRST_STACK_REG, FOR_EACH_BB, GO_IF_HARD_REG_EQUAL, HARD_REG_SET, i, IOR_HARD_REG_SET, LAST_STACK_REG, bb_info::live_pavin, max_regno, NULL, reg_alternate_class(), reg_class_contents, reg_preferred_class(), SET_HARD_REG_BIT, skip, and zero.
Referenced by make_accurate_live_analysis().
Definition at line 946 of file global.c.
References allocno_order, allocno_row_words, AND_COMPL_HARD_REG_SET, call_used_reg_set, CLEAR_HARD_REG_SET, conflicts, COPY_HARD_REG_SET, EXECUTE_IF_SET_IN_ALLOCNO_SET, fixed_reg_set, free(), HARD_REG_SET, i, IOR_COMPL_HARD_REG_SET, IOR_HARD_REG_SET, max_allocno, reg_class_contents, reg_preferred_class(), size, and xmalloc().
| static void record_conflicts | ( | int * | allocno_vec, | |
| int | len | |||
| ) | [static] |
| static void record_one_conflict | ( | int | regno | ) | [static] |
Definition at line 1382 of file global.c.
References allocno_row_words, allocnos_live, conflicts, EXECUTE_IF_SET_IN_ALLOCNO_SET, FIRST_PSEUDO_REGISTER, hard_regs_live, IOR_HARD_REG_SET, reg_allocno, and SET_HARD_REG_BIT.
Definition at line 1752 of file global.c.
References FIRST_PSEUDO_REGISTER, fixed_regs, GET_CODE, GET_MODE, hard_regno_nregs, live_relevant_regs, nregs, REG_P, reg_renumber, REGNO, SET_REGNO_REG_SET, and SUBREG_REG.
| static void reg_dies | ( | int | regno, | |
| enum machine_mode | mode, | |||
| struct insn_chain * | chain | |||
| ) | [static] |
Definition at line 1783 of file global.c.
References CLEAR_REGNO_REG_SET, FIRST_PSEUDO_REGISTER, fixed_regs, hard_regno_nregs, live_relevant_regs, nregs, reg_renumber, and SET_REGNO_REG_SET.
| void retry_global_alloc | ( | int | regno, | |
| HARD_REG_SET | forbidden_regs | |||
| ) |
Definition at line 1351 of file global.c.
References find_reg(), mark_home_live(), N_REG_CLASSES, NO_REGS, reg_allocno, reg_alternate_class(), reg_renumber, REGNO, and regno_reg_rtx.
Definition at line 1623 of file global.c.
References copy, FIRST_PSEUDO_REGISTER, GET_CODE, GET_MODE, GET_RTX_FORMAT, hard_regno_nregs, i, offset, reg_allocno, REG_P, reg_renumber, REGMODE_NATURAL_SIZE, REGNO, SET_REGBIT, SUBREG_BYTE, SUBREG_REG, subreg_regno_offset(), and XEXP.
Definition at line 2261 of file global.c.
References BB_INFO_BY_INDEX, flow_reverse_top_sort_order_compute(), free(), i, n_basic_blocks, and xmalloc().
Referenced by make_accurate_live_analysis().
int* allocno_order [static] |
int allocno_row_words [static] |
INT_TYPE* allocnos_live [static] |
varray_type earlyclobber_regclass [static] |
Definition at line 2108 of file global.c.
Referenced by calculate_local_reg_bb_info(), check_earlyclobber(), df_urec_local_compute(), df_urec_mark_reg_use_for_earlyclobber(), mark_reg_use_for_earlyclobber(), and VEC().
HARD_REG_SET eliminable_regset [static] |
HARD_REG_SET hard_regs_live [static] |
regset live_relevant_regs [static] |
int local_reg_freq[FIRST_PSEUDO_REGISTER] [static] |
int local_reg_live_length[FIRST_PSEUDO_REGISTER] [static] |
int local_reg_n_refs[FIRST_PSEUDO_REGISTER] [static] |
int max_allocno [static] |
int n_regs_set [static] |
HARD_REG_SET no_global_alloc_regs [static] |
int* reg_allocno [static] |
int* reg_may_share [static] |
HARD_REG_SET regs_used_so_far [static] |
bitmap temp_bitmap [static] |
Definition at line 2284 of file global.c.
Referenced by calculate_reg_pav(), compute_earliest(), and compute_farthest().
1.5.6