osprey-gcc/gcc/regclass.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "hard-reg-set.h"
#include "rtl.h"
#include "expr.h"
#include "tm_p.h"
#include "flags.h"
#include "basic-block.h"
#include "regs.h"
#include "function.h"
#include "insn-config.h"
#include "recog.h"
#include "reload.h"
#include "real.h"
#include "toplev.h"
#include "output.h"
#include "ggc.h"
#include "timevar.h"
#include "hashtab.h"
#include "gt-regclass.h"

Include dependency graph for regclass.c:

Go to the source code of this file.

Data Types

type  costs
type  reg_pref

Defines

#define CALL_REALLY_USED_REGNO_P(X)   call_used_regs[X]
#define N_REG_INTS   ((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32)

Functions/Subroutines

static void init_reg_sets_1 (void)
static void init_reg_autoinc (void)
static GTY (())
void init_reg_sets (void)
void init_reg_modes_once (void)
void init_regs (void)
void init_fake_stack_mems (void)
enum machine_mode choose_hard_reg_mode (unsigned int regno ATTRIBUTE_UNUSED, unsigned int nregs, bool call_saved)
void fix_register (const char *name, int fixed, int call_used)
void globalize_reg (int i)
static rtx scan_one_insn (rtx, int)
static void record_operand_costs (rtx, struct costs *, struct reg_pref *)
static void dump_regclass (FILE *)
static void record_reg_classes (int, int, rtx *, enum machine_mode *, const char **, rtx, struct costs *, struct reg_pref *)
static int copy_cost (rtx, enum machine_mode, enum reg_class, int)
static void record_address_regs (rtx, enum reg_class, int)
static void reg_scan_mark_refs (rtx, rtx, int, unsigned int)
enum reg_class reg_preferred_class (int regno)
enum reg_class reg_alternate_class (int regno)
void regclass_init (void)
void regclass (rtx f, int nregs, FILE *dump)
static int copy_cost (rtx x, enum machine_mode mode ATTRIBUTE_UNUSED, enum reg_class class, int to_p ATTRIBUTE_UNUSED)
void allocate_reg_info (size_t num_regs, int new_p, int renumber_p)
void free_reg_info (void)
void reg_scan (rtx f, unsigned int nregs)
void reg_scan_update (rtx first, rtx last, unsigned int old_max_regno)
int reg_class_subset_p (enum reg_class c1, enum reg_class c2)
int reg_classes_intersect_p (enum reg_class c1, enum reg_class c2)

Variables

char fixed_regs [FIRST_PSEUDO_REGISTER]
HARD_REG_SET fixed_reg_set
static const char initial_fixed_regs [] = FIXED_REGISTERS
char call_used_regs [FIRST_PSEUDO_REGISTER]
HARD_REG_SET call_used_reg_set
HARD_REG_SET losing_caller_save_reg_set
static const char initial_call_used_regs [] = CALL_USED_REGISTERS
char call_fixed_regs [FIRST_PSEUDO_REGISTER]
HARD_REG_SET call_fixed_reg_set
int n_non_fixed_regs
char global_regs [FIRST_PSEUDO_REGISTER]
HARD_REG_SET regs_invalidated_by_call
HARD_REG_SET reg_class_contents [N_REG_CLASSES]
static const unsigned int_reg_class_contents [N_REG_CLASSES][N_REG_INTS] = REG_CLASS_CONTENTS
unsigned int reg_class_size [N_REG_CLASSES]
enum reg_class reg_class_superclasses [N_REG_CLASSES][N_REG_CLASSES]
enum reg_class reg_class_subclasses [N_REG_CLASSES][N_REG_CLASSES]
enum reg_class reg_class_subunion [N_REG_CLASSES][N_REG_CLASSES]
enum reg_class reg_class_superunion [N_REG_CLASSES][N_REG_CLASSES]
const char * reg_names [] = REGISTER_NAMES
const char * reg_class_names [] = REG_CLASS_NAMES
enum machine_mode reg_raw_mode [FIRST_PSEUDO_REGISTER]
bool have_regs_of_mode [MAX_MACHINE_MODE]
static char contains_reg_of_mode [N_REG_CLASSES][MAX_MACHINE_MODE]
static int move_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES]
static int may_move_in_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES]
static int may_move_out_cost [MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES]
static struct reg_info_data * reg_info_head
static int no_global_reg_vars = 0
unsigned char hard_regno_nregs [FIRST_PSEUDO_REGISTER][MAX_MACHINE_MODE]
static struct costscosts
static struct costs init_cost
static struct reg_prefreg_pref
static struct reg_prefreg_pref_buffer
static int frequency
static short * renumber
static size_t regno_allocated
static unsigned int reg_n_max
int max_parallel
static int max_set_parallel


Define Documentation

#define CALL_REALLY_USED_REGNO_P ( X   )     call_used_regs[X]

Definition at line 111 of file regclass.c.

Referenced by init_reg_sets_1().

#define N_REG_INTS   ((FIRST_PSEUDO_REGISTER + (32 - 1)) / 32)

Definition at line 163 of file regclass.c.


Function Documentation

void allocate_reg_info ( size_t  num_regs,
int  new_p,
int  renumber_p 
)

enum machine_mode choose_hard_reg_mode ( unsigned int regno  ATTRIBUTE_UNUSED,
unsigned int  nregs,
bool  call_saved 
)

static int copy_cost ( rtx  x,
enum machine_mode mode  ATTRIBUTE_UNUSED,
enum reg_class  class,
int to_p  ATTRIBUTE_UNUSED 
) [static]

static int copy_cost ( rtx  ,
enum  machine_mode,
enum  reg_class,
int   
) [static]

static void dump_regclass ( FILE dump  )  [static]

void fix_register ( const char *  name,
int  fixed,
int  call_used 
)

Definition at line 744 of file regclass.c.

void free_reg_info ( void   ) 

Definition at line 2262 of file regclass.c.

References free(), reg_n_info, and VARRAY_FREE.

void globalize_reg ( int  i  ) 

static GTY ( ()   )  [static]

Definition at line 245 of file regclass.c.

References next.

void init_fake_stack_mems ( void   ) 

Definition at line 598 of file regclass.c.

References gen_rtx_MEM(), i, and stack_pointer_rtx.

static void init_reg_autoinc ( void   )  [static]

void init_reg_modes_once ( void   ) 

Definition at line 559 of file regclass.c.

Referenced by init_emit_once().

void init_reg_sets ( void   ) 

static void init_reg_sets_1 ( void   )  [static]

void init_regs ( void   ) 

Definition at line 585 of file regclass.c.

References init_reg_autoinc(), and init_reg_sets_1().

static void record_address_regs ( rtx  x,
enum reg_class  class,
int  scale 
) [static]

static void record_operand_costs ( rtx  insn,
struct costs op_costs,
struct reg_pref reg_pref 
) [static]

static void record_reg_classes ( int  n_alts,
int  n_ops,
rtx ops,
enum machine_mode modes,
const char **  constraints,
rtx  insn,
struct costs op_costs,
struct reg_pref reg_pref 
) [static]

enum reg_class reg_alternate_class ( int  regno  ) 

Definition at line 901 of file regclass.c.

References ALL_REGS, and reg_pref::altclass.

int reg_class_subset_p ( enum reg_class  c1,
enum reg_class  c2 
)

Definition at line 2546 of file regclass.c.

References ALL_REGS, GO_IF_HARD_REG_SUBSET, and reg_class_contents.

int reg_classes_intersect_p ( enum reg_class  c1,
enum reg_class  c2 
)

enum reg_class reg_preferred_class ( int  regno  ) 

Definition at line 893 of file regclass.c.

References GENERAL_REGS, and reg_pref::prefclass.

void reg_scan ( rtx  f,
unsigned int  nregs 
)

Definition at line 2308 of file regclass.c.

static void reg_scan_mark_refs ( rtx  x,
rtx  insn,
int  note_flag,
unsigned int  min_regno 
) [static]

void reg_scan_update ( rtx  first,
rtx  last,
unsigned int  old_max_regno 
)

void regclass ( rtx  f,
int  nregs,
FILE dump 
)

void regclass_init ( void   ) 

Definition at line 912 of file regclass.c.

References costs::cost, i, init_cost, costs::mem_cost, N_REG_CLASSES, and NULL.

static rtx scan_one_insn ( rtx  insn,
int  pass 
) [static]


Variable Documentation

HARD_REG_SET call_fixed_reg_set

Definition at line 124 of file regclass.c.

char call_fixed_regs[FIRST_PSEUDO_REGISTER]

Definition at line 120 of file regclass.c.

HARD_REG_SET call_used_reg_set

Definition at line 90 of file regclass.c.

char call_used_regs[FIRST_PSEUDO_REGISTER]

Definition at line 86 of file regclass.c.

char contains_reg_of_mode[N_REG_CLASSES][MAX_MACHINE_MODE] [static]

Definition at line 212 of file regclass.c.

struct costs* costs [static]

Definition at line 856 of file regclass.c.

HARD_REG_SET fixed_reg_set

Definition at line 74 of file regclass.c.

char fixed_regs[FIRST_PSEUDO_REGISTER]

Definition at line 70 of file regclass.c.

int frequency [static]

Definition at line 873 of file regclass.c.

char global_regs[FIRST_PSEUDO_REGISTER]

Definition at line 135 of file regclass.c.

unsigned char hard_regno_nregs[FIRST_PSEUDO_REGISTER][MAX_MACHINE_MODE]

Definition at line 267 of file regclass.c.

Referenced by add_stored_regs(), aggregate_value_p(), allocate_reload_reg(), assign_parm_setup_block(), assign_reg_reg_set(), can_change_dest_mode(), choose_reload_regs(), clear_dead_regs(), clear_reload_reg_in_use(), combine_regs(), combine_reloads(), compute_use_by_pseudos(), copy_value(), copyprop_hardreg_forward_1(), count_or_remove_death_notes_bb(), count_pseudo(), count_spilled_pseudo(), covers_regno_no_parallel_p(), cse_insn(), cselib_invalidate_regno(), cselib_lookup(), cselib_record_set(), dead_or_set_p(), decl_conflicts_with_clobbers_p(), decl_overlaps_hard_reg_set_p(), decompose(), delete_output_reload(), delete_prior_computation(), df_insn_refs_record(), df_lr_bb_local_compute(), df_mark_reg(), df_ref_record(), df_urec_mark_reg_change(), distribute_notes(), dump_def_use_chain(), emit_note_insn_var_location(), emit_reload_insns(), exp_equiv_p(), find_btr_reference(), find_dummy_reload(), find_dying_inputs(), find_equiv_reg(), find_free_reg(), find_oldest_value_reg(), find_reg(), find_reg_fusage(), find_regno_fusage(), find_regno_note(), find_reload_regs(), find_reloads(), forget_old_reloads_1(), free_for_value_p(), get_last_value_validate(), global_alloc(), hard_reg_set_here_p(), insert(), insert_one_insn(), insert_restore(), insert_save(), insn_dead_p(), invalidate(), invalidate_for_call(), kill_value(), kill_value_regno(), likely_spilled_retval_1(), likely_spilled_retval_p(), make_decl_rtl(), mark_effect(), mark_flags_life_zones(), mark_home_live(), mark_killed_regs(), mark_life(), mark_referenced_regs(), mark_referenced_resources(), mark_reg(), mark_reg_conflicts(), mark_reg_death(), mark_reg_gr_used_mask(), mark_reg_live_nc(), mark_reg_store(), mark_reload_reg_in_use(), mark_set_1(), mark_set_regs(), mark_set_resources(), mark_target_live_regs(), mark_used_reg(), mark_used_regs_combine(), maybe_mode_change(), mention_regs(), mentions_nonequal_regs(), move2add_note_store(), move_deaths(), note_btr_set(), note_local_live(), note_sets(), operands_match_p(), post_mark_life(), push_reload(), read_complex_part(), record_dead_and_set_regs(), record_set(), record_value_for_reg(), refers_to_regno_p(), reg_becomes_live(), reg_bitfield_target_p(), reg_dead_at_p(), reg_dead_at_p_1(), reg_dies(), reg_fits_class_p(), reg_overlap_mentioned_for_reload_p(), reg_overlap_mentioned_p(), regno_clobbered_p(), regrename_optimize(), reload_adjust_reg_for_mode(), reload_adjust_reg_for_temp(), reload_combine(), reload_combine_note_store(), reload_combine_note_use(), reload_cse_move2add(), reload_inner_reg_of_subreg(), reload_reg_free_for_value_p(), rs6000_memory_move_cost(), rs6000_register_move_cost(), rs6000_split_multireg_move(), rtx_equiv_p(), save_call_clobbered_regs(), scan_rtx_reg(), sched_analyze_1(), sched_analyze_2(), sched_analyze_reg(), set_preference(), set_value_regno(), setup_save_areas(), spill_hard_reg(), subreg_offset_representable_p(), subreg_regno_offset(), update_live_status(), update_table_tick(), use_crosses_set_p(), and write_complex_part().

bool have_regs_of_mode[MAX_MACHINE_MODE]

Definition at line 208 of file regclass.c.

Referenced by init_reg_sets_1(), and layout_type().

Definition at line 860 of file regclass.c.

const char initial_call_used_regs[] = CALL_USED_REGISTERS [static]

Definition at line 97 of file regclass.c.

const char initial_fixed_regs[] = FIXED_REGISTERS [static]

Definition at line 78 of file regclass.c.

const unsigned int_reg_class_contents[N_REG_CLASSES][N_REG_INTS] = REG_CLASS_CONTENTS [static]

Definition at line 167 of file regclass.c.

Definition at line 93 of file regclass.c.

Definition at line 2300 of file regclass.c.

int max_set_parallel [static]

Definition at line 2305 of file regclass.c.

int may_move_in_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static]

Definition at line 222 of file regclass.c.

int may_move_out_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static]

Definition at line 227 of file regclass.c.

int move_cost[MAX_MACHINE_MODE][N_REG_CLASSES][N_REG_CLASSES] [static]

Definition at line 217 of file regclass.c.

int no_global_reg_vars = 0 [static]

Definition at line 264 of file regclass.c.

HARD_REG_SET reg_class_contents[N_REG_CLASSES]

Definition at line 156 of file regclass.c.

const char* reg_class_names[] = REG_CLASS_NAMES

Definition at line 197 of file regclass.c.

unsigned int reg_class_size[N_REG_CLASSES]

Definition at line 171 of file regclass.c.

enum reg_class reg_class_subclasses[N_REG_CLASSES][N_REG_CLASSES]

Definition at line 179 of file regclass.c.

Referenced by init_reg_sets_1().

enum reg_class reg_class_subunion[N_REG_CLASSES][N_REG_CLASSES]

Definition at line 184 of file regclass.c.

enum reg_class reg_class_superclasses[N_REG_CLASSES][N_REG_CLASSES]

Definition at line 175 of file regclass.c.

Referenced by init_reg_sets_1().

enum reg_class reg_class_superunion[N_REG_CLASSES][N_REG_CLASSES]

Definition at line 189 of file regclass.c.

struct reg_info_data* reg_info_head [static]

Definition at line 259 of file regclass.c.

unsigned int reg_n_max [static]

Definition at line 2152 of file regclass.c.

const char* reg_names[] = REGISTER_NAMES

Definition at line 193 of file regclass.c.

Definition at line 865 of file regclass.c.

Definition at line 869 of file regclass.c.

enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER]

Definition at line 204 of file regclass.c.

Definition at line 2151 of file regclass.c.

Definition at line 144 of file regclass.c.

short* renumber [static]

Definition at line 2150 of file regclass.c.


Generated on Wed Apr 8 15:42:48 2009 for Open64 by  doxygen 1.5.6