#include <stdint.h>#include <sys/types.h>#include <alloca.h>#include "call_info.h"#include "defs.h"#include "config_cache.h"#include "access_main.h"#include "access_vector.h"#include "lnopt_main.h"#include "stab.h"#include "lwn_util.h"#include "opt_du.h"#include "lnoutils.h"#include "soe.h"#include "cond.h"#include "fb_whirl.h"#include "move.h"

Go to the source code of this file.
| #define __STDC_LIMIT_MACROS |
Definition at line 71 of file access_main.cxx.
| #define MAX_NAME_SIZE 66 |
Definition at line 101 of file access_main.cxx.
Referenced by HMB_Hoist_Expressions(), HMB_Hoist_Messy_Subscripts(), HMB_Replace_Messy_Bounds_Loop(), Hoist_Iload_Ldid_Upper_Bound_One_Level(), Hoist_Lower_Bound(), and Hoist_Upper_Bound().
Definition at line 721 of file access_main.cxx.
References Alias_Mgr, Aliased_with_region(), Array_Dependence_Graph, dg, Du_Mgr, Enclosing_Loop(), FALSE, DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_Next_Out_Edge(), DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_Out_Edge(), DIRECTED_GRAPH16< EDGE_TYPE, VERTEX_TYPE >::Get_Sink(), ARRAY_DIRECTED_GRAPH16::Get_Vertex(), ARRAY_DIRECTED_GRAPH16::Get_Wn(), LWN_ITER, LWN_WALK_TreeIter, LWN_WALK_TreeNext, NOT_ALIASED, NULL, OPCODE_is_call(), OPCODE_is_store(), OPR_ILOAD, OPR_LDID, Overlapped_base(), TRUE, wn, WN_do_body, Wn_Is_Inside(), WN_opcode(), WN_operator(), and WRITE.
Referenced by Exp_Varies_In_Loop().
Definition at line 761 of file access_main.cxx.
References Exp_Node_Varies_In_Loop(), FALSE, i, INT, TRUE, WN_kid(), and WN_kid_count().
Referenced by Hoist_Varying_Lower_Bounds_Traverse().
Definition at line 147 of file access_main.cxx.
References Array_Dependence_Graph, dg, FALSE, ARRAY_DIRECTED_GRAPH16::Get_Vertex(), i, INT, TRUE, WN_kid(), and WN_kid_count().
Referenced by Hoist_Bounds_One_Level().
Definition at line 158 of file access_main.cxx.
References Bound_Is_Too_Messy(), Build_Doloop_Stack(), STACK< T >::Clear(), Expr_Has_Vertex(), Get_Do_Loop_Info(), Hoist_Bounds_One_Level(), Hoist_Lower_Bound(), Hoist_Upper_Bound(), i, INT, DO_LOOP_INFO::LB, LNO_default_pool, LNO_local_pool, NULL, OPC_BLOCK, OPR_DO_LOOP, OPR_LDID, DO_LOOP_INFO::UB, UBexp(), UBvar(), wn, WN_do_body, WN_end, WN_first(), WN_index, WN_kid(), WN_kid0(), WN_kid_count(), WN_next(), WN_opcode(), WN_operator(), and WN_start.
Referenced by Auto_Parallelization(), Hoist_Bounds_One_Level(), IFMM_Sink(), Mark_Auto_Parallelizable_Loops(), and SNL_Phase().
Definition at line 198 of file access_main.cxx.
References DU_MANAGER::Add_Def_Use(), Be_Type_Tbl, Build_Doloop_Stack(), STACK< T >::Clear(), Create_Preg(), CXX_DELETE, CXX_NEW, Du_Mgr, STACK< T >::Elements(), FmtAssert, Get_Do_Loop_Info(), SLIST::Head(), Hoist_Statement(), Hoistable_Statement(), i, INT, ACCESS_VECTOR::Is_Const(), LNO_default_pool, LNO_local_pool, Loop_Depth(), LWN_CreateLdid(), LWN_CreateStid(), LWN_Get_Parent, LWN_Insert_Block_After(), LWN_ITER, LWN_Set_Parent, LWN_WALK_TreeIter, LWN_WALK_TreeNext, MAX_NAME_SIZE, MTYPE_To_PREG, MTYPE_V, NULL, Num_Upper_Bounds(), OPCODE_make_op(), OPR_DO_LOOP, OPR_ILOAD, OPR_LDID, OPR_MPY, OPR_STID, ACCESS_ARRAY::Pool(), preg_counter, ACCESS_ARRAY::Set_UB(), sprintf(), stack, DO_LOOP_INFO::Step, TYPE_ID, DO_LOOP_INFO::UB, UBexp(), UBvar(), DU_MANAGER::Ud_Get_Def(), WN_desc(), WN_end, WN_index, WN_kid(), WN_kid0(), WN_kid_count(), WN_opcode(), WN_operator(), and WN_start.
Referenced by Processor_2D_Tile_Loop(), and Processor_3D_Tile_Loop().
| BOOL Hoist_Lower_Bound | ( | WN * | wn_loop, | |
| DOLOOP_STACK * | stack, | |||
| MEM_POOL * | pool | |||
| ) |
Definition at line 102 of file access_main.cxx.
References BOOL, ACCESS_VECTOR::Const_Offset, CXX_DELETE, CXX_NEW, Du_Mgr, STACK< T >::Elements(), FALSE, FmtAssert, Get_Do_Loop_Info(), INT, ACCESS_VECTOR::Is_Const(), DO_LOOP_INFO::LB, MAX_NAME_SIZE, NULL, Num_Lower_Bounds(), ACCESS_ARRAY::Pool(), preg_counter, Promote_Messy_Bound(), ACCESS_ARRAY::Set_LB(), sprintf(), DO_LOOP_INFO::Step, TRUE, UBvar(), WN_end, WN_kid0(), and WN_start.
Referenced by Hoist_Bounds_One_Level(), Hoist_Varying_Lower_Bounds_Traverse(), LNO_Build_Do_Access(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), and Tile_Loop().
| BOOL Hoist_Upper_Bound | ( | WN * | wn_loop, | |
| DOLOOP_STACK * | stack, | |||
| MEM_POOL * | pool | |||
| ) |
Definition at line 125 of file access_main.cxx.
References BOOL, CXX_DELETE, CXX_NEW, Du_Mgr, STACK< T >::Elements(), FALSE, FmtAssert, Get_Do_Loop_Info(), INT, ACCESS_VECTOR::Is_Const(), MAX_NAME_SIZE, NULL, Num_Upper_Bounds(), ACCESS_ARRAY::Pool(), preg_counter, Promote_Messy_Bound(), ACCESS_ARRAY::Set_UB(), sprintf(), DO_LOOP_INFO::Step, TRUE, DO_LOOP_INFO::UB, UBexp(), UBvar(), and WN_end.
Referenced by Hoist_Bounds_One_Level(), LNO_Build_Do_Access(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), and Tile_Loop().
Definition at line 804 of file access_main.cxx.
References Hoist_Varying_Lower_Bounds_Traverse().
Referenced by Lnoptimizer().
Definition at line 780 of file access_main.cxx.
References Build_Doloop_Stack(), Exp_Varies_In_Loop(), Hoist_Lower_Bound(), i, INT, LNO_default_pool, LNO_local_pool, NULL, OPC_BLOCK, OPC_DO_LOOP, wn, WN_first(), WN_kid(), WN_kid0(), WN_kid_count(), WN_next(), WN_opcode(), and WN_start.
Referenced by Hoist_Varying_Lower_Bounds().
| void LNO_Build_Access | ( | WN * | wn, | |
| DOLOOP_STACK * | stack, | |||
| MEM_POOL * | pool, | |||
| INDX_RANGE_STACK * | irs, | |||
| BOOL | Hoist_Bounds | |||
| ) |
Definition at line 281 of file access_main.cxx.
References abs, ACCESS_VECTOR::Const_Offset, DO_LOOP_INFO::Est_Max_Iterations_Index, DO_LOOP_INFO::Est_Num_Iterations, FALSE, INT, INT64, ACCESS_VECTOR::Is_Const(), Is_True, LNO_Build_Access(), LNO_Build_Access_Array(), LNO_Build_Do_Access(), LNO_Build_If_Access(), LNO_Info_Map, INDX_RANGE::Maxsize(), DO_LOOP_INFO::Num_Iterations_Symbolic, OPC_BLOCK, OPC_DO_LOOP, OPC_IF, OPCODE_is_leaf(), OPR_ARRAY, STACK< T >::Pop(), STACK< T >::Push(), step(), DO_LOOP_INFO::Step, STACK< T >::Top_nth(), INDX_RANGE::Valid, WN_first(), WN_kid(), WN_kid_count(), WN_MAP_Get, WN_next(), WN_opcode(), and WN_operator().
Definition at line 264 of file access_main.cxx.
References CXX_DELETE, CXX_NEW, LNO_Build_Access(), LNO_local_pool, MEM_POOL_Pop, MEM_POOL_Push, and stack.
Referenced by analyze_stmts_in_func_for_if(), Auto_Parallelization(), Constant_Propogate(), Create_Initialize_Loop(), Create_Simple_Shackle_Loops(), Forward_Substitute_Ldids(), Freeze_Numthreads_Ldid(), Fuse(), Gather_Scatter_Scalar_Expand(), ARA_LOOP_INFO::Generate_Copyout_Loop(), ARA_LOOP_INFO::Generate_Parallel_Pragma(), HAB_Copy_Array_Deps(), HMB_Copy_Array_Deps(), HMB_Hoist_Expressions(), HMB_Hoist_Messy_Subscripts(), IPA_LNO_Evaluate_Array_Formals(), Lego_OZero_Driver(), Lego_Skew_Loop(), LNO_Build_Access(), Lnoptimizer(), ARRAY_LOWER_REF::Lower_Array_Expr(), MIR_Replace(), Mp_Collapse_Cleanup(), Parallelize_Doacross_Loop(), Phase_123(), Post_loop_peeling(), Pre_loop_peeling(), Processor_2D_Tile_Loop(), Processor_3D_Tile_Loop(), Rebuild_Access_Arrays(), Remove_Unity_Trip_Loop(), RV_Reverse_Loop(), Scalar_Expand(), SNL_Distribute(), SNL_GEN_2D_Regtile(), SNL_GEN_U_Ctiling(), SNL_INV_Scalar_Expand_Tile(), SNL_INV_SE_Distribute(), SNL_Lift_Lego_Tile_Loops_Once(), SNL_Lift_Lego_Tile_Loops_Shifts(), SNL_Peel_Iteration(), SNL_Rebuild_Access_Arrays(), Tile_Loop(), Transform_Code(), Transpose_For_MP(), Unify_Loop(), Vintrinsic_Fission(), and Wind_Down().
| void LNO_Build_Access_Array | ( | WN * | wn, | |
| DOLOOP_STACK * | stack, | |||
| MEM_POOL * | pool, | |||
| INDX_RANGE_STACK * | irs | |||
| ) |
Definition at line 383 of file access_main.cxx.
References CXX_NEW, STACK< T >::Elements(), LNO_Info_Map, LNO_Update_Indx_Range(), ACCESS_ARRAY::Set_Array(), WN_MAP_Set, and WN_num_dim.
Referenced by BS_Collect_Array(), Fix_Access_Arrays_In_Copy_Block(), LNO_Build_Access(), and Mp_Fix_Deps().
| void LNO_Build_Do_Access | ( | WN * | wn, | |
| DOLOOP_STACK * | stack, | |||
| BOOL | Hoist_Bounds | |||
| ) |
Definition at line 398 of file access_main.cxx.
References FB_FREQ::_value, BOOL, Bound_Is_Too_Messy(), ACCESS_VECTOR::Const_Offset, Cur_PU_Feedback, CXX_NEW, DO_LOOP_INFO::Depth, ACCESS_ARRAY::Dim(), STACK< T >::Elements(), DO_LOOP_INFO::Est_Num_Iterations, FALSE, FmtAssert, fprintf(), FB_Info_Loop::freq_back, FB_Info_Loop::freq_iterate, FB_Info_Loop::freq_out, FB_Info_Loop::freq_positive, Hoist_Lower_Bound(), Hoist_Upper_Bound(), i, INT, INT32, INT64, INT8, ACCESS_VECTOR::Is_Const(), Is_True, DO_LOOP_INFO::LB, LNO_Info_Map, LNO_Verbose, ACCESS_VECTOR::Loop_Coeff(), NULL, DO_LOOP_INFO::Num_Iterations_Profile, DO_LOOP_INFO::Num_Iterations_Symbolic, Num_Lower_Bounds(), Num_Upper_Bounds(), ACCESS_ARRAY::Num_Vec(), OPCODE_is_compare(), OPR_ADD, OPR_LDID, OPR_STID, OPR_SUB, pool, DO_LOOP_INFO::Pool(), STACK< T >::Pop(), STACK< T >::Push(), FEEDBACK::Query_loop(), s, ACCESS_VECTOR::Set(), DO_LOOP_INFO::Set_Est_Num_Iterations(), ACCESS_ARRAY::Set_LB(), ACCESS_ARRAY::Set_UB(), SYMBOL::St(), step(), DO_LOOP_INFO::Step, symbol, ACCESS_VECTOR::Too_Messy, ACCESS_ARRAY::Too_Messy, TRUE, DO_LOOP_INFO::UB, UBvar(), WN_end, WN_index, WN_kid(), WN_MAP32_Get, WN_MAP_FEEDBACK, WN_MAP_Get, WN_opcode(), WN_operator(), WN_start, and WN_step.
Referenced by Create_Initialize_Loop(), HMB_Replace_Messy_Bounds_Loop(), LNO_Build_Access(), Perform_Gather_Scatter(), Post_loop_peeling(), and Pre_loop_peeling().
| void LNO_Build_If_Access | ( | WN * | wn, | |
| DOLOOP_STACK * | stack | |||
| ) |
Definition at line 587 of file access_main.cxx.
References BOOL, compare, IF_INFO::Condition, IF_INFO::Condition_On_Then, Cur_PU_Feedback, CXX_NEW, STACK< T >::Elements(), FALSE, float, fprintf(), IF_INFO::Freq_False, IF_INFO::Freq_True, info, INT, INT32, Is_True, LNO_Info_Map, LNO_Verbose, Num_Lands(), Num_Liors(), OPC_IF, OPR_CIOR, OPR_LIOR, OPR_LNOT, pool, IF_INFO::Pool(), ACCESS_ARRAY::Set_IF(), TRUE, WN_else, WN_else_is_empty, WN_if_test, WN_kid0(), WN_MAP32_Get, WN_MAP_FEEDBACK, WN_MAP_Get, WN_opcode(), WN_operator(), and WN_then.
Referenced by Add_Condition(), Convert_Do_Loops_Conditionals(), Create_Shackle_If_Per_Stmt(), Extended_Lower_Bound(), Extended_Upper_Bound(), Gen_CheckNo_DART(), Generate_If_Accesses(), Guard_A_Do(), Handle_Sink_Promotion_Case(), HMB_Compound_Guard_Test(), HMB_Simple_Guard_Test(), Initialize_Pdo_Last_Local_Index(), LNO_Build_Access(), Maybe_Handle_Sink_Promotion_Case(), Mp_Layout_Lego_Layout(), Mp_Version_Loop(), Mp_Version_Parallel_Region(), Parallelize_Doacross_Loop(), Post_loop_peeling(), Pre_loop_peeling(), Processor_Update_Outer_Tile(), Read_Pragma_Thread_Affinity(), Redundant_Condition(), Rewrite_Bounds(), SE_Guard_Tests(), SNL_GEN_2D_Regtile(), SNL_GEN_Protect_Nest_With_Conditionals(), SNL_Peel_Iteration(), PF_LOOPNODE::Split_Loops(), UT_Generate_Imperfect_If_Code(), Version_Loop(), and Version_Region().
Definition at line 689 of file access_main.cxx.
References INT, LNO_Print_Access(), LNO_Print_One_Access(), OPC_BLOCK, OPCODE_is_leaf(), WN_first(), WN_kid(), WN_kid_count(), WN_next(), and WN_opcode().
Referenced by Lego_OZero_Driver(), LNO_Print_Access(), Lnoptimizer(), and SNL_Transform().
Definition at line 641 of file access_main.cxx.
References fprintf(), info, LNO_Info_Map, NULL, OPC_DO_LOOP, OPC_IF, OPC_REGION, OPR_ARRAY, OPR_CALL, REGION_INFO::Print(), DO_LOOP_INFO::Print(), CALL_INFO::Print(), ACCESS_ARRAY::Print(), IF_INFO::Print(), WN_Is_If_MpVersion, WN_MAP_Get, WN_opcode(), and WN_operator().
Referenced by LNO_Print_Access(), and WB_access().
| static void LNO_Update_Indx_Range | ( | INDX_RANGE_STACK * | irs, | |
| ACCESS_ARRAY * | array, | |||
| WN * | wn | |||
| ) | [static] |
Definition at line 343 of file access_main.cxx.
References BOOL, STACK< T >::Bottom_nth(), ACCESS_VECTOR::Const_Offset, ACCESS_VECTOR::Contains_Lin_Symb(), ACCESS_VECTOR::Contains_Non_Lin_Symb(), ACCESS_ARRAY::Dim(), FALSE, i, INT, INT64, ACCESS_VECTOR::Loop_Coeff(), ACCESS_VECTOR::Nest_Depth(), ACCESS_VECTOR::Non_Const_Loops(), OPR_INTCONST, sz(), ACCESS_VECTOR::Too_Messy, ACCESS_ARRAY::Too_Messy, TRUE, WN_array_dim, WN_const_val(), WN_element_size(), WN_num_dim, and WN_operator().
Referenced by LNO_Build_Access_Array().
| BOOL Promote_Messy_Bound | ( | WN * | wn_loop, | |
| WN * | wn_bound, | |||
| char | name[], | |||
| DU_MANAGER * | du | |||
| ) |
Referenced by Hoist_Lower_Bound(), and Hoist_Upper_Bound().
INT preg_counter = 0 [static] |
Definition at line 96 of file access_main.cxx.
Referenced by HMB_Hoist_Expressions(), HMB_Hoist_Messy_Subscripts(), HMB_Replace_Messy_Bounds_Loop(), Hoist_Iload_Ldid_Upper_Bound_One_Level(), Hoist_Lower_Bound(), and Hoist_Upper_Bound().
1.5.6