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_pref
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_pref_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_prefira_pref_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_setup_alts (rtx insn, HARD_REG_SET &alts)
int ira_get_dup_out_num (int op_num, HARD_REG_SET &alts)
void ira_debug_pref (ira_pref_t)
void ira_debug_prefs (void)
void ira_debug_allocno_prefs (ira_allocno_t)
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_pref_t ira_create_pref (ira_allocno_t, int, int)
void ira_add_allocno_pref (ira_allocno_t, int, int)
void ira_remove_pref (ira_pref_t)
void ira_remove_allocno_prefs (ira_allocno_t)
ira_copy_t ira_create_copy (ira_allocno_t, ira_allocno_t, int, bool, rtx, ira_loop_tree_node_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_pref_iter_init ()
static bool ira_pref_iter_cond ()
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_pref_tira_prefs
int ira_prefs_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 ira_allocno_pref* ira_pref_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

static rtx allocno_emit_reg ( )
inlinestatic
   Abbreviation for frequent emit data access.  

Referenced by modify_move_list().

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 finish_allocno_hard_regs(), and ira_debug_disposition().

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

Referenced by add_copies().

void ira_add_allocno_pref ( ira_allocno_t  ,
int  ,
int   
)
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 
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 

Referenced by update_costs_from_allocno().

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 

Referenced by finish_costs(), ira_init_costs(), and process_single_reg_class_operands().

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).  
bitmap ira_allocate_bitmap ( void  )
   Allocate and returns bitmap for IRA.  

Referenced by coalesced_pseudo_reg_slot_compare(), do_coloring(), and ira_reuse_stack_slot().

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.  
static void ira_allocno_iter_init ( )
inlinestatic
   Initialize the iterator I.  
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.  
static void ira_allocno_object_iter_init ( )
inlinestatic
   Initialize the iterator I.  
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.  
         Remove all regions but root one.  
         We don't save hard registers around calls for fast allocation
         -- add caller clobbered registers as conflicting ones to
         allocno crossing calls.  

Referenced by split_live_ranges_for_shrink_wrap().

void ira_build_conflicts ( void  )
   Entry function which builds allocno conflicts and allocno copies
   and accumulate some allocno info on upper level regions.  
             We need finished conflict table for the subsequent call.  
             Now we can free memory for the conflict table (see function
             build_object_conflicts for details).  
                 For debugging purposes don't put user defined variables in
                 callee-clobbered registers.  However, do allow parameters
                 in callee-clobbered registers to improve debugging.  This
                 is a bit of a fragile hack.  
                 Allocnos bigger than the saved part of call saved
                 regs must conflict with them.  
void ira_color ( void  )
   Entry function doing coloring.  
     Setup updated costs.  

Referenced by split_live_ranges_for_shrink_wrap().

void ira_compress_allocno_live_ranges ( void  )
   Compress allocno live ranges.  
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_allocate_cost_vector(), len, and memcpy().

static void ira_copy_iter_init ( )
inlinestatic
   Initialize the iterator I.  
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.  
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.  
           Remember that we can create temporary allocnos to break
           cycles in register shuffle on region borders (see
           ira-emit.c).  
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.  
     Clean up.  
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, ira_allocno_copy::first, ira_allocno_copy::freq, ira_allocno_copy::insn, ira_allocno_copy::num, and ira_allocno_copy::second.

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 first, last, and live_range::start.

Referenced by create_cap_allocno().

rtx ira_create_new_reg ( rtx  )
ira_pref_t ira_create_pref ( ira_allocno_t  ,
int  ,
int   
)
void ira_debug_allocno_classes ( void  )
   Output all possible allocno and translation classes and the
   translation maps into stderr.  

References targetm.

void ira_debug_allocno_copies ( ira_allocno_t  )
void ira_debug_allocno_live_ranges ( ira_allocno_t  )
void ira_debug_allocno_prefs ( ira_allocno_t  )
void ira_debug_conflicts ( bool  )
   ira-conflicts.c 
void ira_debug_copies ( void  )
   Print info about all copies into stderr.  
void ira_debug_copy ( ira_copy_t  )
void ira_debug_disposition ( void  )
   Outputs information about allocation of all allocnos into
   stderr.  

References hard_reg_set_size(), and temp_hard_regset.

void ira_debug_hard_regs_forest ( void  )
   ira-color.c 
   Print the allocno hard register forest to stderr.  
void ira_debug_live_range_list ( live_range_t  )
void ira_debug_live_ranges ( void  )
   Print live ranges of all allocnos to stderr.  
void ira_debug_pref ( ira_pref_t  )
void ira_debug_prefs ( void  )
   Print info about all prefs into stderr.  
void ira_destroy ( void  )
   Release the data created by function ira_build.  
void ira_emit ( bool  )
static bool ira_equiv_no_lvalue_p ( )
inlinestatic
   Return true if equivalence of pseudo REGNO is not a lvalue.  
void ira_finish_allocno_live_ranges ( void  )
   Free arrays IRA_START_POINT_RANGES and IRA_FINISH_POINT_RANGES.  
void ira_finish_assign ( void  )
   Deallocate data used by assign_hard_reg.  
void ira_finish_costs_once ( void  )
   Function called once at the end of compiler work.  
void ira_finish_emit_data ( void  )
   Free the emit data.  

References ira_free().

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_bitmap ( bitmap  )
void ira_free_cost_vector ( int *  ,
reg_class_t   
)
int ira_get_dup_out_num ( int  op_num,
HARD_REG_SET alts 
)
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.  
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 ira_init_costs().

void ira_init_costs ( void  )
   This is called each time register related information is
   changed.  
     Don't use ira_allocate because vectors live through several IRA
     calls.  

References ira_allocate_and_set_costs(), and ira_hard_reg_set_intersection_p().

void ira_init_costs_once ( void  )
   ira-costs.c 
   Function called once during compiler work.  
void ira_init_register_move_cost ( enum  machine_mode)
static void ira_init_register_move_cost_if_necessary ( )
inlinestatic
   Initialize register costs for MODE if necessary.  

References ira_copy_iterator::n.

Referenced by process_single_reg_class_operands().

void ira_initiate_assign ( void  )
   Allocate and initialize data necessary for assign_hard_reg.  

Referenced by move_unallocated_pseudos(), and split_live_ranges_for_shrink_wrap().

void ira_initiate_emit_data ( void  )
   ira-emit.c 
   Allocate and initiate the emit data.  

Referenced by split_live_ranges_for_shrink_wrap().

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
   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.  
         Skip words that are zeros.  
             If we have reached the end, break.  
         Skip bits that are zero.  
static void ira_object_conflict_iter_init ( ira_object_conflict_iterator i,
ira_object_t  obj 
)
inlinestatic
   Initialize the iterator I with ALLOCNO conflicts.  
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.  
static void ira_object_iter_init ( )
inlinestatic
ira_allocno_t ira_parent_allocno ( ira_allocno_t  )
ira_allocno_t ira_parent_or_cap_allocno ( ira_allocno_t  )
static bool ira_pref_iter_cond ( )
inlinestatic
   Return TRUE if we have more prefs to visit, in which case *PREF is
   set to the pref to be visited.  Otherwise, return FALSE.  
static void ira_pref_iter_init ( )
inlinestatic
   Initialize the iterator I.  
void ira_print_disposition ( FILE *  )
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.  

Referenced by ira_debug_live_range_list().

void ira_remove_allocno_prefs ( ira_allocno_t  )
void ira_remove_pref ( ira_pref_t  )
void ira_set_allocno_class ( ira_allocno_t  ,
enum  reg_class 
)
void ira_setup_alts ( rtx  insn,
HARD_REG_SET alts 
)
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.  
         Add all nodes to the set of nodes to visit.  The IRA loop tree
         is set up such that nodes in the loop body appear in a pre-order
         of their place in the CFG.  

Referenced by create_loop_allocnos(), print_conflicts(), and process_bb_for_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.  
         Some targets allow pseudos to be allocated to unaligned sequences
         of hard registers.  However, selecting an unaligned sequence can
         unnecessarily restrict later allocations.  So increase the cost of
         unaligned hard regs to encourage the use of aligned hard regs.  
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.  
     Skip words that are zeros.  
         If we have reached the end, break.  
     Skip bits that are zero.  
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.  
static void minmax_set_iter_next ( )
inlinestatic
   Advance to the next element in the set.  

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

int ira_allocnos_num
   The size of the previous array.  
   Sizes of the previous array.  

Referenced by coalesced_pseudo_reg_slot_compare(), ira_create_object(), ira_reuse_stack_slot(), and process_bb_for_costs().

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

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.  
ira_allocno_t* ira_curr_regno_allocno_map

Referenced by mark_pseudo_reg_live().

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.  
int ira_loop_tree_height
   Height of the loop tree.  
ira_loop_tree_node_t ira_loop_tree_root
   The root of the loop tree corresponding to the all function.  

Referenced by add_copies(), fix_reg_equiv_init(), print_conflicts(), and process_bb_for_costs().

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

int ira_mem_cost
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 dec_register_pressure(), process_bb_node_lives(), and propagate_copies().

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 ira_print_live_range_list(), modify_move_list(), and update_bad_spill_attribute().

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

ira_pref_t* ira_prefs
   Array of references to all allocno preferences.  The order number
   of the preference corresponds to the index in the array.  
int ira_prefs_num
   Size of the previous array.  
int ira_reg_cost
ira_allocno_t* ira_regno_allocno_map
   Map regno -> allocnos with given regno (see comments for
   allocno member `next_regno_allocno').  

Referenced by coalesced_pseudo_reg_slot_compare(), ira_create_new_reg(), ira_reassign_pseudos(), merge_allocnos(), and slot_coalesced_allocno_live_ranges_intersect_p().

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.  
int ira_spilled_reg_stack_slots_num
   The number of elements in the following array.  
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.  
int ira_store_cost
int last_moveable_pseudo
struct target_ira_int* this_target_ira_int