GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | ira_loop_tree_node |
struct | live_range |
struct | ira_object |
struct | ira_allocno |
struct | ira_emit_data |
struct | ira_allocno_copy |
struct | ira_spilled_reg_stack_slot |
struct | minmax_set_iterator |
struct | target_ira_int |
struct | ira_allocno_iterator |
struct | ira_object_iterator |
struct | ira_allocno_object_iterator |
struct | ira_copy_iterator |
struct | ira_object_conflict_iterator |
Typedefs | |
typedef struct live_range * | live_range_t |
typedef struct ira_allocno * | ira_allocno_t |
typedef struct ira_allocno_copy * | ira_copy_t |
typedef struct ira_object * | ira_object_t |
typedef struct ira_loop_tree_node * | ira_loop_tree_node_t |
typedef unsigned short | move_table [N_REG_CLASSES] |
typedef struct ira_emit_data * | ira_emit_data_t |
typedef struct ira_allocno* ira_allocno_t |
typedef struct ira_allocno_copy* ira_copy_t |
typedef struct ira_emit_data* ira_emit_data_t |
Typedef for pointer to the subsequent structure.
typedef struct ira_loop_tree_node* ira_loop_tree_node_t |
Definition of vector of allocnos and copies.
Typedef for pointer to the subsequent structure.
typedef struct ira_object* ira_object_t |
typedef struct live_range* live_range_t |
Typedefs for pointers to allocno live range, allocno, and copy of allocnos.
typedef unsigned short move_table[N_REG_CLASSES] |
|
inlinestatic |
Abbreviation for frequent emit data access.
Referenced by add_range_and_copies_from_move_list(), change_loop(), change_regs(), copy_info_to_removed_store_destinations(), emit_move_list(), generate_edge_moves(), ira_flattening(), modify_move_list(), set_allocno_somewhere_renamed_p(), and store_can_be_removed_p().
void debug | ( | ira_allocno_copy & | ref | ) |
void debug | ( | ira_allocno_copy * | ptr | ) |
void debug | ( | ira_allocno & | ref | ) |
void debug | ( | ira_allocno * | ptr | ) |
void debug | ( | live_range & | ref | ) |
void debug | ( | live_range * | ptr | ) |
|
inlinestatic |
Return number of hard registers in hard register SET.
Referenced by create_new_allocno_hard_regs_node(), and setup_stack_reg_pressure_class().
void ior_hard_reg_conflicts | ( | ira_allocno_t | , |
HARD_REG_SET * | |||
) |
ira_copy_t ira_add_allocno_copy | ( | ira_allocno_t | first, |
ira_allocno_t | second, | ||
int | freq, | ||
bool | constraint_p, | ||
rtx | insn, | ||
ira_loop_tree_node_t | loop_tree_node | ||
) |
Create (or update frequency if the copy already exists) and return the copy of allocnos FIRST and SECOND with frequency FREQ corresponding to move insn INSN (if any) and originated from LOOP_TREE_NODE.
References find_allocno_copy(), ira_allocno_copy::freq, ira_add_allocno_copy_to_list(), ira_create_copy(), and ira_swap_allocno_copy_ends_if_necessary().
Referenced by add_range_and_copies_from_move_list(), process_regs_for_copy(), and propagate_copies().
void ira_add_allocno_copy_to_list | ( | ira_copy_t | ) |
void ira_add_live_range_to_object | ( | ira_object_t | , |
int | , | ||
int | |||
) |
void* ira_allocate | ( | size_t | ) |
ira.c:
Referenced by add_allocno_hard_regs(), add_to_conflicts(), allocate_conflict_bit_vec(), build_conflict_bit_table(), build_conflicts(), coalesce_allocnos(), coalesce_spill_slots(), color_pass(), compress_conflict_vecs(), create_loop_tree_nodes(), create_move(), create_new_allocno(), create_new_allocno_hard_regs_node(), create_start_finish_chains(), fast_allocation(), find_costs_and_classes(), form_allocno_hard_regs_nodes_forest(), init_costs(), init_loop_tree_node(), initiate_allocnos(), initiate_cost_update(), initiate_regno_cost_classes(), ira(), ira_allocate_conflict_vec(), ira_costs(), ira_create_allocno_live_ranges(), ira_emit(), ira_flattening(), ira_initiate_assign(), ira_initiate_emit_data(), ira_sort_regnos_for_alter_reg(), mark_loops_for_removal(), modify_move_list(), rebuild_regno_allocno_maps(), remove_some_program_points_and_update_live_ranges(), remove_unnecessary_allocnos(), setup_cost_classes(), and setup_min_max_conflict_allocno_ids().
|
inlinestatic |
Allocate cost vector *VEC for hard registers of ACLASS and add values of vector SRC into the vector if it is necessary
References ira_allocate_cost_vector(), len, and memset().
Referenced by propagate_allocno_info(), and propagate_some_info_from_allocno().
|
inlinestatic |
Allocate cost vector *VEC for hard registers of ACLASS and copy values of vector SRC into the vector if it is necessary
References ira_allocate_cost_vector(), len, and memcpy().
Referenced by assign_hard_reg(), create_cap_allocno(), and update_conflict_hard_regno_costs().
|
inlinestatic |
To save memory we use a lazy approach for allocation and initialization of the cost vectors. We do this only when it is really necessary.
Allocate cost vector *VEC for hard registers of ACLASS and initialize the elements by VAL if it is necessary
References ira_allocate_cost_vector(), and len.
Referenced by ira_tune_allocno_costs(), process_bb_node_for_hard_reg_moves(), process_regs_for_copy(), process_single_reg_class_operands(), and update_conflict_hard_reg_costs().
|
inlinestatic |
Allocate cost vector *VEC for hard registers of ACLASS and copy values of vector SRC into the vector or initialize it by VAL (if SRC is null).
References ira_allocate_cost_vector(), len, and memcpy().
Referenced by color_pass(), update_copy_costs(), and update_curr_costs().
bitmap ira_allocate_bitmap | ( | void | ) |
Allocate and returns bitmap for IRA.
References ira_bitmap_obstack.
Referenced by add_ranges_and_copies(), do_coloring(), init_loop_tree_node(), ira_emit(), ira_initiate_assign(), ira_reassign_conflict_allocnos(), and ira_sort_regnos_for_alter_reg().
void ira_allocate_conflict_vec | ( | ira_object_t | , |
int | |||
) |
int* ira_allocate_cost_vector | ( | reg_class_t | ) |
void ira_allocate_object_conflicts | ( | ira_object_t | , |
int | |||
) |
|
inlinestatic |
Return TRUE if we have more allocnos to visit, in which case *A is set to the allocno to be visited. Otherwise, return FALSE.
References ira_allocno_iterator::n.
|
inlinestatic |
Initialize the iterator I.
References ira_allocno_iterator::n.
|
inlinestatic |
Return TRUE if we have more objects to visit in allocno A, in which case *O is set to the object to be visited. Otherwise, return FALSE.
References ira_allocno_object_iterator::n.
|
inlinestatic |
Initialize the iterator I.
References ira_allocno_object_iterator::n.
bool ira_build | ( | void | ) |
Create a internal representation (IR) for IRA (allocnos, copies, loop tree nodes). The function returns TRUE if we generate loop structure (besides nodes representing all function and the basic blocks) for regional allocation. A true return means that we really need to flatten IR before the reload.
References cfun, create_allocno_objects(), create_allocnos(), create_caps(), create_loop_tree_nodes(), df_analyze(), form_loop_tree(), initiate_allocnos(), initiate_copies(), initiate_cost_vectors(), internal_flag_ira_verbose, ior_hard_reg_conflicts(), ira_allocnos_num, ira_build_conflicts(), ira_compress_allocno_live_ranges(), ira_conflicts_p, ira_copies_num, ira_costs(), ira_create_allocno_live_ranges(), ira_dump_file, ira_max_point, ira_tune_allocno_costs(), more_one_region_p(), live_range::next, nr, number_of_loops(), print_copies(), propagate_allocno_info(), remove_unnecessary_regions(), setup_min_max_allocno_live_range_point(), setup_min_max_conflict_allocno_ids(), sort_conflict_id_map(), update_bad_spill_attribute(), and update_conflict_hard_reg_costs().
Referenced by ira().
void ira_build_conflicts | ( | void | ) |
Entry function which builds allocno conflicts and allocno copies and accumulate some allocno info on upper level regions.
References add_copies(), ira_object::allocno, base_reg_class(), build_conflict_bit_table(), build_conflicts(), conflicts, internal_flag_ira_verbose, ira_conflicts_p, ira_dump_file, ira_free(), ira_loop_tree_root, IRA_REGION_ALL, IRA_REGION_MIXED, ira_traverse_loop_tree(), print_conflicts(), propagate_copies(), reg_is_parm_p(), regno_reg_rtx, and targetm.
Referenced by ira_build().
void ira_color | ( | void | ) |
Entry function doing coloring.
References color(), fast_allocation(), and ira_conflicts_p.
Referenced by ira().
void ira_compress_allocno_live_ranges | ( | void | ) |
Compress allocno live ranges.
References internal_flag_ira_verbose, ira_dump_file, ira_rebuild_start_finish_chains(), print_live_ranges(), and remove_some_program_points_and_update_live_ranges().
Referenced by ira_build(), and ira_flattening().
bool ira_conflict_vector_profitable_p | ( | ira_object_t | , |
int | |||
) |
|
inlinestatic |
Return TRUE if we have more copies to visit, in which case *CP is set to the copy to be visited. Otherwise, return FALSE.
References ira_copy_iterator::n.
|
inlinestatic |
Initialize the iterator I.
References ira_copy_iterator::n.
live_range_t ira_copy_live_range_list | ( | live_range_t | ) |
void ira_costs | ( | void | ) |
Entry function which defines register class, memory and hard register costs for each allocno.
References allocno_p, calculate_elim_costs_all_insns(), cost_elements_num, find_costs_and_classes(), finish_costs(), finish_regno_cost_classes(), init_costs(), initiate_regno_cost_classes(), ira_allocate(), ira_allocnos_num, ira_dump_file, ira_free(), and setup_allocno_class_and_costs().
Referenced by ira_build().
ira_allocno_t ira_create_allocno | ( | int | regno, |
bool | cap_p, | ||
ira_loop_tree_node_t | loop_tree_node | ||
) |
Create and return the allocno corresponding to REGNO in LOOP_TREE_NODE. Add the allocno to the list of allocnos with the same regno if CAP_P is FALSE.
References ira_loop_tree_node::all_allocnos, bitmap_set_bit(), ira_allocnos_num, pool_alloc(), and ira_loop_tree_node::regno_allocno_map.
Referenced by create_bb_allocnos(), create_cap_allocno(), create_insn_allocnos(), create_loop_allocnos(), and create_new_allocno().
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, 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, memset(), print_live_ranges(), process_bb_node_lives(), and sparseset_alloc().
Referenced by ira_build().
void ira_create_allocno_objects | ( | ira_allocno_t | ) |
ira_copy_t ira_create_copy | ( | ira_allocno_t | first, |
ira_allocno_t | second, | ||
int | freq, | ||
bool | constraint_p, | ||
rtx | insn, | ||
ira_loop_tree_node_t | loop_tree_node | ||
) |
Create and return copy with given attributes LOOP_TREE_NODE, FIRST, SECOND, FREQ, CONSTRAINT_P, and INSN.
References ira_allocno_copy::constraint_p, first, ira_allocno_copy::first, ira_allocno_copy::freq, ira_allocno_copy::insn, ira_copies_num, ira_allocno_copy::loop_tree_node, ira_allocno_copy::num, pool_alloc(), and ira_allocno_copy::second.
Referenced by ira_add_allocno_copy().
live_range_t ira_create_live_range | ( | ira_object_t | obj, |
int | start, | ||
int | finish, | ||
live_range_t | next | ||
) |
Create and return a live range for OBJECT with given attributes.
References live_range::finish, loop::next, live_range::next, live_range::object, pool_alloc(), and live_range::start.
Referenced by ira_add_live_range_to_object().
void ira_debug_allocno_classes | ( | void | ) |
Output all possible allocno and translation classes and the translation maps into stderr.
References print_translated_classes(), and print_unform_and_important_classes().
void ira_debug_allocno_copies | ( | ira_allocno_t | ) |
void ira_debug_allocno_live_ranges | ( | ira_allocno_t | ) |
void ira_debug_conflicts | ( | bool | ) |
ira-conflicts.c
void ira_debug_copies | ( | void | ) |
Print info about all copies into stderr.
References print_copies().
void ira_debug_copy | ( | ira_copy_t | ) |
void ira_debug_disposition | ( | void | ) |
Outputs information about allocation of all allocnos into stderr.
References ira_print_disposition().
void ira_debug_hard_regs_forest | ( | void | ) |
void ira_debug_live_range_list | ( | live_range_t | ) |
void ira_debug_live_ranges | ( | void | ) |
Print live ranges of all allocnos to stderr.
References print_live_ranges().
void ira_destroy | ( | void | ) |
Release the data created by function ira_build.
References finish_allocnos(), finish_copies(), finish_cost_vectors(), finish_loop_tree_nodes(), and ira_finish_allocno_live_ranges().
Referenced by do_reload().
void ira_emit | ( | bool | ) |
|
inlinestatic |
Return true if equivalence of pseudo REGNO is not a lvalue.
References ira_reg_equiv_len.
Referenced by change_loop(), coalesce_allocnos(), coalesce_spill_slots(), color_pass(), ira_sort_regnos_for_alter_reg(), move_spill_restore(), and setup_reg_renumber().
void ira_finish_allocno_live_ranges | ( | void | ) |
Free arrays IRA_START_POINT_RANGES and IRA_FINISH_POINT_RANGES.
References ira_free().
Referenced by ira_destroy().
void ira_finish_assign | ( | void | ) |
Deallocate data used by assign_hard_reg.
References finish_cost_update(), ira_free(), and ira_free_bitmap().
Referenced by color(), and do_reload().
void ira_finish_costs_once | ( | void | ) |
Function called once at the end of compiler work.
References free_ira_costs().
Referenced by ira_finish_once().
void ira_finish_emit_data | ( | void | ) |
void ira_finish_live_range | ( | live_range_t | ) |
void ira_finish_live_range_list | ( | live_range_t | ) |
void ira_flattening | ( | int | , |
int | |||
) |
void ira_free | ( | void * | addr | ) |
Referenced by add_to_conflicts(), build_conflicts(), coalesce_allocnos(), coalesce_spill_slots(), color_pass(), compress_conflict_vecs(), do_reload(), fast_allocation(), find_costs_and_classes(), finish_allocno_hard_regs(), finish_allocno_hard_regs_nodes_forest(), finish_allocno_hard_regs_nodes_tree(), finish_allocnos(), finish_cost_update(), finish_costs(), finish_loop_tree_node(), finish_loop_tree_nodes(), finish_regno_cost_classes(), free_move(), ira_build_conflicts(), ira_costs(), ira_create_allocno_live_ranges(), ira_emit(), ira_finish_allocno_live_ranges(), ira_finish_assign(), ira_finish_emit_data(), ira_flattening(), ira_free_allocno_costs(), ira_rebuild_start_finish_chains(), ira_sort_regnos_for_alter_reg(), mark_loops_for_removal(), rebuild_regno_allocno_maps(), cost_classes_hasher::remove(), remove_some_program_points_and_update_live_ranges(), remove_unnecessary_allocnos(), remove_unused_allocno_hard_regs_nodes(), and setup_min_max_conflict_allocno_ids().
void ira_free_allocno_updated_costs | ( | ira_allocno_t | ) |
void ira_free_bitmap | ( | bitmap | ) |
void ira_free_cost_vector | ( | int * | , |
reg_class_t | |||
) |
|
inlinestatic |
The function returns TRUE if hard registers starting with HARD_REGNO and containing value of MODE are fully in set HARD_REGSET.
Referenced by calculate_allocation_cost(), and setup_allocno_assignment_flags().
|
inlinestatic |
The function returns TRUE if at least one hard register from ones starting with HARD_REGNO and containing value of MODE are in set HARD_REGSET.
Referenced by allocno_reload_assign(), assign_hard_reg(), fast_allocation(), ira_tune_allocno_costs(), and setup_reg_renumber().
void ira_init_costs | ( | void | ) |
This is called each time register related information is changed.
References costs::cost, free_ira_costs(), init_cost(), and costs::mem_cost.
Referenced by ira_init().
void ira_init_costs_once | ( | void | ) |
ira-costs.c
Function called once during compiler work.
References init_cost().
Referenced by ira_init_once().
void ira_init_register_move_cost | ( | enum | machine_mode | ) |
Referenced by ira_init_register_move_cost_if_necessary().
|
inlinestatic |
Initialize register costs for MODE if necessary.
References ira_init_register_move_cost().
Referenced by calculate_allocno_spill_cost(), color_pass(), copy_cost(), emit_move_list(), move_spill_restore(), process_bb_node_for_hard_reg_moves(), process_regs_for_copy(), process_single_reg_class_operands(), record_address_regs(), record_reg_classes(), setup_pressure_classes(), setup_uniform_class_p(), update_copy_costs(), and update_curr_costs().
void ira_initiate_assign | ( | void | ) |
Allocate and initialize data necessary for assign_hard_reg.
References initiate_cost_update(), ira_allocate(), ira_allocate_bitmap(), and ira_allocnos_num.
void ira_initiate_emit_data | ( | void | ) |
ira-emit.c
Allocate and initiate the emit data.
References ira_allocate(), ira_allocnos_num, and memset().
Referenced by ira().
bool ira_live_ranges_intersect_p | ( | live_range_t | , |
live_range_t | |||
) |
int ira_loop_edge_freq | ( | ira_loop_tree_node_t | , |
int | , | ||
bool | |||
) |
live_range_t ira_merge_live_ranges | ( | live_range_t | , |
live_range_t | |||
) |
|
inlinestatic |
Return TRUE if we have more conflicting allocnos to visit, in which case *A is set to the allocno to be visited. Otherwise, return FALSE.
References ira_object_conflict_iterator::base_conflict_id, ira_object_conflict_iterator::bit_num, ira_object_conflict_iterator::conflict_vec_p, ira_object_conflict_iterator::size, ira_object_conflict_iterator::vec, ira_object_conflict_iterator::word, and ira_object_conflict_iterator::word_num.
|
inlinestatic |
Initialize the iterator I with ALLOCNO conflicts.
References ira_object_conflict_iterator::base_conflict_id, ira_object_conflict_iterator::bit_num, ira_object_conflict_iterator::conflict_vec_p, ira_object_conflict_iterator::size, ira_object_conflict_iterator::vec, ira_object_conflict_iterator::word, and ira_object_conflict_iterator::word_num.
|
inlinestatic |
Return TRUE if we have more objects to visit, in which case *OBJ is set to the object to be visited. Otherwise, return FALSE.
References ira_object_iterator::n.
|
inlinestatic |
Initialize the iterator I.
References ira_object_iterator::n.
ira_allocno_t ira_parent_allocno | ( | ira_allocno_t | ) |
ira_allocno_t ira_parent_or_cap_allocno | ( | ira_allocno_t | ) |
void ira_print_disposition | ( | FILE * | ) |
Referenced by do_coloring(), fast_allocation(), and ira_debug_disposition().
void ira_print_expanded_allocno | ( | ira_allocno_t | ) |
void ira_print_live_range_list | ( | FILE * | , |
live_range_t | |||
) |
void ira_reassign_conflict_allocnos | ( | int | ) |
void ira_rebuild_start_finish_chains | ( | void | ) |
ira-lives.c
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(), and ira_free().
Referenced by ira_compress_allocno_live_ranges(), ira_flattening(), remove_low_level_allocnos(), and remove_unnecessary_allocnos().
void ira_set_allocno_class | ( | ira_allocno_t | , |
enum | reg_class | ||
) |
void ira_swap_allocno_copy_ends_if_necessary | ( | ira_copy_t | ) |
void ira_traverse_loop_tree | ( | bool | bb_p, |
ira_loop_tree_node_t | loop_node, | ||
void(*)(ira_loop_tree_node_t) | preorder_func, | ||
void(*)(ira_loop_tree_node_t) | postorder_func | ||
) |
This recursive function traverses loop tree with root LOOP_NODE calling non-null functions PREORDER_FUNC and POSTORDER_FUNC correspondingly in preorder and postorder. The function sets up IRA_CURR_LOOP_TREE_NODE and IRA_CURR_REGNO_ALLOCNO_MAP. If BB_P, basic block nodes of LOOP_NODE is also processed (before its subloop nodes). If BB_P is set and POSTORDER_FUNC is given, the basic blocks in the loop are passed in the *reverse* post-order of the *reverse* CFG. This is only used by ira_create_allocno_live_ranges, which wants to visit basic blocks in this order to minimize the number of elements per live range chain. Note that the loop tree nodes are still visited in the normal, forward post-order of the loop tree.
References ira_loop_tree_node::bb, ira_loop_tree_node::children, ira_loop_tree_body_rev_postorder(), ira_traverse_loop_tree(), ira_loop_tree_node::next, ira_loop_tree_node::regno_allocno_map, ira_loop_tree_node::subloop_next, ira_loop_tree_node::subloops, and vNULL.
Referenced by create_allocnos(), do_coloring(), find_costs_and_classes(), ira_build_conflicts(), ira_create_allocno_live_ranges(), ira_emit(), ira_traverse_loop_tree(), and setup_allocno_class_and_costs().
void ira_tune_allocno_costs | ( | void | ) |
Change hard register costs for allocnos which lives through function calls. This is called only when we found all intersected calls during building allocno live ranges.
References costs::cost, ira_allocate_and_set_costs(), and ira_hard_reg_set_intersection_p().
Referenced by ira_build().
|
inlinestatic |
Return TRUE if we have more allocnos to visit, in which case *N is set to the number of the element to be visited. Otherwise, return FALSE.
References minmax_set_iterator::bit_num, minmax_set_iterator::nel, minmax_set_iterator::start_val, minmax_set_iterator::vec, minmax_set_iterator::word, and minmax_set_iterator::word_num.
|
inlinestatic |
Initialize the iterator I for bit vector VEC containing minimal and maximal values MIN and MAX.
References minmax_set_iterator::bit_num, minmax_set_iterator::nel, minmax_set_iterator::start_val, minmax_set_iterator::vec, minmax_set_iterator::word, and minmax_set_iterator::word_num.
|
inlinestatic |
Advance to the next element in the set.
References minmax_set_iterator::bit_num, and minmax_set_iterator::word.
struct target_ira_int default_target_ira_int |
int first_moveable_pseudo |
Record the range of register numbers added by find_moveable_pseudos.
Referenced by find_costs_and_classes(), find_moveable_pseudos(), and move_unallocated_pseudos().
int internal_flag_ira_verbose |
A modified value of flag `-fira-verbose' used internally.
Referenced by add_range_and_copies_from_move_list(), allocno_reload_assign(), assign_hard_reg(), build_conflict_bit_table(), calculate_allocation_cost(), change_loop(), coalesce_allocnos(), coalesce_spill_slots(), color_allocnos(), color_pass(), copy_allocno_live_ranges(), create_cap_allocno(), do_coloring(), do_reload(), fast_allocation(), find_costs_and_classes(), generate_edge_moves(), improve_allocation(), ira(), ira_build(), ira_build_conflicts(), ira_compress_allocno_live_ranges(), ira_create_allocno_live_ranges(), ira_create_new_reg(), ira_flattening(), ira_mark_new_stack_slot(), ira_reassign_conflict_allocnos(), ira_reassign_pseudos(), ira_rebuild_regno_allocno_list(), ira_reuse_stack_slot(), ira_set_pseudo_classes(), ira_sort_regnos_for_alter_reg(), ira_update_equiv_info_by_shuffle_insn(), mark_all_loops_for_removal(), mark_loops_for_removal(), modify_move_list(), move_allocno_live_ranges(), move_spill_restore(), pop_allocnos_from_stack(), print_redundant_copies(), process_bb_node_lives(), push_allocno_to_stack(), remove_allocno_from_bucket_and_push(), remove_some_program_points_and_update_live_ranges(), setup_allocno_available_regs_num(), and setup_preferred_alternate_classes_for_new_pseudos().
int ira_additional_jumps_num |
Referenced by calculate_allocation_cost(), emit_moves(), and ira().
ira_emit_data_t ira_allocno_emit_data |
Data used to emit live range split insns and to flattening IR.
@verbatim Integrated Register Allocator. Changing code and generating moves.
Copyright (C) 2006-2013 Free Software Foundation, Inc. Contributed by Vladimir Makarov vmaka. rov@ redha t.co m
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/.
When we have more one region, we need to change the original RTL code after coloring. Let us consider two allocnos representing the same pseudo-register outside and inside a region respectively. They can get different hard-registers. The reload pass works on pseudo registers basis and there is no way to say the reload that pseudo could be in different registers and it is even more difficult to say in what places of the code the pseudo should have particular hard-registers. So in this case IRA has to create and use a new pseudo-register inside the region and adds code to move allocno values on the region's borders. This is done by the code in this file. The code makes top-down traversal of the regions and generate new pseudos and the move code on the region borders. In some complicated cases IRA can create a new pseudo used temporarily to move allocno values when a swap of values stored in two hard-registers is needed (e.g. two allocnos representing different pseudos outside region got respectively hard registers 1 and 2 and the corresponding allocnos inside the region got respectively hard registers 2 and 1). At this stage, the new pseudo is marked as spilled. IRA still creates the pseudo-register and the moves on the region borders even when the both corresponding allocnos were assigned to the same hard-register. It is done because, if the reload pass for some reason spills a pseudo-register representing the original pseudo outside or inside the region, the effect will be smaller because another pseudo will still be in the hard-register. In most cases, this is better then spilling the original pseudo in its whole live-range. If reload does not change the allocation for the two pseudo-registers, the trivial move will be removed by post-reload optimizations. IRA does not generate a new pseudo and moves for the allocno values if the both allocnos representing an original pseudo inside and outside region assigned to the same hard register when the register pressure in the region for the corresponding pressure class is less than number of available hard registers for given pressure class. IRA also does some optimizations to remove redundant moves which is transformed into stores by the reload pass on CFG edges representing exits from the region. IRA tries to reduce duplication of code generated on CFG edges which are enters and exits to/from regions by moving some code to the edge sources or destinations when it is possible.
Data used to emit live range split insns and to flattening IR.
ira_allocno_t* ira_allocnos |
Array of references to all allocnos. The order number of the allocno corresponds to the index in the array. Removed allocnos have NULL element value.
Referenced by change_loop(), coalesce_allocnos(), color_allocnos(), color_pass(), form_allocno_hard_regs_nodes_forest(), improve_allocation(), print_loop_title(), and setup_profitable_hard_regs().
int ira_allocnos_num |
The size of the previous array.
Sizes of the previous array.
Referenced by coalesce_spill_slots(), color(), fast_allocation(), find_costs_and_classes(), initiate_allocnos(), initiate_cost_update(), ira_build(), ira_costs(), ira_create_allocno(), ira_create_allocno_live_ranges(), ira_emit(), ira_initiate_assign(), ira_initiate_emit_data(), ira_sort_regnos_for_alter_reg(), and remove_unnecessary_allocnos().
ira_loop_tree_node_t ira_bb_nodes |
All nodes representing basic blocks are referred through the following array. We can not use basic block member `aux' for this because it is used for insertion of insns on edges.
ira_copy_t* ira_copies |
Array of references to all copies. The order number of the copy corresponds to the index in the array. Removed copies have NULL element value.
int ira_copies_num |
Size of the previous array.
Referenced by coalesce_allocnos(), initiate_copies(), ira_build(), and ira_create_copy().
ira_loop_tree_node_t ira_curr_loop_tree_node |
ira-build.c
The current loop tree node and its regno allocno map.
The current loop tree node and its regno allocno map.
Referenced by change_loop(), and process_regs_for_copy().
ira_allocno_t* ira_curr_regno_allocno_map |
Referenced by change_regs(), check_and_make_def_conflict(), make_pseudo_conflict(), mark_pseudo_regno_dead(), mark_pseudo_regno_live(), mark_pseudo_regno_subword_dead(), mark_pseudo_regno_subword_live(), process_bb_node_for_hard_reg_moves(), process_regs_for_copy(), process_single_reg_class_operands(), pseudo_regno_single_word_and_live_p(), record_address_regs(), and record_reg_classes().
FILE* ira_dump_file |
Dump file of the allocator if it is not NULL.
Referenced by add_range_and_copies_from_move_list(), allocno_reload_assign(), assign_hard_reg(), build_conflict_bit_table(), calculate_allocation_cost(), change_loop(), coalesce_allocnos(), coalesce_spill_slots(), color_allocnos(), color_pass(), copy_allocno_live_ranges(), create_cap_allocno(), do_coloring(), do_reload(), fast_allocation(), generate_edge_moves(), improve_allocation(), ira(), ira_build(), ira_build_conflicts(), ira_compress_allocno_live_ranges(), ira_costs(), ira_create_allocno_live_ranges(), ira_create_new_reg(), ira_flattening(), ira_mark_new_stack_slot(), ira_print_expanded_allocno(), ira_reassign_conflict_allocnos(), ira_reassign_pseudos(), ira_rebuild_regno_allocno_list(), ira_reuse_stack_slot(), ira_sort_regnos_for_alter_reg(), ira_update_equiv_info_by_shuffle_insn(), mark_all_loops_for_removal(), mark_loops_for_removal(), modify_move_list(), move_allocno_live_ranges(), move_spill_restore(), pop_allocnos_from_stack(), print_loop_title(), print_redundant_copies(), process_bb_node_lives(), push_allocno_to_stack(), remove_allocno_from_bucket_and_push(), remove_some_program_points_and_update_live_ranges(), setup_allocno_available_regs_num(), and setup_preferred_alternate_classes_for_new_pseudos().
live_range_t * ira_finish_point_ranges |
Referenced by build_conflict_bit_table(), and ira_flattening().
int ira_load_cost |
Referenced by calculate_allocation_cost(), emit_move_list(), and ira().
ira_loop_tree_node_t ira_loop_nodes |
All nodes representing loops are referred through the following array.
Referenced by setup_entered_from_non_parent_p().
int ira_loop_tree_height |
Height of the loop tree.
Referenced by form_loop_tree().
ira_loop_tree_node_t ira_loop_tree_root |
The root of the loop tree corresponding to the all function.
Referenced by change_loop(), conflict_by_live_ranges_p(), do_coloring(), find_costs_and_classes(), ira_build_conflicts(), ira_create_allocno_live_ranges(), ira_emit(), ira_flattening(), process_bb_node_lives(), propagate_copies(), remove_low_level_allocnos(), setup_allocno_class_and_costs(), and too_high_register_pressure_p().
int ira_max_point |
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.
@verbatim IRA processing allocno lives to build allocno live ranges.
Copyright (C) 2006-2013 Free Software Foundation, Inc. Contributed by Vladimir Makarov vmaka. rov@ redha t.co m
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().
int ira_mem_cost |
Referenced by calculate_allocation_cost(), and ira().
int ira_move_loops_num |
Referenced by calculate_allocation_cost(), ira(), and modify_move_list().
ira_object_t* ira_object_id_map |
Map a conflict id to its corresponding ira_object structure.
Map a conflict id to its conflict record.
Referenced by build_conflict_bit_table(), build_object_conflicts(), dec_register_pressure(), make_hard_regno_born(), process_bb_node_lives(), and process_single_reg_class_operands().
int ira_objects_num |
The size of the previous array.
Count of conflict record structures we've created, used when creating a new conflict id.
Referenced by build_conflict_bit_table(), build_conflicts(), compress_conflict_vecs(), initiate_allocnos(), ira_create_allocno_live_ranges(), ira_create_object(), ira_flattening(), modify_move_list(), setup_min_max_conflict_allocno_ids(), and sort_conflict_id_map().
int ira_overall_cost |
Correspondingly overall cost of the allocation, cost of the allocnos assigned to hard-registers, cost of the allocnos assigned to memory, cost of loads, stores and register move insns generated for pseudo-register live range splitting (see ira-emit.c).
Correspondingly overall cost of the allocation, overall cost before reload, cost of the allocnos assigned to hard-registers, cost of the allocnos assigned to memory, cost of loads, stores and register move insns generated for pseudo-register live range splitting (see ira-emit.c).
Referenced by allocno_reload_assign(), calculate_allocation_cost(), do_reload(), emit_move_list(), ira(), and ira_mark_allocation_change().
int ira_reg_cost |
Referenced by calculate_allocation_cost(), and ira().
ira_allocno_t* ira_regno_allocno_map |
Map regno -> allocnos with given regno (see comments for allocno member `next_regno_allocno').
Referenced by build_conflicts(), calculate_spill_cost(), coalesced_pseudo_reg_slot_compare(), collect_spilled_coalesced_allocnos(), find_costs_and_classes(), ira_bad_reload_regno_1(), ira_mark_allocation_change(), ira_mark_memory_move_deletion(), ira_mark_new_stack_slot(), ira_print_disposition(), ira_reassign_pseudos(), ira_reuse_stack_slot(), ira_sort_regnos_for_alter_reg(), set_allocno_reg(), and setup_coalesced_allocno_costs_and_nums().
int ira_shuffle_cost |
Referenced by calculate_allocation_cost(), emit_move_list(), and ira().
struct ira_spilled_reg_stack_slot* ira_spilled_reg_stack_slots |
The following array contains info about spilled pseudo-registers stack slots used in current function so far.
Referenced by ira_mark_new_stack_slot(), and ira_reuse_stack_slot().
int ira_spilled_reg_stack_slots_num |
The number of elements in the following array.
Referenced by ira(), ira_mark_new_stack_slot(), ira_reuse_stack_slot(), and ira_sort_regnos_for_alter_reg().
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(), and ira_flattening().
int ira_store_cost |
Referenced by calculate_allocation_cost(), emit_move_list(), and ira().
int last_moveable_pseudo |
Referenced by find_costs_and_classes(), find_moveable_pseudos(), and move_unallocated_pseudos().
struct target_ira_int* this_target_ira_int |