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 bool in_hard_reg_set_p ( const HARD_REG_SET  regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
static bool overlaps_hard_reg_set_p ( const HARD_REG_SET  regs,
enum machine_mode  mode,
unsigned int  regno 
)
inlinestatic
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.   

Referenced by init_rename_info().

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.   

Referenced by regrename_analyze().

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::refs.

Referenced by alter_reg(), calculate_spill_cost(), dump_reg_info(), print_pseudo_costs(), and update_equiv_regs().

void regstat_compute_calls_crossed ( void  )
Compute register info: lifetime, bb, and number of defs and uses.   

References df_bitmap_obstack, basic_block_def::index, live, max_reg_num(), max_regno, reg_info_p_size, regstat_bb_compute_calls_crossed(), timevar_pop(), and timevar_push().

Referenced by sched_init().

void regstat_compute_ri ( void  )
Compute register info: lifetime, bb, and number of defs and uses.   

References df_bitmap_obstack, free(), basic_block_def::index, live, max_reg_num(), max_regno, reg_info_p_size, regstat_bb_compute_ri(), timevar_pop(), and timevar_push().

Referenced by find_moveable_pseudos(), ira(), and regmove_optimize().

void regstat_free_calls_crossed ( void  )
Free all storage associated with the problem.   

References free(), and reg_info_p_size.

Referenced by sched_finish().

void regstat_free_n_sets_and_refs ( void  )
Free the array that holds the REG_N_SETS and REG_N_REFS.   

References free().

Referenced by do_reload(), find_moveable_pseudos(), ira(), lra(), move_loop_invariants(), one_code_hoisting_pass(), regmove_optimize(), rest_of_handle_combine(), and sched_finish().

void regstat_free_ri ( void  )
Free all storage associated with the problem.   

References free(), and reg_info_p_size.

Referenced by do_reload(), find_moveable_pseudos(), ira(), lra(), and regmove_optimize().

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

Referenced by assign_spill_hard_regs(), coalesce_spill_slots(), and generate_setjmp_warnings().

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.   

References df_grow_reg_info(), max_reg_num(), max_regno, REG_N_SETS(), timevar_pop(), and timevar_push().

Referenced by find_moveable_pseudos(), ira(), move_loop_invariants(), one_code_hoisting_pass(), regmove_optimize(), rest_of_handle_combine(), and sched_init().

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

Referenced by build_def_use(), mark_target_live_regs(), and reg_dies().

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

Referenced by init_rename_info().


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.   

Referenced by allocno_reload_assign(), lra(), prepare_function_start(), reload(), and setup_reg_renumber().

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 assign_by_spills(), build_insn_chain(), calculate_elim_costs_all_insns(), choose_best_pseudo_reg(), choose_reload_regs(), create_live_range_start_chains(), dead_or_predicable(), extend_deps_reg_info(), finish_spills(), fix_reg_equiv_init(), grow_reg_equivs(), if_convert(), implicit_clobber_conflict_p(), init_eliminable_invariants(), init_live_reload_and_inheritance_pseudos(), init_lives(), init_loop_tree_node(), init_regno_assign_info(), ira(), ira_print_disposition(), ira_sort_regnos_for_alter_reg(), lra_assign(), lra_coalesce(), lra_create_live_ranges(), lra_final_code_change(), lra_need_for_spills_p(), maybe_extend_reg_info_p(), print_live_ranges(), rebuild_regno_allocno_maps(), regstat_compute_calls_crossed(), regstat_compute_ri(), regstat_init_n_sets_and_refs(), reload(), reload_as_needed(), remove_some_program_points_and_update_live_ranges(), rest_of_handle_sms(), sched_init(), setup_live_pseudos_and_spill_after_risky_transforms(), setup_preferred_alternate_classes_for_new_pseudos(), setup_reg_equiv_init(), spill_hard_reg(), subst_reloads(), and update_equiv_regs().

struct reg_info_t* reg_info_p

Referenced by maybe_extend_reg_info_p().

size_t reg_info_p_size
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_used_regs_1(), allocate_initial_values(), allocate_reg_info(), allocno_reload_assign(), alter_reg(), assign_by_spills(), assign_mem_slot(), build_insn_chain(), calculate_elim_costs_all_insns(), calculate_needs_all_insns(), calculate_spill_cost(), check_and_process_move(), compute_use_by_pseudos(), constrain_operands(), count_pseudo(), count_spilled_pseudo(), create_live_range_start_chains(), cselib_invalidate_regno(), curr_insn_transform(), delete_output_reload(), eliminate_regs_1(), elimination_effects(), emit_input_reload_insns(), find_reloads(), find_reloads_address_1(), find_reloads_toplev(), finish_spills(), free_reg_info(), gimple_expand_cfg(), improve_inheritance(), inherit_in_ebb(), init_regno_assign_info(), ira_mark_allocation_change(), ira_reassign_pseudos(), lra_assign(), lra_create_live_ranges(), lra_get_regno_hard_regno(), lra_setup_reg_renumber(), lra_undo_inheritance(), mark_home_live(), mark_home_live_1(), mark_referenced_regs(), mem_move_p(), move_unallocated_pseudos(), need_for_call_save_p(), need_for_split_p(), prepare_function_start(), process_bb_lives(), pseudo_for_reload_consideration_p(), push_reload(), regno_ok_for_base_p(), reload(), resize_reg_info(), rtx_renumbered_equal_p(), save_call_clobbered_regs(), setup_live_pseudos_and_spill_after_risky_transforms(), setup_reg_renumber(), setup_save_areas(), spill_for(), spill_hard_reg(), spill_pseudos(), split_reg(), subst_indexed_address(), true_regnum(), undo_optional_reloads(), update_hard_regno_preference(), and update_lives().

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

Referenced by sched_finish().

struct target_regs* this_target_regs