GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "predict.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "ira.h"
#include "ira-int.h"
#include "sparseset.h"
#include "function-abi.h"
#include "except.h"
Variables | |
int | ira_max_point |
live_range_t * | ira_start_point_ranges |
live_range_t * | ira_finish_point_ranges |
static int | curr_point |
static int | high_pressure_start_point [N_REG_CLASSES] |
static sparseset | objects_live |
static sparseset | allocnos_processed |
static HARD_REG_SET | hard_regs_live |
static ira_loop_tree_node_t | curr_bb_node |
static int | last_call_num |
static int * | allocno_saved_at_call |
static alternative_mask | preferred_alternatives |
static rtx | ignore_reg_for_conflicts |
static int | curr_reg_pressure [N_REG_CLASSES] |
|
static |
Add conflicts for object OBJ from REGION landing pads using CALLEE_ABI.
References a, ALLOCNO_MODE, ALLOCNO_REGNO, bitmap_bit_p, BLOCK_FOR_INSN(), df_get_live_in(), ERT_CLEANUP, eh_region_d::landing_pads, function_abi::mode_clobbers(), eh_landing_pad_d::next_lp, NULL, OBJECT_ALLOCNO, OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS, and eh_region_d::type.
Referenced by process_bb_node_lives().
|
static |
Check and make if necessary conflicts for definition DEF of class DEF_CL of the current insn with input operands. Process only constraints of alternative ALT. One of three things is true when this function is called: (1) DEF is an earlyclobber for alternative ALT. Input operands then conflict with DEF in ALT unless they explicitly match DEF via 0-9 constraints. (2) DEF matches (via 0-9 constraints) an operand that is an earlyclobber for alternative ALT. Other input operands then conflict with DEF in ALT. (3) [FOR_TIE_P] Some input operand X matches DEF for alternative ALT. Input operands with a different value from X then conflict with DEF in ALT. However, there's still a judgement call to make when deciding whether a conflict in ALT is important enough to be reflected in the pan-alternative allocno conflict set.
References a, ALLOCNO_CLASS, alternative_class(), check_and_make_def_use_conflict(), operand_alternative::cl, recog_data_d::constraints, gcc_checking_assert, GET_CODE, ira_curr_regno_allocno_map, operand_alternative::matched, operand_alternative::matches, recog_data_d::n_alternatives, n_operands, recog_data_d::n_operands, OP_OUT, recog_data_d::operand, recog_data_d::operand_type, preferred_alternatives, recog_data, recog_op_alt, reg_classes_intersect_p(), REG_P, REGNO, rtx_equal_p(), SUBREG_REG, targetm, and TEST_BIT.
Referenced by make_early_clobber_and_input_conflicts().
|
static |
Check and make if necessary conflicts for pseudo DREG of class DEF_CL of the current insn with input operand USE of class USE_CL. ORIG_DREG is the rtx actually accessed, it may be identical to DREG or a subreg of it. Advance the current program point before making the conflict if ADVANCE_P. Return TRUE if we will need to advance the current program point.
References recog_data_d::constraints, make_pseudo_conflict(), recog_data_d::n_operands, recog_data_d::operand, recog_data, and reg_classes_intersect_p().
Referenced by check_and_make_def_conflict().
|
static |
Create and set up IRA_START_POINT_RANGES and IRA_FINISH_POINT_RANGES.
References live_range::finish_next, FOR_EACH_OBJECT, ira_allocate(), ira_finish_point_ranges, ira_max_point, ira_start_point_ranges, NULL, OBJECT_LIVE_RANGES, and r.
Referenced by ira_create_allocno_live_ranges(), and ira_rebuild_start_finish_chains().
DEBUG_FUNCTION void debug | ( | live_range & | ref | ) |
References ira_print_live_range_list().
DEBUG_FUNCTION void debug | ( | live_range * | ptr | ) |
References debug.
|
static |
Record that register pressure for PCLASS has decreased by NREGS registers; update current register pressure, start point of the register pressure excess, and register pressure excess length for living allocnos.
References curr_reg_pressure, EXECUTE_IF_SET_IN_SPARSESET, high_pressure_start_point, i, ira_assert, ira_class_hard_regs_num, ira_object_id_map, ira_reg_class_super_classes, ira_reg_pressure_class_p, objects_live, and update_allocno_pressure_excess_length().
Referenced by mark_hard_reg_dead(), mark_pseudo_regno_dead(), and mark_pseudo_regno_subword_dead().
Look through the CALL_INSN_FUNCTION_USAGE of a call insn INSN, and see if we find a SET rtx that we can use to deduce that a register can be cheaply caller-saved. Return such a register, or NULL_RTX if none is found.
References BLOCK_FOR_INSN(), CALL_INSN_FUNCTION_USAGE, exp(), GET_CODE, HARD_REGISTER_P, INSN_P, modified_between_p(), NONDEBUG_INSN_P, NULL, NULL_RTX, PREV_INSN(), pseudo_regno_single_word_and_live_p(), REG_P, reg_set_p(), REGNO, rtx_equal_p(), SET, SET_DEST, SET_SRC, single_set(), and XEXP.
Referenced by process_bb_node_lives().
|
static |
Record that register pressure for PCLASS increased by N registers. Update the current register pressure, maximal register pressure for the current BB and the start point of the register pressure excess.
References curr_bb_node, curr_point, curr_reg_pressure, high_pressure_start_point, i, ira_class_hard_regs_num, ira_reg_class_super_classes, ira_reg_pressure_class_p, and ira_loop_tree_node::reg_pressure.
Referenced by mark_hard_reg_live(), mark_pseudo_regno_live(), and mark_pseudo_regno_subword_live().
void ira_compress_allocno_live_ranges | ( | void | ) |
Compress allocno live ranges.
References internal_flag_ira_verbose, ira_dump_file, ira_rebuild_start_finish_chains(), NULL, print_live_ranges(), and remove_some_program_points_and_update_live_ranges().
Referenced by ira_build(), and ira_flattening().
void ira_create_allocno_live_ranges | ( | void | ) |
The main entry function creates live ranges, set up CONFLICT_HARD_REGS and TOTAL_CONFLICT_HARD_REGS for objects, and calculate register pressure info.
References allocno_saved_at_call, allocnos_processed, create_start_finish_chains(), curr_point, internal_flag_ira_verbose, ira_allocate(), ira_allocnos_num, ira_dump_file, ira_free(), ira_loop_tree_root, ira_max_point, ira_objects_num, ira_traverse_loop_tree(), last_call_num, NULL, objects_live, print_live_ranges(), process_bb_node_lives(), sparseset_alloc(), and sparseset_free.
Referenced by ira_build().
void ira_debug_allocno_live_ranges | ( | ira_allocno_t | a | ) |
Print live ranges of allocno A to stderr.
References a, and print_allocno_live_ranges().
void ira_debug_live_range_list | ( | live_range_t | r | ) |
Print live ranges R to stderr.
References ira_print_live_range_list(), and r.
void ira_debug_live_ranges | ( | void | ) |
Print live ranges of all allocnos to stderr.
References print_live_ranges().
void ira_finish_allocno_live_ranges | ( | void | ) |
Free arrays IRA_START_POINT_RANGES and IRA_FINISH_POINT_RANGES.
References ira_finish_point_ranges, ira_free(), and ira_start_point_ranges.
Referenced by ira_destroy().
void ira_implicitly_set_insn_hard_regs | ( | HARD_REG_SET * | set, |
alternative_mask | preferred ) |
The function sets up hard register set *SET to hard registers which might be used by insn reloads because the constraints are too strict.
References add_to_hard_reg_set(), CLEAR_HARD_REG_SET, recog_data_d::constraints, GET_CODE, GET_MODE, i, ira_class_singleton, recog_data_d::n_operands, recog_data_d::operand, PSEUDO_REGNO_MODE, recog_data, REG_P, REGNO, and SUBREG_REG.
void ira_print_live_range_list | ( | FILE * | f, |
live_range_t | r ) |
Print live ranges R to file F.
Referenced by copy_allocno_live_ranges(), debug(), ira_debug_live_range_list(), move_allocno_live_ranges(), and print_object_live_ranges().
void ira_rebuild_start_finish_chains | ( | void | ) |
Rebuild IRA_START_POINT_RANGES and IRA_FINISH_POINT_RANGES after new live ranges and program points were added as a result if new insn generation.
References create_start_finish_chains(), ira_finish_point_ranges, ira_free(), and ira_start_point_ranges.
Referenced by ira_compress_allocno_live_ranges(), ira_flattening(), remove_low_level_allocnos(), and remove_unnecessary_allocnos().
|
static |
Make conflicts of early clobber pseudo registers of the current insn with its inputs. Avoid introducing unnecessary conflicts by checking classes of the constraints and pseudos because otherwise significant code degradation is possible for some targets. For these purposes, tying an input to an output makes that output act like an earlyclobber for inputs with a different value, since the output register then has a predetermined purpose on input to the instruction.
References check_and_make_def_conflict(), operand_alternative::cl, n_alternatives(), recog_data_d::n_alternatives, n_operands, recog_data_d::n_operands, preferred_alternatives, recog_data, recog_op_alt, targetm, and TEST_BIT.
Referenced by process_bb_node_lives().
|
static |
Process the definition of hard register REGNO. This updates hard_regs_live and hard reg conflict information for living allocnos.
References ALLOCNO_REGNO, CLEAR_HARD_REG_BIT, EXECUTE_IF_SET_IN_SPARSESET, hard_regs_live, i, ignore_reg_for_conflicts, ira_object_id_map, NULL_RTX, OBJECT_ALLOCNO, OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS, objects_live, REGNO, and SET_HARD_REG_BIT.
Referenced by mark_hard_reg_dead().
|
static |
Record hard register REGNO as now being live.
References hard_regs_live, and SET_HARD_REG_BIT.
Referenced by mark_hard_reg_live(), and process_bb_node_lives().
|
static |
Process the definition of object OBJ, which is associated with allocno A. This finishes the current live range for it.
References CLEAR_HARD_REG_BIT, curr_point, END_REGNO(), live_range::finish, hard_regs_live, ignore_reg_for_conflicts, ira_assert, NULL, NULL_RTX, OBJECT_CONFLICT_HARD_REGS, OBJECT_CONFLICT_ID, OBJECT_LIVE_RANGES, OBJECT_TOTAL_CONFLICT_HARD_REGS, objects_live, REGNO, sparseset_clear_bit(), TEST_HARD_REG_BIT, and update_allocno_pressure_excess_length().
Referenced by mark_pseudo_regno_dead(), mark_pseudo_regno_subword_dead(), and process_bb_node_lives().
|
static |
Record object OBJ as now being live. Set a bit for it in objects_live, and start a new live range for it if necessary.
References curr_point, live_range::finish, ira_add_live_range_to_object(), NULL, OBJECT_CONFLICT_ID, OBJECT_LIVE_RANGES, objects_live, and sparseset_set_bit().
Referenced by mark_pseudo_regno_live(), and mark_pseudo_regno_subword_live().
|
static |
If REG is a pseudo or a subreg of it, and the class of its allocno intersects CL, make a conflict with pseudo DREG. ORIG_DREG is the rtx actually accessed, it may be identical to DREG or a subreg of it. Advance the current program point before making the conflict if ADVANCE_P. Return TRUE if we will need to advance the current program point.
References a, ALLOCNO_CLASS, curr_point, GET_CODE, ira_curr_regno_allocno_map, mark_pseudo_reg_dead(), mark_pseudo_reg_live(), reg_classes_intersect_p(), REG_P, REGNO, and SUBREG_REG.
Referenced by check_and_make_def_use_conflict().
|
static |
Process the definition of hard register REG. This updates hard_regs_live and hard reg conflict information for living allocnos.
References dec_register_pressure(), END_REGNO(), hard_regs_live, ira_hard_regno_allocno_class, ira_no_alloc_regs, ira_pressure_class_translate, last, make_hard_regno_dead(), REGNO, and TEST_HARD_REG_BIT.
Referenced by mark_ref_dead().
Mark early clobber hard registers of the current INSN as live (if LIVE_P) or dead. Return true if there are such registers.
References DF_REF_FLAGS_IS_SET, DF_REF_MUST_CLOBBER, DF_REF_REG, FOR_EACH_INSN_DEF, GET_CODE, mark_ref_dead(), mark_ref_live(), REG_P, REGNO, and SUBREG_REG.
Referenced by process_bb_node_lives().
|
static |
Mark the register REG as live. Store a 1 in hard_regs_live for this register, record how many consecutive hardware registers it actually needs.
References eliminable_regset, END_REGNO(), hard_regs_live, inc_register_pressure(), ira_hard_regno_allocno_class, ira_no_alloc_regs, ira_pressure_class_translate, last, make_hard_regno_live(), REGNO, and TEST_HARD_REG_BIT.
Referenced by mark_ref_live().
|
static |
Mark a pseudo, or one of its subwords, as dead. REGNO is the pseudo's register number; ORIG_REG is the access in the insn, which may be a subreg.
References mark_pseudo_regno_dead(), mark_pseudo_regno_subword_dead(), read_modify_subreg_p(), and subreg_lowpart_p().
Referenced by make_pseudo_conflict(), and mark_ref_dead().
|
static |
Mark a pseudo, or one of its subwords, as live. REGNO is the pseudo's register number; ORIG_REG is the access in the insn, which may be a subreg.
References mark_pseudo_regno_live(), mark_pseudo_regno_subword_live(), read_modify_subreg_p(), and subreg_lowpart_p().
Referenced by make_pseudo_conflict(), and mark_ref_live().
|
static |
Mark the pseudo register REGNO as dead. Update all information about live ranges and register pressure.
References a, ALLOCNO_CLASS, ALLOCNO_MODE, ALLOCNO_NUM, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, allocno_saved_at_call, dec_register_pressure(), gcc_assert, i, ira_curr_regno_allocno_map, ira_pressure_class_translate, ira_reg_class_max_nregs, make_object_dead(), NULL, OBJECT_CONFLICT_ID, objects_live, and sparseset_bit_p().
Referenced by mark_pseudo_reg_dead().
|
static |
Mark the pseudo register REGNO as live. Update all information about live ranges and register pressure.
References a, ALLOCNO_CLASS, ALLOCNO_MODE, ALLOCNO_NUM, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, allocno_saved_at_call, gcc_assert, i, inc_register_pressure(), ira_curr_regno_allocno_map, ira_pressure_class_translate, ira_reg_class_max_nregs, make_object_live(), NULL, OBJECT_CONFLICT_ID, objects_live, and sparseset_bit_p().
Referenced by mark_pseudo_reg_live(), mark_pseudo_regno_subword_live(), and process_bb_node_lives().
|
static |
Like mark_pseudo_regno_dead, but called when we know that only part of the register dies. SUBWORD indicates which; a value of 0 indicates the low part.
References a, ALLOCNO_CLASS, ALLOCNO_MODE, ALLOCNO_NUM, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, allocno_saved_at_call, dec_register_pressure(), gcc_assert, ira_curr_regno_allocno_map, ira_pressure_class_translate, ira_reg_class_max_nregs, make_object_dead(), NULL, OBJECT_CONFLICT_ID, objects_live, and sparseset_bit_p().
Referenced by mark_pseudo_reg_dead().
|
static |
Like mark_pseudo_regno_live, but try to only mark one subword of the pseudo as live. SUBWORD indicates which; a value of 0 indicates the low part.
References a, ALLOCNO_CLASS, ALLOCNO_MODE, ALLOCNO_NUM, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, allocno_saved_at_call, gcc_assert, inc_register_pressure(), ira_curr_regno_allocno_map, ira_pressure_class_translate, ira_reg_class_max_nregs, make_object_live(), mark_pseudo_regno_live(), NULL, OBJECT_CONFLICT_ID, objects_live, and sparseset_bit_p().
Referenced by mark_pseudo_reg_live().
|
static |
Mark the register referenced by definition DEF as dead, if the definition is a total one.
References DF_REF_CONDITIONAL, DF_REF_FLAGS_IS_SET, DF_REF_PARTIAL, DF_REF_REG, GET_CODE, mark_hard_reg_dead(), mark_pseudo_reg_dead(), read_modify_subreg_p(), REGNO, and SUBREG_REG.
Referenced by mark_hard_reg_early_clobbers(), and process_bb_node_lives().
|
static |
Mark the register referenced by use or def REF as live.
References DF_REF_REG, GET_CODE, mark_hard_reg_live(), mark_pseudo_reg_live(), REGNO, and SUBREG_REG.
Referenced by mark_hard_reg_early_clobbers(), and process_bb_node_lives().
Determine whether INSN is a register to register copy of the type where we do not need to make the source and destiniation registers conflict. If this is a copy instruction, then return the source reg. Otherwise, return NULL_RTX.
References GET_MODE, HARD_REGISTER_NUM_P, hard_regno_nregs(), NULL_RTX, REG_P, REGNO, SET_DEST, SET_SRC, side_effects_p(), single_set(), and targetm.
Referenced by process_bb_lives(), and process_bb_node_lives().
|
static |
Print live ranges of allocno A to file F.
References a, ALLOCNO_NUM, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, ALLOCNO_REGNO, i, and print_object_live_ranges().
Referenced by ira_debug_allocno_live_ranges(), and print_live_ranges().
|
static |
Print live ranges of all allocnos to file F.
References a, FOR_EACH_ALLOCNO, and print_allocno_live_ranges().
Referenced by ira_compress_allocno_live_ranges(), ira_create_allocno_live_ranges(), and ira_debug_live_ranges().
|
static |
Print live ranges of object OBJ to file F.
References ira_print_live_range_list(), and OBJECT_LIVE_RANGES.
Referenced by print_allocno_live_ranges().
|
static |
Process insns of the basic block given by its LOOP_TREE_NODE to update allocno live ranges, allocno hard register conflicts, intersected calls, and register pressure info for allocnos for the basic block for and regions containing the basic block.
References a, add_conflict_from_region_landing_pads(), add_reg_note(), ALLOCNO_CALL_FREQ, ALLOCNO_CALLS_CROSSED_NUM, ALLOCNO_CHEAP_CALLS_CROSSED_NUM, ALLOCNO_CROSSED_CALLS_ABIS, ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS, ALLOCNO_NUM, ALLOCNO_REGNO, allocno_saved_at_call, allocnos_processed, ira_loop_tree_node::bb, bb_has_abnormal_pred(), bb_has_eh_pred(), CALL_P, can_throw_internal(), cfun, curr_bb_node, curr_point, curr_reg_pressure, df_get_live_out(), DF_REF_FLAGS_IS_SET, DF_REF_MAY_CLOBBER, DF_REF_REG, eh_edge_abi, EH_RETURN_DATA_REGNO, eliminable_regset, EXECUTE_IF_SET_IN_BITMAP, EXECUTE_IF_SET_IN_SPARSESET, find_call_crossed_cheap_reg(), find_reg_note(), FOR_BB_INSNS_REVERSE, FOR_EACH_INSN_DEF, FOR_EACH_INSN_USE, function_abi::full_and_partial_reg_clobbers(), GET_CODE, get_eh_region_from_rtx(), hard_regs_live, has_abnormal_call_or_eh_pred_edge_p(), high_pressure_start_point, i, function_abi::id(), ignore_reg_for_conflicts, insn_callee_abi(), INSN_UID(), internal_flag_ira_verbose, INVALID_REGNUM, ira_allocno_class_translate, ira_assert, ira_class_hard_regs_num, ira_dump_file, ira_loop_tree_root, ira_no_alloc_regs, ira_object_id_map, ira_pressure_class_translate, ira_pressure_classes, ira_pressure_classes_num, ira_reg_class_super_classes, ira_reg_pressure_class_p, ira_setup_alts(), last_call_num, ira_loop_tree_node::loop_num, make_early_clobber_and_input_conflicts(), make_hard_regno_live(), make_object_dead(), mark_hard_reg_early_clobbers(), mark_pseudo_regno_live(), mark_ref_dead(), mark_ref_live(), multiple_sets(), non_conflicting_reg_copy_p(), NONDEBUG_INSN_P, NULL, NULL_RTX, OBJECT_ALLOCNO, OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS, objects_live, ira_loop_tree_node::parent, PATTERN(), pic_offset_table_rtx, preferred_alternatives, process_register_constraint_filters(), process_single_reg_class_operands(), r, REG_FREQ_FROM_BB, reg_overlap_mentioned_p(), REG_P, ira_loop_tree_node::reg_pressure, REG_SET_TO_HARD_REG_SET, REGNO, SET, SET_DEST, SET_HARD_REG_SET, sparseset_bit_p(), sparseset_clear(), sparseset_set_bit(), SUBREG_REG, targetm, TEST_HARD_REG_BIT, XVECEXP, and XVECLEN.
Referenced by ira_create_allocno_live_ranges().
|
static |
Go through the operands of the extracted insn looking for operand alternatives that apply a register filter. Record any such filters in the operand's allocno.
References a, ALLOCNO_CLASS, ALLOCNO_REGISTER_FILTERS, ALLOCNO_SET_REGISTER_FILTERS, alternative_class(), alternative_register_filters(), filters, HARD_REGISTER_P, ira_class_subset_p, ira_curr_regno_allocno_map, recog_data_d::n_alternatives, recog_data_d::n_operands, recog_data_d::operand, preferred_alternatives, recog_data, recog_op_alt, REG_P, REGNO, SUBREG_P, SUBREG_REG, and TEST_BIT.
Referenced by process_bb_node_lives().
|
static |
Processes input operands, if IN_P, or output operands otherwise of the current insn with FREQ to find allocno which can use only one hard register and makes other currently living allocnos conflicting with the hard register.
References a, ALLOCNO_CLASS, ALLOCNO_CONFLICT_HARD_REG_COSTS, ALLOCNO_MODE, EXECUTE_IF_SET_IN_SPARSESET, gcc_assert, GET_CODE, i, ira_allocate_and_set_costs(), ira_class_hard_reg_index, ira_class_singleton, ira_class_subset_p, ira_curr_regno_allocno_map, ira_init_register_move_cost_if_necessary(), ira_object_id_map, ira_register_move_cost, recog_data_d::n_operands, NULL, OBJECT_ALLOCNO, OBJECT_CONFLICT_HARD_REGS, OBJECT_TOTAL_CONFLICT_HARD_REGS, objects_live, offset, OP_IN, OP_INOUT, OP_OUT, recog_data_d::operand, recog_data_d::operand_mode, recog_data_d::operand_type, recog_data, reg_class_contents, REG_P, REGNO, simplify_subreg_regno(), single_reg_operand_class(), subreg_lowpart_offset(), and SUBREG_REG.
Referenced by process_bb_node_lives().
|
static |
Determine from the objects_live bitmap whether REGNO is currently live, and occupies only one object. Return false if we have no information.
References a, ALLOCNO_NUM_OBJECTS, ALLOCNO_OBJECT, ira_curr_regno_allocno_map, NULL, OBJECT_CONFLICT_ID, objects_live, and sparseset_bit_p().
Referenced by find_call_crossed_cheap_reg().
|
static |
Compress allocno live ranges by removing program points where nothing happens.
References bitmap_bit_p, bitmap_clear(), bitmap_ior(), bitmap_set_bit, EXECUTE_IF_SET_IN_BITMAP, FOR_EACH_OBJECT, i, internal_flag_ira_verbose, ira_allocate(), ira_assert, ira_dump_file, ira_finish_live_range(), ira_free(), ira_max_point, map, live_range::next, NULL, OBJECT_LIVE_RANGES, r, and live_range::start.
Referenced by ira_compress_allocno_live_ranges().
Checks that CONSTRAINTS permits to use only one hard register. If it is so, the function returns the class of the hard register. Otherwise it returns NO_REGS.
References CONSTANT_P, constraints, recog_data_d::constraints, end(), GET_MODE, ira_class_singleton, NULL_RTX, recog_data_d::operand, preferred_alternatives, recog_data, and single_reg_class().
Referenced by single_reg_class(), and single_reg_operand_class().
|
static |
The function checks that operand OP_NUM of the current insn can use only one hard register. If it is so, the function returns the class of the hard register. Otherwise it returns NO_REGS.
References recog_data_d::constraints, recog_data_d::n_alternatives, NULL_RTX, recog_data_d::operand, recog_data, and single_reg_class().
Referenced by process_single_reg_class_operands().
|
static |
Update ALLOCNO_EXCESS_PRESSURE_POINTS_NUM for the allocno associated with object OBJ.
References a, ALLOCNO_CLASS, ALLOCNO_EXCESS_PRESSURE_POINTS_NUM, curr_point, high_pressure_start_point, i, ira_assert, ira_pressure_class_translate, ira_reg_class_super_classes, ira_reg_pressure_class_p, NULL, OBJECT_ALLOCNO, OBJECT_LIVE_RANGES, and live_range::start.
Referenced by dec_register_pressure(), and make_object_dead().
|
static |
The number of last call at which given allocno was saved.
Referenced by ira_create_allocno_live_ranges(), mark_pseudo_regno_dead(), mark_pseudo_regno_live(), mark_pseudo_regno_subword_dead(), mark_pseudo_regno_subword_live(), and process_bb_node_lives().
|
static |
A temporary bitmap used in functions that wish to avoid visiting an allocno multiple times.
Referenced by ira_create_allocno_live_ranges(), and process_bb_node_lives().
|
static |
The loop tree node corresponding to the current basic block.
Referenced by inc_register_pressure(), and process_bb_node_lives().
|
static |
Number of the current program point.
Referenced by inc_register_pressure(), ira_create_allocno_live_ranges(), lra_create_live_ranges_1(), make_object_dead(), make_object_live(), make_pseudo_conflict(), process_bb_lives(), process_bb_node_lives(), and update_allocno_pressure_excess_length().
|
static |
The current register pressures for each pressure class for the current basic block.
Referenced by dec_register_pressure(), inc_register_pressure(), and process_bb_node_lives().
|
static |
Set of hard regs (except eliminable ones) currently live.
Referenced by add_range_and_copies_from_move_list(), make_hard_regno_dead(), make_hard_regno_live(), make_object_dead(), mark_hard_reg_dead(), mark_hard_reg_live(), and process_bb_node_lives().
|
static |
Point where register pressure excess started or -1 if there is no register pressure excess. Excess pressure for a register class at some point means that there are more allocnos of given register class living at the point than number of hard-registers of the class available for the allocation. It is defined only for pressure classes.
Referenced by dec_register_pressure(), inc_register_pressure(), process_bb_node_lives(), and update_allocno_pressure_excess_length().
|
static |
If non-NULL, the source operand of a register to register copy for which we should not add a conflict with the copy's destination operand.
Referenced by make_hard_regno_dead(), make_object_dead(), and process_bb_node_lives().
live_range_t * ira_finish_point_ranges |
int ira_max_point |
IRA processing allocno lives to build allocno live ranges. Copyright (C) 2006-2024 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmakarov@redhat.com>. 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/>.
The code in this file is similar to one in global but the code works on the allocno basis and creates live ranges instead of pseudo-register conflicts.
Program points are enumerated by numbers from range 0..IRA_MAX_POINT-1. There are approximately two times more program points than insns. Program points are places in the program where liveness info can be changed. In most general case (there are more complicated cases too) some program points correspond to places where input operand dies and other ones correspond to places where output operands are born.
Referenced by add_range_and_copies_from_move_list(), build_conflict_bit_table(), create_start_finish_chains(), fast_allocation(), ira(), ira_build(), ira_create_allocno_live_ranges(), ira_flattening(), remove_some_program_points_and_update_live_ranges(), setup_min_max_allocno_live_range_point(), and setup_min_max_conflict_allocno_ids().
live_range_t* ira_start_point_ranges |
Arrays of size IRA_MAX_POINT mapping a program point to the allocno live ranges with given start/finish point.
Referenced by build_conflict_bit_table(), create_start_finish_chains(), ira_finish_allocno_live_ranges(), ira_flattening(), and ira_rebuild_start_finish_chains().
|
static |
The number of the last processed call.
Referenced by ira_create_allocno_live_ranges(), and process_bb_node_lives().
|
static |
Objects live at current point in the scan.
Referenced by build_conflict_bit_table(), dec_register_pressure(), ira_create_allocno_live_ranges(), ira_flattening(), make_hard_regno_dead(), make_object_dead(), make_object_live(), mark_pseudo_regno_dead(), mark_pseudo_regno_live(), mark_pseudo_regno_subword_dead(), mark_pseudo_regno_subword_live(), process_bb_node_lives(), process_single_reg_class_operands(), and pseudo_regno_single_word_and_live_p().
|
static |
The value returned by ira_setup_alts for the current instruction; i.e. the set of alternatives that we should consider to be likely candidates during reloading.
Referenced by check_and_make_def_conflict(), make_early_clobber_and_input_conflicts(), process_bb_node_lives(), process_register_constraint_filters(), and single_reg_class().