osprey/be/cg/gra_mon/gra_spill.cxx File Reference

#include "import.h"
#include "defs.h"
#include "errors.h"
#include "cgir.h"
#include "cg.h"
#include "bb.h"
#include "bb_list.h"
#include "cgexp.h"
#include "cg_flags.h"
#include "cg_spill.h"
#include "cg_region.h"
#include "whirl2ops.h"
#include "opt_alias_interface.h"
#include "gra_bb.h"
#include "gra_lrange.h"
#include "lrange_list.h"
#include "gra_loop.h"
#include "gra_region.h"
#include "gra_trace.h"

Include dependency graph for gra_spill.cxx:

Go to the source code of this file.

Data Types

module  SPILL_LIST

Functions/Subroutines

SPILL_LISTSPILL_LIST_Create_Lunit (LUNIT *lunit, MEM_POOL *mempool)
SPILL_LISTSPILL_LIST_Create_Gbb (GRA_BB *gbb, MEM_POOL *mempool)
void Possibly_List_LUNIT (LUNIT *lunit)
void Possibly_List_LRANGE (LRANGE *lrange)
void Gen_Spill_Restore (TN *tn, ST *spill_loc, GRA_BB *gbb, void(*gen_fn)(TN *, ST *, OPS *, CGSPILL_CLIENT, BB *), void(*add_fn)(BB *, OPS *), void(*insert_fn)(TN *, BB *, OPS *), BOOL insert_flag)
static void TN_Spill_Below (TN *tn, ST *spill_loc, GRA_BB *gbb, BOOL insert_after)
static void TN_Restore_Above (TN *tn, ST *spill_loc, GRA_BB *gbb, BOOL insert_before)
static void TN_Spill_Above (TN *tn, ST *spill_loc, GRA_BB *gbb)
static void TN_Restore_Below (TN *tn, ST *spill_loc, GRA_BB *gbb)
static void LRANGE_Spill_Above (LRANGE *lrange, GRA_BB *gbb)
static void LRANGE_Restore_Below (LRANGE *lrange, GRA_BB *gbb)
static void LRANGE_Spill_Below (LRANGE *lrange, GRA_BB *gbb)
static void LRANGE_Restore_Above (LRANGE *lrange, GRA_BB *gbb)
static void Spill_Homeable_TN (GRA_BB *gbb, TN *orig_tn, TN *new_tn, ST *st, LUNIT *lunit, LRANGE *lrange)
static TNMake_Dedicated_Save_TN (TN *save_tn, TN *dedicated_tn, ST *spill_st)
static void Spill_Prolog_Epilog_Save_LUNIT (LRANGE *lrange, LUNIT *lunit, GRA_BB *gbb, ST *st)
static void LUNIT_Spill (LUNIT *lunit)
static void LRANGE_Spill (LRANGE *lrange)
static void Identify_Initialize_Glue_Blocks (void)
static BOOL Complement_TN (const TN *tn)
static BOOL Region_TN (const TN *tn, const GRA_REGION *region)
static BOOL Uses_Region_TN (const OP *op, const GRA_REGION *region)
static void Map_Operands (TN_MAP map, OP *op)
BOOL Defines_Mapped_TN (TN_MAP map, OP *op)
static void BB_Split_Exit_Glue (BB *bb)
static void BB_Split_Entry_Glue (BB *bb)
static void Divide_Glue_Code (void)
static void Mark_Defreach_Out_Recur (LRANGE *lrange, GRA_BB *gbb)
static void Mark_Defreach_Out (LRANGE *lrange, SPILL_LIST *store_list)
static BOOL Local_Live_In (LUNIT *lunit)
static void Mark_Live_In_Recur (LRANGE *lrange, GRA_BB *gbb)
static void Mark_Live_In (LRANGE *lrange, SPILL_LIST *load_list, SPILL_LIST *store_list)
static BOOL Has_Successor_Not_In_LRANGE (GRA_BB *gbb, LRANGE *lrange, GRA_BB *exclude_succ=NULL)
static void Move_Restore_Out_Of_Region (LUNIT *lunit)
static BOOL Move_Restore_Out_Of_LRANGE (LUNIT *lunit, SPILL_LIST **spill_list)
static BOOL No_Successor_Has_Restore (SPILL_LIST *sl, LRANGE *lrange)
static BOOL Needs_Spill (LRANGE *lrange, GRA_BB *gbb)
static BOOL Has_Predecessor_Not_In_LRANGE (GRA_BB *gbb, LRANGE *lrange, GRA_BB *exclude_pred=NULL)
static void Add_To_Predecessor_Live_Out (GRA_BB *gbb, LRANGE *lrange)
static BOOL Move_Spill_Out_Of_LRANGE (LUNIT *lunit, SPILL_LIST **spill_list)
static GRA_BBRegion_Pre_Header (GRA_BB *gbb)
static BOOL Move_Spill_Code_Above_Region (LUNIT *lunit, BOOL move_restore, SPILL_LIST **spill_list)
static void Check_Split_Borders (LRANGE *lr)
static void Optimize_Placement (void)
static void Dumb_Placement (void)
static void Gen_Restores_Above_And_Spills_Below (void)
static void Gen_Spills_Above_And_Restores_Below (void)
void GRA_Spill (void)
void GRA_Note_Restore_Above (LUNIT *lunit)
void GRA_Note_Save_Below (LUNIT *lunit)
void GRA_Note_Spill (LRANGE *lrange)
void GRA_Spill_Initialize (void)
void GRA_Remove_Predicates_Save_Restore (void)

Variables

BOOL GRA_optimize_placement = TRUE
static LRANGE_LIST * spilled_lranges
static LUNITlunits_with_spills_head
static LRANGEsplit_lranges_head
static BB_LISTregion_entry_glue_bbs
static BB_LISTregion_exit_glue_bbs
static float freq_spill_count
static float freq_restore_count
static INT32 spill_count
static INT32 restore_count
float priority_count


Function Documentation

static void Add_To_Predecessor_Live_Out ( GRA_BB gbb,
LRANGE lrange 
) [static]

static void BB_Split_Entry_Glue ( BB bb  )  [static]

static void BB_Split_Exit_Glue ( BB bb  )  [static]

static void Check_Split_Borders ( LRANGE lr  )  [static]

Definition at line 2261 of file gra_spill.cxx.

Referenced by Optimize_Placement().

static BOOL Complement_TN ( const TN tn  )  [static]

BOOL Defines_Mapped_TN ( TN_MAP  map,
OP op 
) [inline]

Definition at line 1208 of file gra_spill.cxx.

References BOOL, FALSE, i, INT, OP_result, OP_results, TN_MAP_Get(), and TRUE.

Referenced by BB_Split_Exit_Glue().

static void Divide_Glue_Code ( void   )  [static]

Definition at line 1342 of file gra_spill.cxx.

References BB_Split_Entry_Glue(), BB_Split_Exit_Glue(), and NULL.

Referenced by GRA_Spill().

static void Dumb_Placement ( void   )  [static]

static void Gen_Restores_Above_And_Spills_Below ( void   )  [static]

void Gen_Spill_Restore ( TN tn,
ST spill_loc,
GRA_BB gbb,
void(*)(TN *, ST *, OPS *, CGSPILL_CLIENT, BB *)  gen_fn,
void(*)(BB *, OPS *)  add_fn,
void(*)(TN *, BB *, OPS *)  insert_fn,
BOOL  insert_flag 
) [inline]

static void Gen_Spills_Above_And_Restores_Below ( void   )  [static]

void GRA_Note_Restore_Above ( LUNIT lunit  ) 

Definition at line 2671 of file gra_spill.cxx.

References LUNIT::Lrange(), Possibly_List_LUNIT(), and LUNIT::Restore_Above_Set().

Referenced by Split_Load().

void GRA_Note_Save_Below ( LUNIT lunit  ) 

Definition at line 2682 of file gra_spill.cxx.

References Possibly_List_LUNIT(), and LUNIT::Spill_Below_Set().

Referenced by Split_Store().

void GRA_Note_Spill ( LRANGE lrange  ) 

void GRA_Remove_Predicates_Save_Restore ( void   ) 

void GRA_Spill ( void   ) 

void GRA_Spill_Initialize ( void   ) 

Definition at line 2709 of file gra_spill.cxx.

References NULL, and spilled_lranges.

Referenced by GRA_Allocate_Global_Registers().

static BOOL Has_Predecessor_Not_In_LRANGE ( GRA_BB gbb,
LRANGE lrange,
GRA_BB exclude_pred = NULL 
) [static]

static BOOL Has_Successor_Not_In_LRANGE ( GRA_BB gbb,
LRANGE lrange,
GRA_BB exclude_succ = NULL 
) [static]

static void Identify_Initialize_Glue_Blocks ( void   )  [static]

static BOOL Local_Live_In ( LUNIT lunit  )  [static]

static void LRANGE_Restore_Above ( LRANGE lrange,
GRA_BB gbb 
) [static]

static void LRANGE_Restore_Below ( LRANGE lrange,
GRA_BB gbb 
) [static]

static void LRANGE_Spill ( LRANGE lrange  )  [static]

static void LRANGE_Spill_Above ( LRANGE lrange,
GRA_BB gbb 
) [static]

static void LRANGE_Spill_Below ( LRANGE lrange,
GRA_BB gbb 
) [static]

static void LUNIT_Spill ( LUNIT lunit  )  [static]

static TN* Make_Dedicated_Save_TN ( TN save_tn,
TN dedicated_tn,
ST spill_st 
) [static]

static void Map_Operands ( TN_MAP  map,
OP op 
) [static]

Definition at line 1185 of file gra_spill.cxx.

References Complement_TN(), DevAssert, i, INT, OP_opnd, OP_opnds, TN_is_constant, TN_MAP_Set(), TN_number, and TRUE.

Referenced by BB_Split_Exit_Glue().

static void Mark_Defreach_Out ( LRANGE lrange,
SPILL_LIST store_list 
) [static]

static void Mark_Defreach_Out_Recur ( LRANGE lrange,
GRA_BB gbb 
) [static]

static void Mark_Live_In ( LRANGE lrange,
SPILL_LIST load_list,
SPILL_LIST store_list 
) [static]

static void Mark_Live_In_Recur ( LRANGE lrange,
GRA_BB gbb 
) [static]

static BOOL Move_Restore_Out_Of_LRANGE ( LUNIT lunit,
SPILL_LIST **  spill_list 
) [static]

static void Move_Restore_Out_Of_Region ( LUNIT lunit  )  [static]

static BOOL Move_Spill_Code_Above_Region ( LUNIT lunit,
BOOL  move_restore,
SPILL_LIST **  spill_list 
) [static]

static BOOL Move_Spill_Out_Of_LRANGE ( LUNIT lunit,
SPILL_LIST **  spill_list 
) [static]

static BOOL Needs_Spill ( LRANGE lrange,
GRA_BB gbb 
) [static]

static BOOL No_Successor_Has_Restore ( SPILL_LIST sl,
LRANGE lrange 
) [static]

static void Optimize_Placement ( void   )  [static]

void Possibly_List_LRANGE ( LRANGE lrange  )  [inline]

Definition at line 201 of file gra_spill.cxx.

References LRANGE::Split_List_Push(), LRANGE::Split_Listed(), and LRANGE::Split_Listed_Set().

Referenced by GRA_Spill().

void Possibly_List_LUNIT ( LUNIT lunit  )  [inline]

static GRA_BB* Region_Pre_Header ( GRA_BB gbb  )  [static]

static BOOL Region_TN ( const TN tn,
const GRA_REGION region 
) [static]

static void Spill_Homeable_TN ( GRA_BB gbb,
TN orig_tn,
TN new_tn,
ST st,
LUNIT lunit,
LRANGE lrange 
) [static]

SPILL_LIST* SPILL_LIST_Create_Gbb ( GRA_BB gbb,
MEM_POOL mempool 
) [inline]

SPILL_LIST* SPILL_LIST_Create_Lunit ( LUNIT lunit,
MEM_POOL mempool 
) [inline]

static void Spill_Prolog_Epilog_Save_LUNIT ( LRANGE lrange,
LUNIT lunit,
GRA_BB gbb,
ST st 
) [static]

static void TN_Restore_Above ( TN tn,
ST spill_loc,
GRA_BB gbb,
BOOL  insert_before 
) [static]

static void TN_Restore_Below ( TN tn,
ST spill_loc,
GRA_BB gbb 
) [static]

static void TN_Spill_Above ( TN tn,
ST spill_loc,
GRA_BB gbb 
) [static]

static void TN_Spill_Below ( TN tn,
ST spill_loc,
GRA_BB gbb,
BOOL  insert_after 
) [static]

static BOOL Uses_Region_TN ( const OP op,
const GRA_REGION region 
) [static]

Definition at line 1165 of file gra_spill.cxx.

References FALSE, i, INT, OP_opnd, OP_opnds, Region_TN(), and TRUE.

Referenced by BB_Split_Exit_Glue().


Variable Documentation

float freq_restore_count [static]

float freq_spill_count [static]

Definition at line 89 of file gra_spill.cxx.

Referenced by Move_Restore_Out_Of_LRANGE(), and Move_Spill_Out_Of_LRANGE().

Definition at line 94 of file gra_spill.cxx.

Definition at line 100 of file gra_spill.cxx.

Referenced by GRA_Spill().

Definition at line 96 of file gra_spill.cxx.

Definition at line 97 of file gra_spill.cxx.

INT32 restore_count [static]

INT32 spill_count [static]

LRANGE_LIST* spilled_lranges [static]

Definition at line 93 of file gra_spill.cxx.

Referenced by GRA_Note_Spill(), GRA_Spill(), and GRA_Spill_Initialize().

Definition at line 95 of file gra_spill.cxx.


Generated on Wed Apr 8 14:26:32 2009 for Open64 by  doxygen 1.5.6