osprey/be/lno/lego_util.h File Reference

#include "defs.h"
#include "stab.h"
#include "wn.h"
#include "access_vector.h"

Include dependency graph for lego_util.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Types

module  MP_INFO

Defines

#define HT_Push   0
#define HT_Pop   1
#define HT_Top   2
#define HT_Check   3
#define HT_Replace   4
#define Initialize_Dart   5
#define Allocate_Dart   6
#define Alloc_Reshape   7
#define Dealloc_Reshape   8
#define Migrate_Array   9
#define Unmigrate_Array   10
#define Migrate_Pages   11
#define Proc_Pool_Push   12
#define Proc_Pool_Pop   13
#define Cyclic_Bounds   14
#define Simple_Bounds   15
#define Processor_Layout   16
#define Processor_Coordinates   17
#define Dynamic_Affinity_Bounds   18
#define mp_sug_numthreads   19
#define mp_cur_numthreads   20
#define mp_my_threadnum   21
#define mp_numthreads_fn   22
#define Deallocate_Dart   23
#define Compare_Darts   24
#define ECHT_Push   25
#define ECHT_Pop   26
#define ECHT_Check   27
#define ECHT_Compare   28
#define mp_cur_numthreads_func   29
#define DST_MAX   30
#define RT_dim_struct   0
#define RT_dim_ptr   1
#define RT_struct   2
#define RT_ptr   3
#define VOID_ptr   4
#define DTY_MAX   5
#define dart_offset_num_dim   0
#define dart_offset_element_size   8
#define dart_offset_flags   16
#define dart_offset_distr_n   24
#define dart_offset_distr_p   32
#define dart_offset_distr_k   40
#define dart_offset_distr_lb   48
#define dart_base_size   3
#define dart_distr_size   4
#define ST_isGlobal(st)   (ST_Var_Kind(st) == var_global)
#define ST_isLocal(st)   (ST_Var_Kind(st) == var_local)
#define ST_isFormal(st)   (ST_Var_Kind(st) == var_formal)
#define ST_isCommon(st)   (ST_Var_Kind(st) == var_common)
#define AWN_Mpy(rtype, l, r)   AWN_Binary(OPR_MPY, rtype, l, r, FALSE)
#define AWN_Mod(rtype, l, r)   AWN_Binary(OPR_MOD, rtype, l, r, FALSE)
#define AWN_Rem(rtype, l, r)   AWN_Binary(OPR_REM, rtype, l, r, FALSE)
#define AWN_Sub(rtype, l, r)   AWN_Binary(OPR_SUB, rtype, l, r, FALSE)
#define AWN_Add(rtype, l, r)   AWN_Binary(OPR_ADD, rtype, l, r, FALSE)
#define AWN_Div(rtype, l, r)   AWN_Binary(OPR_DIV, rtype, l, r, FALSE)
#define AWN_Max(rtype, l, r)   AWN_Binary(OPR_MAX, rtype, l, r, FALSE)
#define AWN_Min(rtype, l, r)   AWN_Binary(OPR_MIN, rtype, l, r, FALSE)
#define AWN_Rem_Safe(rtype, l, r)   AWN_Binary(OPR_REM, rtype, l, r, TRUE)
#define AWN_Div_Safe(rtype, l, r)   AWN_Binary(OPR_DIV, rtype, l, r, TRUE)
#define AWN_Mod_Safe(rtype, l, r)   AWN_Binary(OPR_MOD, rtype, l, r, TRUE)
#define DB_PRINT(x)
#define VB_PRINT(x)

Enumerations

enum  VAR_KIND { var_local, var_global, var_formal, var_common }
enum  MP_SCHED_TYPE {
  MP_SCHED_UNKNOWN, MP_SCHED_SIMPLE, MP_SCHED_DYNAMIC, MP_SCHED_GSS,
  MP_SCHED_INTERLEAVE, MP_SCHED_RUNTIME, MP_SCHED_PSEUDOLOWERED
}

Functions/Subroutines

void Mp_File_Init (void)
DISTR_ARRAYLookup_DACT (ST *array_st)
VAR_KIND ST_Var_Kind (ST *)
TY_IDX Get_Original_Type (ST *st)
TY_IDX Get_Array_Type (ST *st)
WNAWN_Binary (OPERATOR opr, TYPE_ID rtype, WN *kid0, WN *kid1, BOOL can_speculate=FALSE)
WNAWN_LdidSym (SYMBOL *var)
WNAWN_StidIntoSym (SYMBOL *var, WN *val)
WNCreate_Positive_Divceil (TYPE_ID type, WN *kid0, WN *kid1, BOOL can_speculate)
void Set_Array_Dim (WN *array_expr, INT dim, WN *bound, WN *index)
void Replace_WN (WN *old_wn, WN *new_wn)
WNGet_Numthreads_Ldid (LEGO_INFO *li)
WNGet_Runtime_Numthreads_Ldid ()
WNGet_Runtime_Cur_Numthreads_Ldid ()
void Set_Runtime_Call_Side_Effects (WN *call_wn)
void Freeze_Numthreads_Ldid (WN *wn_loop)
void Freeze_Cur_Numthreads_Func (WN *wn_loop)
WNGet_Frozen_Numthreads_Ldid (WN *wn_loop)
WNGet_Runtime_Cur_Numthreads_Func (WN *wn_loop)
WNLoop_Step (WN *wn_loop)
SYMBOLCreate_Local_Symbol (char *name, TYPE_ID mtype)
WNGet_MP_Region (WN *wn)
BOOL Fixed_Size_Array_Is_Stride_One (ST *array_st)
STFind_Return_Registers (TYPE_ID type, PREG_NUM *rreg1, PREG_NUM *rreg2)
WNLego_Find_Node (SYMBOL sym, WN *wn_tree)
void Lego_Find_Nodes (OPERATOR opr, SYMBOL sym, WN *wn_tree, STACK< WN * > *stack)
mBOOL Single_Loop_Coeff (ACCESS_VECTOR *av, INT64 *stride, INT64 *offset, mINT32 *depth)
INT Get_New_Lego_Mp_Tile_Key (void)

Variables

STdistr_st_entries [DST_MAX]
TY_IDX distr_ty_entries [DTY_MAX]
TY_IDX DART_ptr_TY
BOOL PU_has_reshaped_commons
WN_MAP Safe_Spec_Map
BOOL Debug_Lego
BOOL Verbose_Lego


Define Documentation

#define Alloc_Reshape   7

#define Allocate_Dart   6

#define AWN_Add ( rtype,
l,
 )     AWN_Binary(OPR_ADD, rtype, l, r, FALSE)

#define AWN_Div ( rtype,
l,
 )     AWN_Binary(OPR_DIV, rtype, l, r, FALSE)

Definition at line 335 of file lego_util.h.

Referenced by Create_Positive_Divceil(), and Trip_Count().

#define AWN_Div_Safe ( rtype,
l,
 )     AWN_Binary(OPR_DIV, rtype, l, r, TRUE)

#define AWN_Max ( rtype,
l,
 )     AWN_Binary(OPR_MAX, rtype, l, r, FALSE)

#define AWN_Min ( rtype,
l,
 )     AWN_Binary(OPR_MIN, rtype, l, r, FALSE)

#define AWN_Mod ( rtype,
l,
 )     AWN_Binary(OPR_MOD, rtype, l, r, FALSE)

Definition at line 331 of file lego_util.h.

#define AWN_Mod_Safe ( rtype,
l,
 )     AWN_Binary(OPR_MOD, rtype, l, r, TRUE)

#define AWN_Mpy ( rtype,
l,
 )     AWN_Binary(OPR_MPY, rtype, l, r, FALSE)

#define AWN_Rem ( rtype,
l,
 )     AWN_Binary(OPR_REM, rtype, l, r, FALSE)

Definition at line 332 of file lego_util.h.

#define AWN_Rem_Safe ( rtype,
l,
 )     AWN_Binary(OPR_REM, rtype, l, r, TRUE)

#define AWN_Sub ( rtype,
l,
 )     AWN_Binary(OPR_SUB, rtype, l, r, FALSE)

#define Compare_Darts   24

#define Cyclic_Bounds   14

#define dart_base_size   3

Definition at line 259 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().

#define dart_distr_size   4

Definition at line 260 of file lego_util.h.

Referenced by Generate_Runtime_Stuff(), and Section_Variable_TY().

#define dart_offset_distr_k   40

#define dart_offset_distr_lb   48

Definition at line 256 of file lego_util.h.

Referenced by Gen_Init_DART(), and Generate_Runtime_Stuff().

#define dart_offset_distr_n   24

Definition at line 253 of file lego_util.h.

Referenced by Gen_Init_DART(), and Generate_Runtime_Stuff().

#define dart_offset_distr_p   32

Definition at line 254 of file lego_util.h.

Referenced by Gen_Symbols_In_DINFO(), Generate_Runtime_Stuff(), and Numprocs().

#define dart_offset_element_size   8

Definition at line 251 of file lego_util.h.

Referenced by Gen_Init_DART(), and Generate_Runtime_Stuff().

#define dart_offset_flags   16

Definition at line 252 of file lego_util.h.

Referenced by Gen_Init_DART(), and Generate_Runtime_Stuff().

#define dart_offset_num_dim   0

Definition at line 250 of file lego_util.h.

Referenced by Gen_Init_DART(), and Generate_Runtime_Stuff().

#define DB_PRINT (  ) 

#define Dealloc_Reshape   8

#define Deallocate_Dart   23

#define DST_MAX   30

Definition at line 233 of file lego_util.h.

Referenced by Set_Runtime_Call_Side_Effects().

#define DTY_MAX   5

Definition at line 244 of file lego_util.h.

#define Dynamic_Affinity_Bounds   18

#define ECHT_Check   27

Definition at line 228 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().

#define ECHT_Compare   28

Definition at line 229 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().

#define ECHT_Pop   26

Definition at line 227 of file lego_util.h.

Referenced by EC_Array_Portion_Calls(), and Generate_Runtime_Stuff().

#define ECHT_Push   25

Definition at line 226 of file lego_util.h.

Referenced by EC_Array_Portion_Calls(), and Generate_Runtime_Stuff().

#define HT_Check   3

#define HT_Pop   1

Definition at line 202 of file lego_util.h.

Referenced by Gen_HT_DART(), Generate_Runtime_Stuff(), and Set_Runtime_Call_Side_Effects().

#define HT_Push   0

Definition at line 201 of file lego_util.h.

Referenced by Gen_HT_DART(), Generate_Runtime_Stuff(), and Set_Runtime_Call_Side_Effects().

#define HT_Replace   4

Definition at line 205 of file lego_util.h.

Referenced by Gen_HT_DART(), Generate_Runtime_Stuff(), and Set_Runtime_Call_Side_Effects().

#define HT_Top   2

#define Initialize_Dart   5

#define Migrate_Array   9

#define Migrate_Pages   11

#define mp_cur_numthreads   20

#define mp_cur_numthreads_func   29

#define mp_my_threadnum   21

#define mp_numthreads_fn   22

#define mp_sug_numthreads   19

Definition at line 220 of file lego_util.h.

Referenced by Get_Runtime_Numthreads_Ldid(), and Init_Special_Lego_Mp_Call().

#define Proc_Pool_Pop   13

#define Proc_Pool_Push   12

#define Processor_Coordinates   17

#define Processor_Layout   16

Definition at line 217 of file lego_util.h.

Referenced by Init_Special_Lego_Mp_Call(), Mp_Layout_Call(), and Special_Lego_Or_Mp_Call().

#define RT_dim_ptr   1

Definition at line 240 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().

#define RT_dim_struct   0

#define RT_ptr   3

#define RT_struct   2

Definition at line 241 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().

#define Simple_Bounds   15

#define ST_isCommon ( st   )     (ST_Var_Kind(st) == var_common)

#define ST_isFormal ( st   )     (ST_Var_Kind(st) == var_formal)

#define ST_isGlobal ( st   )     (ST_Var_Kind(st) == var_global)

Definition at line 287 of file lego_util.h.

Referenced by New_DART().

#define ST_isLocal ( st   )     (ST_Var_Kind(st) == var_local)

#define Unmigrate_Array   10

#define VB_PRINT (  ) 

Definition at line 411 of file lego_util.h.

#define VOID_ptr   4

Definition at line 243 of file lego_util.h.

Referenced by Generate_Runtime_Stuff().


Enumeration Type Documentation

Enumerator:
MP_SCHED_UNKNOWN 
MP_SCHED_SIMPLE 
MP_SCHED_DYNAMIC 
MP_SCHED_GSS 
MP_SCHED_INTERLEAVE 
MP_SCHED_RUNTIME 
MP_SCHED_PSEUDOLOWERED 

Definition at line 353 of file lego_util.h.

enum VAR_KIND

Enumerator:
var_local 
var_global 
var_formal 
var_common 

Definition at line 283 of file lego_util.h.


Function Documentation

WN* AWN_Binary ( OPERATOR  opr,
TYPE_ID  rtype,
WN kid0,
WN kid1,
BOOL  can_speculate = FALSE 
)

WN* AWN_LdidSym ( SYMBOL var  ) 

WN* AWN_StidIntoSym ( SYMBOL var,
WN val 
)

SYMBOL* Create_Local_Symbol ( char *  name,
TYPE_ID  mtype 
)

WN* Create_Positive_Divceil ( TYPE_ID  type,
WN kid0,
WN kid1,
BOOL  can_speculate 
)

Definition at line 503 of file lego_util.cxx.

References AWN_Add, AWN_Div, AWN_Div_Safe, AWN_Sub, div(), Du_Mgr, LWN_Copy_Tree(), LWN_Make_Icon(), and sub.

ST* Find_Return_Registers ( TYPE_ID  type,
PREG_NUM rreg1,
PREG_NUM rreg2 
)

Definition at line 390 of file dra_mangle.cxx.

BOOL Fixed_Size_Array_Is_Stride_One ( ST array_st  ) 

void Freeze_Cur_Numthreads_Func ( WN wn_loop  ) 

void Freeze_Numthreads_Ldid ( WN wn_loop  ) 

TY_IDX Get_Array_Type ( ST st  ) 

WN* Get_Frozen_Numthreads_Ldid ( WN wn_loop  ) 

WN* Get_MP_Region ( WN wn  ) 

INT Get_New_Lego_Mp_Tile_Key ( void   ) 

Definition at line 1084 of file lego_util.cxx.

Referenced by Processor_2D_Tile_Loop(), and Processor_3D_Tile_Loop().

WN* Get_Numthreads_Ldid ( LEGO_INFO li  ) 

TY_IDX Get_Original_Type ( ST st  ) 

WN* Get_Runtime_Cur_Numthreads_Func ( WN wn_loop  ) 

WN* Get_Runtime_Cur_Numthreads_Ldid (  ) 

WN* Get_Runtime_Numthreads_Ldid (  ) 

WN* Lego_Find_Node ( SYMBOL  sym,
WN wn_tree 
)

void Lego_Find_Nodes ( OPERATOR  opr,
SYMBOL  sym,
WN wn_tree,
STACK< WN * > *  stack 
)

DISTR_ARRAY* Lookup_DACT ( ST array_st  ) 

WN* Loop_Step ( WN wn_loop  ) 

void Mp_File_Init ( void   ) 

void Replace_WN ( WN old_wn,
WN new_wn 
)

void Set_Array_Dim ( WN array_expr,
INT  dim,
WN bound,
WN index 
)

void Set_Runtime_Call_Side_Effects ( WN call_wn  ) 

mBOOL Single_Loop_Coeff ( ACCESS_VECTOR av,
INT64 stride,
INT64 offset,
mINT32 depth 
)

VAR_KIND ST_Var_Kind ( ST  ) 


Variable Documentation

ST* distr_st_entries[DST_MAX]

Definition at line 126 of file lego.cxx.

Referenced by Lego_Lower_Pragmas(), Lego_PU_Init(), and Read_Pragma_Distribute_Reshape().

Definition at line 121 of file lego.cxx.

Referenced by AWN_Binary(), Fast_32_Div(), Fast_32_Rem(), Hoist_Place(), and Lnoptimizer().


Generated on Wed Apr 8 14:33:30 2009 for Open64 by  doxygen 1.5.6