#include <stdint.h>#include <alloca.h>#include "defs.h"#include "tracing.h"#include "cgir.h"#include "cg_loop.h"#include "cg_flags.h"#include "cg_sched_est.h"#include "cxx_memory.h"#include "hb_sched.h"

Go to the source code of this file.
| #define __STDC_LIMIT_MACROS |
Definition at line 41 of file cg_sched_est.cxx.
| #define LATENCY_IGNORE ((UINT32)-2) |
Definition at line 60 of file cg_sched_est.cxx.
Referenced by Calc_Latency_To(), CG_SCHED_EST_Ignore_Op(), Critical_Path_Len(), and Latency_Thru().
| #define LATENCY_NOT_COMPUTED ((UINT32)-1) |
Definition at line 59 of file cg_sched_est.cxx.
Referenced by Critical_Path_Len(), and Latency_Thru().
| static void Append_Mappings | ( | CG_SCHED_EST * | to, | |
| CG_SCHED_EST * | from | |||
| ) | [static] |
Definition at line 692 of file cg_sched_est.cxx.
References BB_id, BB_MAP32_Get(), BB_MAP32_Set(), BB_MAP_Get(), BB_MAP_Set(), cg_sched_est::contents, DevAssert, INT32, cg_sched_est::latency_to_map, order, and cg_sched_est::order.
Referenced by CG_SCHED_EST_Append_Scheds().
| static float Avg_Cost_Path | ( | BB_SET * | region, | |
| BB * | entry, | |||
| BB_MAP | ests, | |||
| SCHED_EST_TYPE | type | |||
| ) | [static] |
Definition at line 551 of file cg_sched_est.cxx.
References abs, BB_freq, BB_id, BB_MAP_Get(), CG_SCHED_EST_Critical_Length(), CG_SCHED_EST_Cycles(), CG_SCHED_EST_Resource_Cycles(), Enable_SWP, fprintf(), SCHED_EST_FOR_SWP, TFile, tracing, UINT32, and umax().
Referenced by CG_SCHED_EST_Avg_Cycles_Thru().
| static UINT32 Calc_Latency_To | ( | CG_SCHED_EST * | se, | |
| OP * | op | |||
| ) | [static] |
Definition at line 141 of file cg_sched_est.cxx.
References alloca, ARC_has_opnd(), ARC_latency, ARC_LIST_first, ARC_LIST_rest(), ARC_omega, ARC_opnd, ARC_pred, bzero(), CG_DEP_Latency(), CG_DEP_REGIN, CG_SCHED_EST_calc_dep_graph, Find_Reaching_Def(), Get_Latency_To(), i, INT, Is_True, LATENCY_IGNORE, Latency_Thru(), mBOOL, OP_opnds, OP_preds, preds, Set_Latency_To(), TRUE, UINT32, UINT8, umax(), and cg_sched_est::use_dep_graph.
Referenced by Latency_Thru().
| void CG_SCHED_EST_Append_Scheds | ( | CG_SCHED_EST * | se, | |
| CG_SCHED_EST * | other_se | |||
| ) |
Definition at line 710 of file cg_sched_est.cxx.
Referenced by CG_SCHED_EST_Region_Cycles(), Cloned_Gain(), CG_LOOP::Determine_SWP_Unroll_Factor(), Loop_Amenable_For_SWP(), Path_Resources_Available(), and Select_Blocks().
| float CG_SCHED_EST_Avg_Cycles_Thru | ( | BB_SET * | region, | |
| BB * | entry, | |||
| BB_MAP | ests, | |||
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 598 of file cg_sched_est.cxx.
References Avg_Cost_Path().
Referenced by CG_SCHED_EST_Region_Cycles(), and LOOP_DESCR_Estimate_Cycles().
| UINT32 CG_SCHED_EST_BB_Cycles | ( | BB * | bb, | |
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 671 of file cg_sched_est.cxx.
References CG_SCHED_EST_Create(), CG_SCHED_EST_Cycles(), CG_SCHED_EST_Delete(), MEM_local_nz_pool, MEM_POOL_Pop, MEM_POOL_Push, and UINT32.
Referenced by Schedule_BB_For_GCM().
| CG_SCHED_EST* CG_SCHED_EST_Clone | ( | CG_SCHED_EST * | se, | |
| MEM_POOL * | pool | |||
| ) |
Definition at line 428 of file cg_sched_est.cxx.
References BB_MAP32_Create, BB_MAP_Create, cg_sched_est::cached_crit_path_len, cg_sched_est::cached_resource_cycles, Clone_Mappings(), cg_sched_est::contents, cg_sched_est::latency_to_map, cg_sched_est::latency_to_map_dirty, MEM_POOL_Alloc, cg_sched_est::order, cg_sched_est::res_count, cg_sched_est::sched_cycles, TI_RES_COUNT_Add(), TI_RES_COUNT_Alloc(), and cg_sched_est::use_dep_graph.
Referenced by Path_Resources_Available().
| CG_SCHED_EST* CG_SCHED_EST_Create | ( | BB * | bb, | |
| MEM_POOL * | pool, | |||
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 325 of file cg_sched_est.cxx.
Referenced by CG_SCHED_EST_BB_Cycles(), CG_SCHED_EST_Path_Create(), CG_SCHED_EST_Region_Cycles(), Create_Sched_Est(), CG_LOOP::Determine_SWP_Unroll_Factor(), Fix_Recurrences_Before_Unrolling(), Loop_Amenable_For_SWP(), LOOP_DESCR_Estimate_Cycles(), and Shorten_Critical_Recurrence_By_Reassociation().
| CG_SCHED_EST* CG_SCHED_EST_Create_Empty | ( | MEM_POOL * | pool, | |
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 284 of file cg_sched_est.cxx.
References BB_MAP32_Create, BB_MAP_Create, cg_sched_est::contents, FALSE, cg_sched_est::latency_to_map, cg_sched_est::latency_to_map_dirty, MEM_POOL_Alloc, cg_sched_est::order, PU_BB_Count, cg_sched_est::res_count, cg_sched_est::sched_cycles, SCHED_EST_USE_DEP_GRAPH, TI_RES_COUNT_Alloc(), TRUE, and cg_sched_est::use_dep_graph.
Referenced by CG_SCHED_EST_Create(), CG_SCHED_EST_Path_Create(), and Select_Blocks().
| UINT32 CG_SCHED_EST_Critical_Length | ( | CG_SCHED_EST * | se | ) |
Definition at line 641 of file cg_sched_est.cxx.
References cg_sched_est::cached_crit_path_len, and Critical_Path_Len().
Referenced by Avg_Cost_Path().
| UINT32 CG_SCHED_EST_Cycles | ( | CG_SCHED_EST * | se | ) |
Definition at line 652 of file cg_sched_est.cxx.
Referenced by Avg_Cost_Path(), CG_SCHED_EST_BB_Cycles(), CG_SCHED_EST_Region_Cycles(), and Cloned_Gain().
| void CG_SCHED_EST_Delete | ( | CG_SCHED_EST * | se | ) |
Definition at line 395 of file cg_sched_est.cxx.
Referenced by CG_SCHED_EST_BB_Cycles(), CG_SCHED_EST_Region_Cycles(), Cloned_Gain(), Path_Resources_Available(), and Select_Blocks().
| void CG_SCHED_EST_Ignore_Op | ( | CG_SCHED_EST * | se, | |
| OP * | op | |||
| ) |
Definition at line 608 of file cg_sched_est.cxx.
Referenced by Cloned_Gain(), and Create_Sched_Est().
| CG_SCHED_EST* CG_SCHED_EST_Path_Create | ( | BB_SET * | path, | |
| BB_MAP | bb_ests, | |||
| MEM_POOL * | pool, | |||
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 300 of file cg_sched_est.cxx.
References BB_MAP_Get(), BB_MAP_Set(), CG_SCHED_EST_Create(), CG_SCHED_EST_Create_Empty(), INT, cg_sched_est::res_count, cg_sched_est::sched_cycles, SCHED_EST_FOR_HB, TI_RES_COUNT_Add(), and TI_RES_COUNT_Min_Cycles().
Referenced by Calculate_Path_Data().
| void CG_SCHED_EST_Print | ( | FILE * | fp, | |
| CG_SCHED_EST * | se | |||
| ) |
Definition at line 264 of file cg_sched_est.cxx.
References cg_sched_est::cached_crit_path_len, cg_sched_est::cached_resource_cycles, cg_sched_est::contents, fprintf(), cg_sched_est::res_count, cg_sched_est::sched_cycles, and TI_RES_COUNT_Print().
Referenced by CG_SCHED_EST_Append_Scheds(), CG_SCHED_EST_Create(), and CG_SCHED_EST_Ignore_Op().
| float CG_SCHED_EST_Region_Cycles | ( | BB_SET * | region, | |
| BB * | entry, | |||
| BOOL | merged, | |||
| SCHED_EST_TYPE | type | |||
| ) |
Definition at line 755 of file cg_sched_est.cxx.
References BB_MAP_Create, BB_MAP_Delete(), BB_MAP_Get(), BB_MAP_Set(), CG_SCHED_EST_Append_Scheds(), CG_SCHED_EST_Avg_Cycles_Thru(), CG_SCHED_EST_Create(), CG_SCHED_EST_Cycles(), CG_SCHED_EST_Delete(), MEM_local_nz_pool, MEM_POOL_Pop, MEM_POOL_Push, and SCHED_EST_FOR_IF_CONV.
| UINT32 CG_SCHED_EST_Resource_Cycles | ( | CG_SCHED_EST * | se | ) |
Definition at line 630 of file cg_sched_est.cxx.
References cg_sched_est::cached_resource_cycles, and Resource_Min_Cycles().
Referenced by Avg_Cost_Path(), CG_LOOP::Determine_SWP_Unroll_Factor(), HB_PATH_Schedule_Height(), Loop_Amenable_For_SWP(), Path_Resources_Available(), Select_Blocks(), and Shorten_Critical_Recurrence_By_Reassociation().
| static void Clone_Mappings | ( | CG_SCHED_EST * | to, | |
| CG_SCHED_EST * | from, | |||
| MEM_POOL * | pool | |||
| ) | [static] |
Definition at line 406 of file cg_sched_est.cxx.
References BB_id, BB_MAP32_Get(), BB_MAP32_Set(), BB_MAP_Get(), BB_MAP_Set(), BB_OP_MAP32_Create, BB_OP_MAP32_Get(), BB_OP_MAP32_Set(), cg_sched_est::contents, DevAssert, FOR_ALL_BB_OPs, INT32, cg_sched_est::latency_to_map, order, and cg_sched_est::order.
Referenced by CG_SCHED_EST_Clone().
| static UINT32 Critical_Path_Len | ( | CG_SCHED_EST * | se | ) | [static] |
Definition at line 197 of file cg_sched_est.cxx.
References BB_MAP_Get(), BB_OP_MAP32_Get(), BB_OP_MAP32_Set(), CG_DEP_Compute_Graph(), CG_DEP_Delete_Graph(), CG_SCHED_EST_calc_dep_graph, cg_sched_est::contents, FALSE, FOR_ALL_BB_OPs, fprintf(), INCLUDE_MEMIN_ARCS, LATENCY_IGNORE, LATENCY_NOT_COMPUTED, Latency_Thru(), cg_sched_est::latency_to_map, cg_sched_est::latency_to_map_dirty, NO_ASSIGNED_REG_DEPS, NO_CONTROL_ARCS, NO_MEMREAD_ARCS, NON_CYCLIC, NULL, TFile, tracing, UINT32, umax(), and cg_sched_est::use_dep_graph.
Referenced by CG_SCHED_EST_Critical_Length(), and CG_SCHED_EST_Cycles().
| static OP* Find_Reaching_Def | ( | CG_SCHED_EST * | se, | |
| OP * | op, | |||
| UINT8 | i | |||
| ) | [static] |
Definition at line 91 of file cg_sched_est.cxx.
References BB_MAP32_Get(), INT32, NULL, OP_bb, OP_opnd, OP_Precedes(), opnd, cg_sched_est::order, TN_is_constant, TN_Reaching_Value_At_Op(), and TRUE.
Referenced by Calc_Latency_To(), Optimize_Copy_Usage(), and Rematerialize_GRF().
| static UINT32 Get_Latency_To | ( | CG_SCHED_EST * | se, | |
| OP * | op | |||
| ) | [inline, static] |
Definition at line 66 of file cg_sched_est.cxx.
References BB_id, BB_MAP_Get(), BB_OP_MAP32_Get(), DevAssert, cg_sched_est::latency_to_map, OP_bb, and UINT32.
Referenced by Calc_Latency_To(), and Latency_Thru().
Definition at line 467 of file cg_sched_est.cxx.
References BB_id, BBLIST_item, BOOL, FALSE, FOR_ALL_BB_PREDS, FOR_ALL_BB_SUCCS, fprintf(), MEM_local_nz_pool, MEM_POOL_Pop, MEM_POOL_Push, NULL, preds, PU_BB_Count, TFile, tracing, and TRUE.
Referenced by CG_SCHED_EST_Is_Region(), PARTITION_GRAPH::Collect_Info(), draw_regional_cfg(), draw_regional_dependence_graph(), SCHED_ANNOT::Dump(), Find_Region_Entry_BB(), IF_CONVERTOR::If_Conversion_Init(), Is_Abnormal_Loop(), IF_CONVERTOR::Is_Partial_Redundant_Def(), PARTITION_GRAPH::Look_For_Partition(), Regional_CFG_Callback::Node_Select(), Test_PRDB(), and Verify_PRDB().
| static UINT32 Latency_Thru | ( | CG_SCHED_EST * | se, | |
| OP * | op, | |||
| INT32 | latency | |||
| ) | [inline, static] |
Definition at line 124 of file cg_sched_est.cxx.
References Calc_Latency_To(), CG_SCHED_EST_call_cost, Get_Latency_To(), LATENCY_IGNORE, LATENCY_NOT_COMPUTED, OP_call, and UINT32.
Referenced by Calc_Latency_To(), and Critical_Path_Len().
| static UINT32 Resource_Min_Cycles | ( | CG_SCHED_EST * | se | ) | [static] |
Definition at line 249 of file cg_sched_est.cxx.
References cg_sched_est::contents, fprintf(), cg_sched_est::res_count, result, TFile, TI_RES_COUNT_Min_Cycles(), tracing, and UINT32.
Referenced by CG_SCHED_EST_Cycles(), and CG_SCHED_EST_Resource_Cycles().
| static void Set_Latency_To | ( | CG_SCHED_EST * | se, | |
| OP * | op, | |||
| UINT32 | latency | |||
| ) | [inline, static] |
Definition at line 77 of file cg_sched_est.cxx.
References BB_id, BB_MAP_Get(), BB_OP_MAP32_Set(), DevAssert, INT32, cg_sched_est::latency_to_map, and OP_bb.
Referenced by Calc_Latency_To(), and CG_SCHED_EST_Ignore_Op().
| BOOL CG_SCHED_EST_calc_dep_graph = FALSE |
Definition at line 53 of file cg_sched_est.cxx.
Referenced by Calc_Latency_To(), and Critical_Path_Len().
| INT32 CG_SCHED_EST_call_cost = 100 |
| BOOL CG_SCHED_EST_use_locs = FALSE |
Definition at line 54 of file cg_sched_est.cxx.
Referenced by CG_SCHED_EST_Append_Scheds(), CG_SCHED_EST_Create(), CG_SCHED_EST_Cycles(), and Select_Blocks().
1.5.6