GCC Middle and Back End API Reference
regs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  regstat_n_sets_and_refs_t
struct  reg_info_t
struct  target_regs

Functions

static int REG_N_REFS ()
static int REG_N_SETS ()
bool reg_is_parm_p (rtx)
void regstat_init_n_sets_and_refs (void)
void regstat_free_n_sets_and_refs (void)
void regstat_compute_ri (void)
void regstat_free_ri (void)
bitmap regstat_get_setjmp_crosses (void)
void regstat_compute_calls_crossed (void)
void regstat_free_calls_crossed (void)
void dump_reg_info (FILE *)
static unsigned int end_hard_regno ()
static void add_to_hard_reg_set (HARD_REG_SET *regs, enum machine_mode mode, unsigned int regno)
static void remove_from_hard_reg_set (HARD_REG_SET *regs, enum machine_mode mode, unsigned int regno)
static bool in_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode, unsigned int regno)
static bool overlaps_hard_reg_set_p (const HARD_REG_SET regs, enum machine_mode mode, unsigned int regno)
static void add_range_to_hard_reg_set (HARD_REG_SET *regs, unsigned int regno, int nregs)
static void remove_range_from_hard_reg_set (HARD_REG_SET *regs, unsigned int regno, int nregs)
static bool range_overlaps_hard_reg_set_p (const HARD_REG_SET set, unsigned regno, int nregs)
static bool range_in_hard_reg_set_p ()

Variables

int max_regno
struct regstat_n_sets_and_refs_tregstat_n_sets_and_refs
struct reg_info_treg_info_p
size_t reg_info_p_size
short * reg_renumber
int caller_save_needed
struct target_regs default_target_regs
struct target_regsthis_target_regs

Function Documentation

static void add_range_to_hard_reg_set ( HARD_REG_SET regs,
unsigned int  regno,
int  nregs 
)
inlinestatic
   Like add_to_hard_reg_set, but use a REGNO/NREGS range instead of
   REGNO and MODE.  
static void add_to_hard_reg_set ( HARD_REG_SET regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
   Add to REGS all the registers required to store a value of mode MODE
   in register REGNO.  

Referenced by mark_referenced_regs(), scan_loop(), and sched_analyze_reg().

void dump_reg_info ( FILE *  )
static unsigned int end_hard_regno ( )
inlinestatic
   Return an exclusive upper bound on the registers occupied by hard
   register (reg:MODE REGNO).  

Referenced by operands_match_p(), and remove_from_hard_reg_set().

static bool in_hard_reg_set_p ( const HARD_REG_SET  regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
   Return true if REGS contains the whole of (reg:MODE REGNO).  

Referenced by find_replacement(), find_valid_class(), process_alt_operands(), and setup_hard_regno_aclass().

static bool overlaps_hard_reg_set_p ( const HARD_REG_SET  regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
   Return true if (reg:MODE REGNO) includes an element of REGS.  

Referenced by lra_setup_reg_renumber().

static bool range_in_hard_reg_set_p ( )
inlinestatic
   Like in_hard_reg_set_p, but use a REGNO/NREGS range instead of
   REGNO and MODE.  
static bool range_overlaps_hard_reg_set_p ( const HARD_REG_SET  set,
unsigned  regno,
int  nregs 
)
inlinestatic
   Like overlaps_hard_reg_set_p, but use a REGNO/NREGS range instead of
   REGNO and MODE.  
bool reg_is_parm_p ( rtx  )
   Given a REG, return TRUE if the reg is a PARM_DECL, FALSE otherwise.  
static int REG_N_REFS ( )
inlinestatic
   Indexed by n, gives number of times (REG n) is used or set.  

References regstat_n_sets_and_refs_t::sets.

Referenced by ira_reassign_pseudos().

static int REG_N_SETS ( )
inlinestatic
   Indexed by n, gives number of times (REG n) is set.  
void regstat_compute_calls_crossed ( void  )
   Compute register info: lifetime, bb, and number of defs and uses.  
     Initialize everything.  
void regstat_compute_ri ( void  )
   Compute register info: lifetime, bb, and number of defs and uses.  
     Initialize everything.  
     See the setjmp comment in regstat_bb_compute_ri.  

Referenced by split_live_ranges_for_shrink_wrap().

void regstat_free_calls_crossed ( void  )
   Free all storage associated with the problem.  
void regstat_free_n_sets_and_refs ( void  )
   Free the array that holds the REG_N_SETS and REG_N_REFS.  
void regstat_free_ri ( void  )
   Free all storage associated with the problem.  
bitmap regstat_get_setjmp_crosses ( void  )
   Return a bitmap containing the set of registers that cross a setjmp.
   The client should not change or delete this bitmap.  

References bitmap_clear_bit(), bitmap_copy(), bitmap_set_bit(), df_get_artificial_defs(), df_get_artificial_uses(), and df_get_live_out().

void regstat_init_n_sets_and_refs ( void  )
   Functions defined in regstat.c.  
   If a pass need to change these values in some magical way or the
   pass needs to have accurate values for these and is not using
   incremental df scanning, then it should use REG_N_SETS and
   REG_N_USES.  If the pass is doing incremental scanning then it
   should be getting the info from DF_REG_DEF_COUNT and
   DF_REG_USE_COUNT.  

Referenced by split_live_ranges_for_shrink_wrap().

static void remove_from_hard_reg_set ( HARD_REG_SET regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
   Likewise, but remove the registers.  

References end_hard_regno().

static void remove_range_from_hard_reg_set ( HARD_REG_SET regs,
unsigned int  regno,
int  nregs 
)
inlinestatic
   Likewise, but remove the registers.  

Variable Documentation

int caller_save_needed
   Flag set by local-alloc or global-alloc if they decide to allocate
   something in a call-clobbered register.  
   Flag set by local-alloc or global-alloc if anything is live in
   a call-clobbered reg across calls.  
struct target_regs default_target_regs
int max_regno
   Maximum register number used in this function, plus one.  
@verbatim 

Compute different info about registers. Copyright (C) 1987-2013 Free Software Foundation, Inc.

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

   This file contains regscan pass of the compiler and passes for
   dealing with info about modes of pseudo-registers inside
   subregisters.  It also defines some tables of information about the
   hardware registers, function init_reg_sets to initialize the
   tables, and other auxiliary functions to deal with info about
   registers and their classes.  
   Maximum register number used in this function, plus one.  

Referenced by calculate_allocation_cost(), coalescable_pseudo_p(), coalesced_pseudo_reg_slot_compare(), undo_transformations(), and update_lives().

struct reg_info_t* reg_info_p
size_t reg_info_p_size
   The number allocated elements of reg_info_p.  
short* reg_renumber
   Vector of substitutions of register numbers,
   used to map pseudo regs into hardware regs.

   This can't be folded into reg_n_info without changing all of the
   machine dependent directories, since the reload functions
   in the machine dependent files access it.  
   Vector of substitutions of register numbers,
   used to map pseudo regs into hardware regs.
   This is set up as a result of register allocation.
   Element N is the hard reg assigned to pseudo reg N,
   or is -1 if no hard reg was assigned.
   If N is a hard reg number, element N is N.  

Referenced by add_to_inherit(), can_reload_into(), check_and_process_move(), init_lives(), insert_save(), invert_exp_1(), invert_jump_1(), ira_reassign_pseudos(), lra_debug_live_ranges(), maybe_fix_stack_asms(), save_call_clobbered_regs(), set_label_offsets(), setup_try_hard_regno_pseudos(), slot_coalesced_allocno_live_ranges_intersect_p(), substitute_pseudo(), and update_hard_regno_preference().

struct regstat_n_sets_and_refs_t* regstat_n_sets_and_refs
@verbatim 

Scanning of rtl for dataflow analysis. Copyright (C) 2007-2013 Free Software Foundation, Inc. Contributed by Kenneth Zadeck (zadec.nosp@m.k@na.nosp@m.tural.nosp@m.brid.nosp@m.ge.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/.

struct target_regs* this_target_regs