GCC Middle and Back End API Reference
ira-int.h File 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_rangelive_range_t
typedef struct ira_allocnoira_allocno_t
typedef struct ira_allocno_copyira_copy_t
typedef struct ira_objectira_object_t
typedef struct ira_loop_tree_nodeira_loop_tree_node_t
typedef unsigned short move_table [N_REG_CLASSES]
typedef struct ira_emit_dataira_emit_data_t

Functions

static rtx allocno_emit_reg ()
static void minmax_set_iter_init (minmax_set_iterator *i, IRA_INT_TYPE *vec, int min, int max)
static bool minmax_set_iter_cond ()
static void minmax_set_iter_next ()
void * ira_allocate (size_t)
void ira_free (void *addr)
bitmap ira_allocate_bitmap (void)
void ira_free_bitmap (bitmap)
void ira_print_disposition (FILE *)
void ira_debug_disposition (void)
void ira_debug_allocno_classes (void)
void ira_init_register_move_cost (enum machine_mode)
void ira_debug_copy (ira_copy_t)
void debug (ira_allocno_copy &ref)
void debug (ira_allocno_copy *ptr)
void ira_debug_copies (void)
void ira_debug_allocno_copies (ira_allocno_t)
void debug (ira_allocno &ref)
void debug (ira_allocno *ptr)
void ira_traverse_loop_tree (bool, ira_loop_tree_node_t, void(*)(ira_loop_tree_node_t), void(*)(ira_loop_tree_node_t))
ira_allocno_t ira_parent_allocno (ira_allocno_t)
ira_allocno_t ira_parent_or_cap_allocno (ira_allocno_t)
ira_allocno_t ira_create_allocno (int, bool, ira_loop_tree_node_t)
void ira_create_allocno_objects (ira_allocno_t)
void ira_set_allocno_class (ira_allocno_t, enum reg_class)
bool ira_conflict_vector_profitable_p (ira_object_t, int)
void ira_allocate_conflict_vec (ira_object_t, int)
void ira_allocate_object_conflicts (ira_object_t, int)
void ior_hard_reg_conflicts (ira_allocno_t, HARD_REG_SET *)
void ira_print_expanded_allocno (ira_allocno_t)
void ira_add_live_range_to_object (ira_object_t, int, int)
live_range_t ira_create_live_range (ira_object_t, int, int, live_range_t)
live_range_t ira_copy_live_range_list (live_range_t)
live_range_t ira_merge_live_ranges (live_range_t, live_range_t)
bool ira_live_ranges_intersect_p (live_range_t, live_range_t)
void ira_finish_live_range (live_range_t)
void ira_finish_live_range_list (live_range_t)
void ira_free_allocno_updated_costs (ira_allocno_t)
ira_copy_t ira_create_copy (ira_allocno_t, ira_allocno_t, int, bool, rtx, ira_loop_tree_node_t)
void ira_add_allocno_copy_to_list (ira_copy_t)
void ira_swap_allocno_copy_ends_if_necessary (ira_copy_t)
ira_copy_t ira_add_allocno_copy (ira_allocno_t, ira_allocno_t, int, bool, rtx, ira_loop_tree_node_t)
int * ira_allocate_cost_vector (reg_class_t)
void ira_free_cost_vector (int *, reg_class_t)
void ira_flattening (int, int)
bool ira_build (void)
void ira_destroy (void)
void ira_init_costs_once (void)
void ira_init_costs (void)
void ira_finish_costs_once (void)
void ira_costs (void)
void ira_tune_allocno_costs (void)
void ira_rebuild_start_finish_chains (void)
void ira_print_live_range_list (FILE *, live_range_t)
void debug (live_range &ref)
void debug (live_range *ptr)
void ira_debug_live_range_list (live_range_t)
void ira_debug_allocno_live_ranges (ira_allocno_t)
void ira_debug_live_ranges (void)
void ira_create_allocno_live_ranges (void)
void ira_compress_allocno_live_ranges (void)
void ira_finish_allocno_live_ranges (void)
void ira_debug_conflicts (bool)
void ira_build_conflicts (void)
void ira_debug_hard_regs_forest (void)
int ira_loop_edge_freq (ira_loop_tree_node_t, int, bool)
void ira_reassign_conflict_allocnos (int)
void ira_initiate_assign (void)
void ira_finish_assign (void)
void ira_color (void)
void ira_initiate_emit_data (void)
void ira_finish_emit_data (void)
void ira_emit (bool)
static bool ira_equiv_no_lvalue_p ()
static void ira_init_register_move_cost_if_necessary ()
static void ira_allocno_iter_init ()
static bool ira_allocno_iter_cond ()
static void ira_object_iter_init ()
static bool ira_object_iter_cond ()
static void ira_allocno_object_iter_init ()
static bool ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a, ira_object_t *o)
static void ira_copy_iter_init ()
static bool ira_copy_iter_cond ()
static void ira_object_conflict_iter_init (ira_object_conflict_iterator *i, ira_object_t obj)
static bool ira_object_conflict_iter_cond (ira_object_conflict_iterator *i, ira_object_t *pobj)
static bool ira_hard_reg_set_intersection_p (int hard_regno, enum machine_mode mode, HARD_REG_SET hard_regset)
static int hard_reg_set_size ()
static bool ira_hard_reg_in_set_p (int hard_regno, enum machine_mode mode, HARD_REG_SET hard_regset)
static void ira_allocate_and_set_costs ()
static void ira_allocate_and_copy_costs ()
static void ira_allocate_and_accumulate_costs ()
static void ira_allocate_and_set_or_copy_costs (int **vec, enum reg_class aclass, int val, int *src)
rtx ira_create_new_reg (rtx)

Variables

int internal_flag_ira_verbose
FILE * ira_dump_file
ira_loop_tree_node_t ira_loop_tree_root
int ira_loop_tree_height
ira_loop_tree_node_t ira_bb_nodes
ira_loop_tree_node_t ira_loop_nodes
int ira_max_point
live_range_tira_start_point_ranges
live_range_tira_finish_point_ranges
ira_emit_data_t ira_allocno_emit_data
ira_allocno_tira_regno_allocno_map
ira_allocno_tira_allocnos
int ira_allocnos_num
ira_object_tira_object_id_map
int ira_objects_num
ira_copy_tira_copies
int ira_copies_num
int ira_spilled_reg_stack_slots_num
struct ira_spilled_reg_stack_slotira_spilled_reg_stack_slots
int ira_overall_cost
int ira_reg_cost
int ira_mem_cost
int ira_load_cost
int ira_store_cost
int ira_shuffle_cost
int ira_move_loops_num
int ira_additional_jumps_num
struct target_ira_int default_target_ira_int
struct target_ira_intthis_target_ira_int
ira_loop_tree_node_t ira_curr_loop_tree_node
ira_allocno_tira_curr_regno_allocno_map
int first_moveable_pseudo
int last_moveable_pseudo

Typedef Documentation

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.   
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]

Function Documentation

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)
static int hard_reg_set_size ( )
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   
)
static void ira_allocate_and_accumulate_costs ( )
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().

static void ira_allocate_and_copy_costs ( )
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().

static void ira_allocate_and_set_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().

static void ira_allocate_and_set_or_copy_costs ( int **  vec,
enum reg_class  aclass,
int  val,
int *  src 
)
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().

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   
)
static bool ira_allocno_iter_cond ( )
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.

static void ira_allocno_iter_init ( )
inlinestatic
Initialize the iterator I.   

References ira_allocno_iterator::n.

static bool ira_allocno_object_iter_cond ( ira_allocno_object_iterator i,
ira_allocno_t  a,
ira_object_t o 
)
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.

static void ira_allocno_object_iter_init ( )
inlinestatic
Initialize the iterator I.   

References ira_allocno_object_iterator::n.

void ira_build_conflicts ( void  )
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  )
bool ira_conflict_vector_profitable_p ( ira_object_t  ,
int   
)
static bool ira_copy_iter_cond ( )
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.

static void ira_copy_iter_init ( )
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  )
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().

rtx ira_create_new_reg ( rtx  )
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  )
ira-color.c  
Print the allocno hard register forest to stderr.   

References print_hard_regs_forest().

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  )
static bool ira_equiv_no_lvalue_p ( )
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  )
Free the emit data.   

References ira_free().

Referenced by ira().

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_allocno_updated_costs ( ira_allocno_t  )
void ira_free_cost_vector ( int *  ,
reg_class_t   
)
static bool ira_hard_reg_in_set_p ( int  hard_regno,
enum machine_mode  mode,
HARD_REG_SET  hard_regset 
)
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().

static bool ira_hard_reg_set_intersection_p ( int  hard_regno,
enum machine_mode  mode,
HARD_REG_SET  hard_regset 
)
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)
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.

Referenced by color(), and ira().

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   
)
static bool ira_object_conflict_iter_cond ( ira_object_conflict_iterator i,
ira_object_t pobj 
)
inlinestatic
static bool ira_object_iter_cond ( )
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.

static void ira_object_iter_init ( )
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 *  )
void ira_print_expanded_allocno ( ira_allocno_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().

static bool minmax_set_iter_cond ( )
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.

static void minmax_set_iter_init ( minmax_set_iterator i,
IRA_INT_TYPE *  vec,
int  min,
int  max 
)
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.

static void minmax_set_iter_next ( )
inlinestatic
Advance to the next element in the set.   

References minmax_set_iterator::bit_num, and minmax_set_iterator::word.


Variable Documentation

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 ira_additional_jumps_num
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.nosp@m.rov@.nosp@m.redha.nosp@m.t.co.nosp@m.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().

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().

live_range_t * ira_finish_point_ranges
int ira_load_cost
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().

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.nosp@m.rov@.nosp@m.redha.nosp@m.t.co.nosp@m.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
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().

int ira_shuffle_cost
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
int last_moveable_pseudo
struct target_ira_int* this_target_ira_int