Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 #ifndef timing_INCLUDED 00037 #define timing_INCLUDED 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 /* ==================================================================== 00043 * ==================================================================== 00044 * 00045 * 00046 * Revision history: 00047 * 06-Feb-90 - Original Version 00048 * 01-Feb-91 - Copied for TP/Muse 00049 * 00050 * Description: 00051 * 00052 * This module provides the interface for phase/function timing in the 00053 * Muse compiler. It is based on the program-independent functions 00054 * provided by util/resource.h. 00055 * 00056 * ==================================================================== 00057 * ==================================================================== 00058 */ 00059 00060 00061 #ifdef _KEEP_RCS_ID 00062 #endif /* _KEEP_RCS_ID */ 00063 00064 /* Provide identifiers for the various time accumulators supplied: */ 00065 typedef enum { 00066 T_BE_Comp, /* time for whole back-end */ 00067 T_BE_PU_CU, /* BE PU processing -- per compilation unit */ 00068 T_BE_PU_Comp, /* per compilation */ 00069 T_ReadIR_CU, /* Reading IR */ 00070 T_ReadIR_Comp, 00071 T_Lower_CU, /* Lowering WHIRL */ 00072 T_Lower_Comp, 00073 T_ORI_CU, /* Olimit Region Insertion */ 00074 T_ORI_Comp, 00075 00076 T_Preopt_CU, /* Pre-optimizer */ 00077 T_Preopt_Comp, 00078 T_Wopt_CU, /* Global optimizer */ 00079 T_Wopt_Comp, 00080 00081 T_IPA_S_CU, /* IPA summary phase */ 00082 T_IPA_S_Comp, 00083 00084 T_LNO_CU, /* Loop Nest Optimization */ 00085 T_LNO_Comp, 00086 T_LNOParentize_CU, /* Parentization in LNO */ 00087 T_LNOParentize_Comp, 00088 T_LNOAccess_CU, /* Build access arrays in LNO */ 00089 T_LNOAccess_Comp, 00090 T_LNOBuildDep_CU, /* Build array dep graph in LNO */ 00091 T_LNOBuildDep_Comp, 00092 00093 T_W2C_CU, /* Whirl to C translation */ 00094 T_W2C_Comp, 00095 T_W2F_CU, /* Whirl to Fortran translation */ 00096 T_W2F_Comp, 00097 00098 T_CodeGen_CU, /* Code generator total */ 00099 T_CodeGen_Comp, 00100 00101 T_GLRA_CU, /* Global register allocation */ 00102 T_GLRA_Comp, 00103 T_Expand_CU, /* Code expansion */ 00104 T_Expand_Comp, 00105 T_Localize_CU, /* Localize */ 00106 T_Localize_Comp, 00107 T_SWpipe_CU, /* Software pipelining */ 00108 T_SWpipe_Comp, 00109 T_GCM_CU, /* Global code motion */ 00110 T_GCM_Comp, 00111 T_EBO_CU, /* Extended Block Optimization */ 00112 T_EBO_Comp, 00113 T_CFLOW_CU, /* Control Flow Optimization */ 00114 T_CFLOW_Comp, 00115 T_Loop_CU, /* CG Loop */ 00116 T_Loop_Comp, 00117 T_Freq_CU, /* BB frequency */ 00118 T_Freq_Comp, 00119 T_HBF_CU, /* HyperBlock Formation */ 00120 T_HBF_Comp, 00121 T_Sched_CU, /* HyperBlock Scheduling */ 00122 T_Sched_Comp, 00123 T_THR_CU, /* Tree-Height Reduction Phase */ 00124 T_THR_Comp, 00125 T_LRA_CU, /* Local Register Allocation */ 00126 T_LRA_Comp, 00127 T_GRA_CU, /* Register allocation */ 00128 T_GRA_Comp, 00129 T_Emit_CU, /* Code emission */ 00130 T_Emit_Comp, 00131 T_Region_Finalize_CU, /* Region Finalize */ 00132 T_Region_Finalize_Comp, 00133 T_CalcDom_CU, /* Calculate_Dominators 00134 * (this time is included in callers time) */ 00135 T_CalcDom_Comp, 00136 T_LAST /* Last index defined */ 00137 } TIMER_ID; 00138 00139 /***** External routine definitions *****/ 00140 00141 /* Initialize timers for entire compilation: */ 00142 extern void Initialize_Timing ( BOOL enable ); 00143 00144 /* Reset timers for new source file: */ 00145 extern void Reset_Timers (void); 00146 00147 /* Start / stop timing accumulator: */ 00148 extern void Start_Timer ( INT ID ); 00149 extern void Stop_Timer ( INT ID ); 00150 00151 /* Read timer time : can only be called when the timer is running, 00152 i.e., Start_Timer() and Stop_Timer() */ 00153 extern double Get_User_Time(INT ID); 00154 00155 /* Report an accumulated delta time: */ 00156 extern void Report_Delta_Time ( FILE *file, INT ID ); 00157 00158 /* report timing in cg for a region */ 00159 extern void Report_CG_Region_Timing (FILE *file, char *name); 00160 00161 /* Finish timing for a single compilation unit, entire compilation: */ 00162 extern void Finish_BE_Timing ( FILE *file, char *name ); 00163 extern void Finish_Compilation_Timing ( FILE *file, char *source ); 00164 00165 #ifdef __cplusplus 00166 } 00167 #endif 00168 #endif /* timing_INCLUDED */