osprey/be/lno/snl_trans.h File Reference

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

Go to the source code of this file.

Defines

#define snl_trans_INCLUDED   "snl_trans.h"

Functions/Subroutines

void SNL_Change_Reduction_Loop_Stmts (SX_PLIST *plist, WN *from, WN *to)
void SNL_Expand_Reduction_Deps (WN *loop)
BOOL SNL_Test_Reduction_Lexneg (EINDEX16 e, WN *awn, WN *bwn, INT alex, INT blex)
SNL_REGION SNL_Remove_Unity_Trip_Loop (WN *wdloop, BOOL update_access)
SNL_REGION SNL_Remove_Useless_Loops (WN *wn_tree, BOOL update_access)
void Remove_Useless_Loops (SNL_REGION *region)
void Print_Interchange (FILE *file, WN *outer_loop, INT permutation[], INT nloops)
void Prompf_Interchange (WN *wn_outer, INT permutation[], INT nloops)
void Prompf_Interchanges (WN *wn_outer, INT permutation[], INT nloops)
void LNO_FB_Inv_Interchange (WN *wn_outer, INT permutation[], INT nloops)
void LNO_FB_MP_Tile (WN *wn_tile_loop, INT tile_loop_tripcount, WN *wn_orig_loop)
WNSNL_Permute_Loops (WN *wn_outer, WN *wn_inner, INT permutation[], INT nloops, BOOL invariant, BOOL warn_lexneg)
BOOL SNL_Update_Strip_Dependence (INT current_depth, INT s, INT i_for_s, EINDEX16 e, WN *awn, WN *bwn, INT alex, INT blex)
WNTile_Loop (WN *wn_loop, INT tile_size, INT tile_level, SNL_INV_CACHE_BLOCK_REASON reason, SYMBOL *outersym, MEM_POOL *pool)
SNL_REGION SNL_Regtile_Loop (WN *outerloop, INT u, INT nloops, BOOL unroll_just_inner, EST_REGISTER_USAGE est_register_usage, SX_INFO *pinfo, INT pinfo_depth, BOOL no_further_unroll, HASH_TABLE< WN *, WN * > **loop_map_ptr=NULL, SX_INFO **wdpinfo_ptr=NULL)


Define Documentation

#define snl_trans_INCLUDED   "snl_trans.h"

Description:

This file contains functions and classes for the transformation of simply nested loops. Code specific to general transformation is given in snl_gen.cxx, while code specific to invariant transformation is given in snl_inv.cxx.

The actual transformation theory is discussed in doc/Mongoose /snl-transformation.mif.

The assumption is that access vectors are up to date upon entry to SNL processing. I do not keep them up-to-date during the SNL transformation process, because while they are very useful for me to gather the information I need, the information I gather is actually tailored to my needs (SNL_NEST_INFO and SNL_TRANS_INDEX_DATA). But the access vectors are used by SNL_NEST_INFO().

For loop distribution, a dependence test is supplied, and it's noted where distribution would have to occur to make things legal. Then, if is a transformation is applied that can benefit by distribution, then distribution is applied at that point.

UPDATING DU/UD INFORMATION:

For invariant nests:

-- interchange involves no changes. -- cache tiling involves making new variables for tile indices, and using them only in bounds further in. Also, the bounds for the tile index loops themselves. But all the information is right there. -- regtiling is fine, since as long as everything is up-to-date before, then the copy routines do the right thing.

For general nests:

-- Protect_Nest_With_Conditionals: easy, since this only involves defs for the variables in the bounds information. -- U_Ctiling() uses SNL_TRANS_INDEX_DATA, which is augmented to include the defs for each index variable. So as long as that data structure is passed around when doing copies, no problem. -- General_2D_Regtile. Again as long as things are up-to-date before this code, no problem.

TODO: The Fix_Do_Du_Info() is a hack. Isn't there some better way to update index variable du chains? Can't I let them all rot and recompute them at the end (they're easy)? This might be too slow. It's not well thought out about what the minimal number of calls to it would be.

Definition at line 92 of file snl_trans.h.


Function Documentation

void LNO_FB_Inv_Interchange ( WN wn_outer,
INT  permutation[],
INT  nloops 
)

void LNO_FB_MP_Tile ( WN wn_tile_loop,
INT  tile_loop_tripcount,
WN wn_orig_loop 
)

void Print_Interchange ( FILE file,
WN outer_loop,
INT  permutation[],
INT  nloops 
)

void Prompf_Interchange ( WN wn_outer,
INT  permutation[],
INT  nloops 
)

void Prompf_Interchanges ( WN wn_outer,
INT  permutation[],
INT  nloops 
)

void Remove_Useless_Loops ( SNL_REGION region  ) 

void SNL_Change_Reduction_Loop_Stmts ( SX_PLIST plist,
WN from,
WN to 
)

void SNL_Expand_Reduction_Deps ( WN loop  ) 

WN* SNL_Permute_Loops ( WN wn_outer,
WN wn_inner,
INT  permutation[],
INT  nloops,
BOOL  invariant,
BOOL  warn_lexneg 
)

SNL_REGION SNL_Regtile_Loop ( WN outerloop,
INT  u,
INT  nloops,
BOOL  unroll_just_inner,
EST_REGISTER_USAGE  est_register_usage,
SX_INFO pinfo,
INT  pinfo_depth,
BOOL  no_further_unroll,
HASH_TABLE< WN *, WN * > **  loop_map_ptr = NULL,
SX_INFO **  wdpinfo_ptr = NULL 
)

Definition at line 1079 of file snl_trans.cxx.

References above, Add_To_Symbol(), Array_Dependence_Graph, BOOL, buf, Create_Preg_Symbol(), CXX_DELETE, CXX_DELETE_ARRAY, CXX_NEW, CXX_NEW_ARRAY, d, DevWarn, dg, Do_Depth(), Do_Loop_Depth(), Do_Wtype(), Du_Mgr, SX_INFO::Enter(), DO_LOOP_INFO::Est_Max_Iterations_Index, FALSE, Find_Next_Innermost_Do(), CHAIN_ITER::First(), SNL_REGION::First, EST_REGISTER_USAGE::Fits(), FmtAssert, Get_Do_Loop_Info(), i, ii, SX_PNODE::ILLEGAL, Increase_By(), INT, INT64, CHAIN_ITER::Is_Empty(), PROMPF_INFO::Is_Enabled(), Is_True, Iterations(), SNL_REGION::Last, LNO_Erase_Dg_From_Here_In(), LNO_Info_Map, LNO_Outer_Unroll_Min_For_Further_Unroll, loop_id, LWN_Copy_Frequency(), LWN_Copy_Tree(), LWN_Create_Block_From_Stmts_Above(), LWN_Create_Block_From_Stmts_Below(), LWN_Delete_Tree(), LWN_Get_Parent, LWN_Insert_Block_After(), LWN_Insert_Block_Before(), LWN_Scale_Frequency(), LWN_Scale_Frequency_Tree(), LWN_Set_Parent, Make_Loop_Mapping(), n, Name, SYMBOL::Name(), CHAIN_ITER::Next(), NULL, offset, OPR_INTCONST, SX_INFO::Plist, Prompf_Id_Map, Prompf_Info, red_manager, region, PROMPF_INFO::Register_Tile(), Replace_Symbols(), SX_PNODE::SE_NOT_REQD, SX_PNODE::SE_REQD, EST_REGISTER_USAGE::Set_Fits(), SNL_Add_Du_To_Index_Ldid(), SNL_local_pool, SNL_Regtile_Loop(), SNL_UBexp(), sprintf(), Step_Size(), TRUE, SYMBOL::Type, TYPE_ID, Unmapped_Vertices_Here_Out(), REDUCTION_MANAGER::Unroll_Update(), Unrolled_DU_Update(), Valid_SNL_Region(), Wind_Down(), wn, WN_const_val(), WN_CreateBlock, WN_do_body, WN_end, WN_first(), WN_index, WN_kid0(), WN_MAP32_Get, WN_next(), WN_offset(), WN_operator(), WN_prev(), WN_st(), WN_start, and WN_step.

Referenced by SNL_GEN_2D_Regtile(), SNL_INV_Register_Tile(), and SNL_Regtile_Loop().

SNL_REGION SNL_Remove_Unity_Trip_Loop ( WN wdloop,
BOOL  update_access 
)

SNL_REGION SNL_Remove_Useless_Loops ( WN wn_tree,
BOOL  update_access 
)

BOOL SNL_Test_Reduction_Lexneg ( EINDEX16  e,
WN awn,
WN bwn,
INT  alex,
INT  blex 
)

BOOL SNL_Update_Strip_Dependence ( INT  current_depth,
INT  s,
INT  i_for_s,
EINDEX16  e,
WN awn,
WN bwn,
INT  alex,
INT  blex 
)

WN* Tile_Loop ( WN wn_loop,
INT  tile_size,
INT  tile_level,
SNL_INV_CACHE_BLOCK_REASON  reason,
SYMBOL outersym,
MEM_POOL pool 
)


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