osprey-gcc-4.2.0/gcc/rtl-factoring.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "obstack.h"
#include "basic-block.h"
#include "resource.h"
#include "flags.h"
#include "ggc.h"
#include "regs.h"
#include "params.h"
#include "expr.h"
#include "tm_p.h"
#include "tree-pass.h"
#include "tree-flow.h"
#include "timevar.h"
#include "output.h"
#include "addresses.h"

Include dependency graph for rtl-factoring.c:

Go to the source code of this file.

Data Types

type  matching_seq_def
type  pattern_seq_def
type  seq_block_def
type  hash_bucket_def
type  hash_elem_def

Defines

#define ABSTRACTABLE_INSN_P(X)   (INSN_P (X) && !JUMP_P (X))
#define HASH_INIT   1023
#define SEQ_CALL_COST_MULTIPLIER   2
#define RECOMPUTE_COST(SEQ)

Typedefs

typedef struct matching_seq_defmatching_seq
typedef struct pattern_seq_defpattern_seq
typedef struct seq_block_defseq_block
typedef struct hash_bucket_defp_hash_bucket
typedef struct hash_elem_defp_hash_elem

Functions/Subroutines

static rtx prev_insn_in_block (rtx insn)
static unsigned int compute_hash (rtx insn)
static int compute_rtx_cost (rtx insn)
static void matching_length (rtx insn1, rtx insn2, int *len, int *cost)
static void match_seqs (p_hash_elem e0, p_hash_elem e1)
static void collect_pattern_seqs (void)
static void renumbered_reg_set_to_hard_reg_set (HARD_REG_SET *hregs, regset regs)
static void clear_regs_live_in_seq (HARD_REG_SET *regs, rtx insn, int length)
static void recompute_gain_for_pattern_seq (pattern_seq pseq)
static void free_pattern_seq (pattern_seq pseq)
static void recompute_gain (void)
static void erase_from_pattern_seqs (rtx insn, int len)
static void update_pattern_seqs (void)
static void determine_seq_blocks (void)
static rtx gen_symbol_ref_rtx_for_label (rtx label)
static rtx block_label_after (rtx insn)
static void split_blocks_after_seqs (void)
static void split_pattern_seq (void)
static void erase_matching_seqs (void)
static void free_seq_blocks (void)
static void abstract_best_seq (void)
static void dump_pattern_seqs (void)
static void dump_best_pattern_seq (int iter)
static unsigned int htab_hash_bucket (const void *p)
static int htab_eq_bucket (const void *p0, const void *p1)
static void htab_del_bucket (void *p)
static unsigned int htab_hash_elem (const void *p)
static int htab_eq_elem (const void *p0, const void *p1)
static void htab_del_elem (void *p)
static void fill_hash_bucket (void)
static void compute_init_costs (void)
static void rtl_seqabstr (void)
static bool gate_rtl_seqabstr (void)
static unsigned int rest_of_rtl_seqabstr (void)

Variables

static htab_t hash_buckets
static pattern_seq pattern_seqs
static seq_block seq_blocks
static int seq_call_cost
static int seq_jump_cost
static int seq_return_cost
struct tree_opt_pass pass_rtl_seqabstr


Define Documentation

#define ABSTRACTABLE_INSN_P ( X   )     (INSN_P (X) && !JUMP_P (X))

Definition at line 135 of file rtl-factoring.c.

Referenced by fill_hash_bucket().

#define HASH_INIT   1023

Definition at line 138 of file rtl-factoring.c.

Referenced by fill_hash_bucket(), and rtl_seqabstr().

#define RECOMPUTE_COST ( SEQ   ) 

Value:

{                                                           \
  int l;                                                    \
  rtx x = SEQ->insn;                                        \
  SEQ->cost = 0;                                            \
  for (l = 0; l < SEQ->abstracted_length; l++)              \
    {                                                       \
      SEQ->cost += compute_rtx_cost (x);                    \
      x = prev_insn_in_block (x);                           \
    }                                                       \
}

Definition at line 147 of file rtl-factoring.c.

Referenced by recompute_gain_for_pattern_seq().

#define SEQ_CALL_COST_MULTIPLIER   2

Definition at line 143 of file rtl-factoring.c.

Referenced by compute_init_costs().


Typedef Documentation


Function Documentation

static void abstract_best_seq ( void   )  [static]

static rtx block_label_after ( rtx  insn  )  [static]

static void clear_regs_live_in_seq ( HARD_REG_SET *  regs,
rtx  insn,
int  length 
) [static]

static void collect_pattern_seqs ( void   )  [static]

static unsigned int compute_hash ( rtx  insn  )  [static]

Definition at line 295 of file rtl-factoring.c.

References INSN_CODE, prev, and prev_insn_in_block().

Referenced by compute_rtx_cost(), and fill_hash_bucket().

static void compute_init_costs ( void   )  [static]

static int compute_rtx_cost ( rtx  insn  )  [static]

static void determine_seq_blocks ( void   )  [static]

static void dump_best_pattern_seq ( int  iter  )  [static]

static void dump_pattern_seqs ( void   )  [static]

static void erase_from_pattern_seqs ( rtx  insn,
int  len 
) [static]

static void erase_matching_seqs ( void   )  [static]

static void fill_hash_bucket ( void   )  [static]

static void free_pattern_seq ( pattern_seq  pseq  )  [static]

static void free_seq_blocks ( void   )  [static]

static bool gate_rtl_seqabstr ( void   )  [static]

Definition at line 1412 of file rtl-factoring.c.

static rtx gen_symbol_ref_rtx_for_label ( rtx  label  )  [static]

static void htab_del_bucket ( void p  )  [static]

Definition at line 1220 of file rtl-factoring.c.

References free(), htab_delete(), and hash_bucket_def::seq_candidates.

Referenced by rtl_seqabstr().

static void htab_del_elem ( void p  )  [static]

Definition at line 1250 of file rtl-factoring.c.

References free().

Referenced by fill_hash_bucket().

static int htab_eq_bucket ( const void p0,
const void p1 
) [static]

Definition at line 1212 of file rtl-factoring.c.

References htab_hash_bucket().

Referenced by rtl_seqabstr().

static int htab_eq_elem ( const void p0,
const void p1 
) [static]

Definition at line 1242 of file rtl-factoring.c.

References htab_hash_elem().

Referenced by fill_hash_bucket().

static unsigned int htab_hash_bucket ( const void p  )  [static]

Definition at line 1203 of file rtl-factoring.c.

References hash_bucket_def::hash.

Referenced by htab_eq_bucket(), and rtl_seqabstr().

static unsigned int htab_hash_elem ( const void p  )  [static]

Definition at line 1233 of file rtl-factoring.c.

References htab_hash_pointer, and hash_elem_def::insn.

Referenced by fill_hash_bucket(), and htab_eq_elem().

static void match_seqs ( p_hash_elem  e0,
p_hash_elem  e1 
) [static]

static void matching_length ( rtx  insn1,
rtx  insn2,
int *  len,
int *  cost 
) [static]

Definition at line 358 of file rtl-factoring.c.

References compute_rtx_cost(), PATTERN, prev_insn_in_block(), rtx_equal_p(), x1, and x2.

Referenced by match_seqs().

static rtx prev_insn_in_block ( rtx  insn  )  [static]

static void recompute_gain ( void   )  [static]

static void recompute_gain_for_pattern_seq ( pattern_seq  pseq  )  [static]

static void renumbered_reg_set_to_hard_reg_set ( HARD_REG_SET *  hregs,
regset  regs 
) [static]

static unsigned int rest_of_rtl_seqabstr ( void   )  [static]

static void rtl_seqabstr ( void   )  [static]

static void split_blocks_after_seqs ( void   )  [static]

static void split_pattern_seq ( void   )  [static]

static void update_pattern_seqs ( void   )  [static]


Variable Documentation

htab_t hash_buckets [static]

Initial value:

 {
  "seqabstr",                           
  gate_rtl_seqabstr,                    
  rest_of_rtl_seqabstr,                 
  NULL,                                 
  NULL,                                 
  0,                                    
  TV_SEQABSTR,                          
  0,                                    
  0,                                    
  0,                                    
  0,                                    
  TODO_dump_func |
  TODO_ggc_collect,                     
  'Q'                                   
}

Definition at line 1433 of file rtl-factoring.c.

Referenced by init_optimization_passes().

Definition at line 258 of file rtl-factoring.c.

Definition at line 261 of file rtl-factoring.c.

int seq_call_cost [static]

int seq_jump_cost [static]

Definition at line 267 of file rtl-factoring.c.

Referenced by compute_init_costs(), and recompute_gain_for_pattern_seq().

int seq_return_cost [static]

Definition at line 270 of file rtl-factoring.c.

Referenced by compute_init_costs(), and recompute_gain_for_pattern_seq().


Generated on Wed Apr 8 14:19:09 2009 for Open64 by  doxygen 1.5.6