osprey/kg++fe/gnu/global.c File Reference

#include "config.h"
#include "system.h"
#include "machmode.h"
#include "hard-reg-set.h"
#include "rtl.h"
#include "tm_p.h"
#include "flags.h"
#include "basic-block.h"
#include "regs.h"
#include "function.h"
#include "insn-config.h"
#include "reload.h"
#include "output.h"
#include "toplev.h"

Include dependency graph for global.c:

Go to the source code of this file.

Data Types

type  allocno

Defines

#define INT_BITS   HOST_BITS_PER_WIDE_INT
#define INT_TYPE   HOST_WIDE_INT
#define CONFLICTP(I, J)
#define EXECUTE_IF_SET_IN_ALLOCNO_SET(ALLOCNO_SET, ALLOCNO, CODE)
#define SET_REGBIT(TABLE, I, J)   SET_HARD_REG_BIT (allocno[I].TABLE, J)
#define SET_ALLOCNO_LIVE(I)
#define CLEAR_ALLOCNO_LIVE(I)

Functions/Subroutines

static int allocno_compare PARAMS ((const PTR, const PTR))
static void global_conflicts PARAMS ((void))
static void find_reg PARAMS ((int, HARD_REG_SET, int, int, int))
static void record_one_conflict PARAMS ((int))
static void record_conflicts PARAMS ((int *, int))
static void mark_reg_store PARAMS ((rtx, rtx, void *))
static void mark_reg_conflicts PARAMS ((rtx))
static void mark_reg_live_nc PARAMS ((int, enum machine_mode))
static void set_preference PARAMS ((rtx, rtx))
static void dump_conflicts PARAMS ((FILE *))
static void reg_dies PARAMS ((int, enum machine_mode, struct insn_chain *))
int global_alloc (FILE *file)
static int allocno_compare (PTR v1p, const PTR v2p) const
static void global_conflicts ()
static void expand_preferences ()
static void prune_preferences ()
static void find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbered, int retrying)
void retry_global_alloc (int regno, HARD_REG_SET forbidden_regs)
static void record_one_conflict (int regno)
static void record_conflicts (int *allocno_vec, int len)
static void mirror_conflicts ()
static void mark_reg_store (rtx reg, rtx setter, data)
static void mark_reg_clobber (rtx reg, rtx setter, data)
static void mark_reg_conflicts (rtx reg)
static void mark_reg_death (rtx reg)
static void mark_reg_live_nc (int regno, enum machine_mode mode)
static void set_preference (rtx dest, rtx src)
void mark_elimination (int from, int to)
static void reg_becomes_live (rtx reg, setter, void *regs_set)
static void reg_dies (int regno, enum machine_mode mode, struct insn_chain *chain)
void build_insn_chain (rtx first)
static void dump_conflicts (FILE *file)
void dump_global_regs (FILE *file)

Variables

static int max_allocno
static int * reg_allocno
static struct allocnoallocno
static int * allocno_order
static int * reg_may_share
static INT_TYPE * conflicts
static int allocno_row_words
static HARD_REG_SET hard_regs_live
static HARD_REG_SET no_global_alloc_regs
static HARD_REG_SET regs_used_so_far
static int local_reg_n_refs [FIRST_PSEUDO_REGISTER]
static int local_reg_freq [FIRST_PSEUDO_REGISTER]
static int local_reg_live_length [FIRST_PSEUDO_REGISTER]
static INT_TYPE * allocnos_live
static rtxregs_set
static int n_regs_set
static HARD_REG_SET eliminable_regset
static regset live_relevant_regs


Define Documentation

#define CLEAR_ALLOCNO_LIVE (  ) 

Value:

(allocnos_live[(unsigned) (I) / INT_BITS]   \
     &= ~((INT_TYPE) 1 << ((unsigned) (I) % INT_BITS)))

Definition at line 251 of file global.c.

Referenced by mark_reg_death().

#define CONFLICTP ( I,
 ) 

Value:

(conflicts[(I) * allocno_row_words + (unsigned) (J) / INT_BITS] \
  & ((INT_TYPE) 1 << ((unsigned) (J) % INT_BITS)))

Definition at line 175 of file global.c.

Referenced by dump_conflicts(), and expand_preferences().

#define EXECUTE_IF_SET_IN_ALLOCNO_SET ( ALLOCNO_SET,
ALLOCNO,
CODE   ) 

Value:

do {                  \
  int i_;               \
  int allocno_;               \
  INT_TYPE *p_ = (ALLOCNO_SET);           \
                  \
  for (i_ = allocno_row_words - 1, allocno_ = 0; i_ >= 0;   \
       i_--, allocno_ += INT_BITS)          \
    {                 \
      unsigned INT_TYPE word_ = (unsigned INT_TYPE) *p_++;    \
                  \
      for ((ALLOCNO) = allocno_; word_; word_ >>= 1, (ALLOCNO)++) \
  {               \
    if (word_ & 1)            \
      {CODE;}             \
  }               \
    }                 \
} while (0)

Definition at line 181 of file global.c.

Referenced by find_reg(), global_conflicts(), prune_preferences(), and record_one_conflict().

#define INT_BITS   HOST_BITS_PER_WIDE_INT

Definition at line 157 of file global.c.

Referenced by global_alloc(), and mirror_conflicts().

#define INT_TYPE   HOST_WIDE_INT

#define SET_ALLOCNO_LIVE (  ) 

Value:

(allocnos_live[(unsigned) (I) / INT_BITS]   \
     |= ((INT_TYPE) 1 << ((unsigned) (I) % INT_BITS)))

Definition at line 247 of file global.c.

Referenced by global_conflicts(), and mark_reg_store().

#define SET_REGBIT ( TABLE,
I,
 )     SET_HARD_REG_BIT (allocno[I].TABLE, J)

Definition at line 238 of file global.c.

Referenced by set_preference().


Function Documentation

static int allocno_compare ( PTR  v1p,
const PTR  v2p 
) const [static]

Definition at line 600 of file global.c.

References double, floor_log2, allocno::freq, allocno::live_length, allocno::n_refs, REG_FREQ_MAX, and size.

Referenced by global_alloc().

void build_insn_chain ( rtx  first  ) 

static void dump_conflicts ( FILE file  )  [static]

void dump_global_regs ( FILE file  ) 

static void expand_preferences ( void   )  [static]

static void find_reg ( int  num,
HARD_REG_SET  losers,
int  alt_regs_p,
int  accept_call_clobbered,
int  retrying 
) [static]

int global_alloc ( FILE file  ) 

static void global_conflicts ( void   )  [static]

void mark_elimination ( int  from,
int  to 
)

Definition at line 1710 of file global.c.

Referenced by reload().

static void mark_reg_clobber ( rtx  reg,
rtx  setter,
data   
) [static]

Definition at line 1491 of file global.c.

References GET_CODE, and mark_reg_store().

Referenced by global_conflicts().

static void mark_reg_conflicts ( rtx  reg  )  [static]

static void mark_reg_death ( rtx  reg  )  [static]

static void mark_reg_live_nc ( int  regno,
enum machine_mode  mode 
) [static]

Definition at line 1580 of file global.c.

References HARD_REGNO_NREGS, hard_regs_live, last, and SET_HARD_REG_BIT.

Referenced by global_conflicts().

static void mark_reg_store ( rtx  reg,
rtx  setter,
data   
) [static]

static void mirror_conflicts ( void   )  [static]

Definition at line 1394 of file global.c.

References allocno_row_words, conflicts, i, INT_BITS, INT_TYPE, max_allocno, p, q0, q1, and q2.

Referenced by global_alloc().

static void reg_dies PARAMS ( (int, enum machine_mode, struct insn_chain *)   )  [static]

static void dump_conflicts PARAMS ( (FILE *)   )  [static]

static void set_preference PARAMS ( (rtx, rtx  )  [static]

static void mark_reg_live_nc PARAMS ( (int, enum machine_mode  )  [static]

static void mark_reg_conflicts PARAMS ( (rtx  )  [static]

static void mark_reg_store PARAMS ( (rtx, rtx, void *)   )  [static]

static void record_conflicts PARAMS ( (int *, int)   )  [static]

static void record_one_conflict PARAMS ( (int)   )  [static]

static void find_reg PARAMS ( (int, HARD_REG_SET, int, int, int)   )  [static]

static void global_conflicts PARAMS ( (void  )  [static, read]

Definition at line 77 of file cplus-dem.c.

static int allocno_compare PARAMS ( (const PTR, const PTR  )  [static]

static void prune_preferences ( void   )  [static]

static void record_conflicts ( int *  allocno_vec,
int  len 
) [static]

Definition at line 1377 of file global.c.

References allocno_row_words, hard_regs_live, and IOR_HARD_REG_SET.

Referenced by global_conflicts().

static void record_one_conflict ( int  regno  )  [static]

static void reg_becomes_live ( rtx  reg,
setter  ,
void regs_set 
) [static]

static void reg_dies ( int  regno,
enum machine_mode  mode,
struct insn_chain *  chain 
) [static]

void retry_global_alloc ( int  regno,
HARD_REG_SET  forbidden_regs 
)

static void set_preference ( rtx  dest,
rtx  src 
) [static]


Variable Documentation

struct allocno* allocno [static]

Definition at line 140 of file global.c.

int* allocno_order [static]

Definition at line 145 of file global.c.

Referenced by dump_conflicts(), global_alloc(), and prune_preferences().

int allocno_row_words [static]

INT_TYPE* allocnos_live [static]

Definition at line 242 of file global.c.

Referenced by global_alloc(), global_conflicts(), and record_one_conflict().

INT_TYPE* conflicts [static]

HARD_REG_SET eliminable_regset [static]

Definition at line 288 of file global.c.

Referenced by build_insn_chain(), and global_alloc().

HARD_REG_SET hard_regs_live [static]

Definition at line 1728 of file global.c.

Referenced by build_insn_chain(), reg_becomes_live(), and reg_dies().

int local_reg_freq[FIRST_PSEUDO_REGISTER] [static]

Definition at line 228 of file global.c.

Referenced by find_reg(), and global_alloc().

int local_reg_live_length[FIRST_PSEUDO_REGISTER] [static]

Definition at line 233 of file global.c.

Referenced by find_reg(), and global_alloc().

int local_reg_n_refs[FIRST_PSEUDO_REGISTER] [static]

Definition at line 225 of file global.c.

Referenced by find_reg(), and global_alloc().

int max_allocno [static]

int n_regs_set [static]

Definition at line 284 of file global.c.

Referenced by global_conflicts(), and mark_reg_store().

HARD_REG_SET no_global_alloc_regs [static]

Definition at line 216 of file global.c.

Referenced by global_alloc().

int* reg_allocno [static]

int* reg_may_share [static]

Definition at line 151 of file global.c.

Referenced by find_reg(), and global_alloc().

rtx* regs_set [static]

Definition at line 283 of file global.c.

Referenced by global_conflicts(), and mark_reg_store().

HARD_REG_SET regs_used_so_far [static]

Definition at line 220 of file global.c.

Referenced by find_reg(), and global_alloc().


Generated on Wed Apr 8 15:34:46 2009 for Open64 by  doxygen 1.5.6