1/* This file contains the definitions for timing variables used to
2 measure run-time performance of the compiler.
3 Copyright (C) 2000-2017 Free Software Foundation, Inc.
4 Contributed by Alex Samuel <samuel@codesourcery.com>
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
21
22/* This file contains timing variable definitions, used by timevar.h
23 and timevar.c.
24
25 Syntax:
26
27 DEFTIMEVAR (id, name)
28
29 where ID is the enumeral value used to identify the timing
30 variable, and NAME is a character string describing its purpose. */
31
32/* The total execution time. */
33DEFTIMEVAR (TV_TOTAL , "total time")
34/* The compiler phases.
35
36 These must be mutually exclusive, and the NAME field must begin
37 with "phase".
38
39 Also, their sum must be within a millionth of the total time (see
40 validate_phases). */
41DEFTIMEVAR (TV_PHASE_SETUP , "phase setup")
42DEFTIMEVAR (TV_PHASE_PARSING , "phase parsing")
43DEFTIMEVAR (TV_PHASE_DEFERRED , "phase lang. deferred")
44DEFTIMEVAR (TV_PHASE_LATE_PARSING_CLEANUPS, "phase late parsing cleanups")
45DEFTIMEVAR (TV_PHASE_OPT_GEN , "phase opt and generate")
46DEFTIMEVAR (TV_PHASE_LATE_ASM , "phase last asm")
47DEFTIMEVAR (TV_PHASE_STREAM_IN , "phase stream in")
48DEFTIMEVAR (TV_PHASE_STREAM_OUT , "phase stream out")
49DEFTIMEVAR (TV_PHASE_FINALIZE , "phase finalize")
50
51/* Concurrent timers, indicated by "|". */
52DEFTIMEVAR (TV_NAME_LOOKUP , "|name lookup")
53DEFTIMEVAR (TV_OVERLOAD , "|overload resolution")
54
55/* Time spent garbage-collecting. */
56DEFTIMEVAR (TV_GC , "garbage collection")
57
58/* Time spent generating dump files. */
59DEFTIMEVAR (TV_DUMP , "dump files")
60
61/* Time spent saving/restoring PCH state. */
62DEFTIMEVAR (TV_PCH_SAVE , "PCH main state save")
63DEFTIMEVAR (TV_PCH_CPP_SAVE , "PCH preprocessor state save")
64DEFTIMEVAR (TV_PCH_PTR_REALLOC , "PCH pointer reallocation")
65DEFTIMEVAR (TV_PCH_PTR_SORT , "PCH pointer sort")
66DEFTIMEVAR (TV_PCH_RESTORE , "PCH main state restore")
67DEFTIMEVAR (TV_PCH_CPP_RESTORE , "PCH preprocessor state restore")
68
69DEFTIMEVAR (TV_CGRAPH , "callgraph construction")
70DEFTIMEVAR (TV_CGRAPHOPT , "callgraph optimization")
71DEFTIMEVAR (TV_IPA_FNSUMMARY , "ipa function summary")
72DEFTIMEVAR (TV_IPA_UNREACHABLE , "ipa dead code removal")
73DEFTIMEVAR (TV_IPA_INHERITANCE , "ipa inheritance graph")
74DEFTIMEVAR (TV_IPA_VIRTUAL_CALL , "ipa virtual call target")
75DEFTIMEVAR (TV_IPA_DEVIRT , "ipa devirtualization")
76DEFTIMEVAR (TV_IPA_CONSTANT_PROP , "ipa cp")
77DEFTIMEVAR (TV_IPA_INLINING , "ipa inlining heuristics")
78DEFTIMEVAR (TV_IPA_FNSPLIT , "ipa function splitting")
79DEFTIMEVAR (TV_IPA_COMDATS , "ipa comdats")
80DEFTIMEVAR (TV_IPA_OPT , "ipa various optimizations")
81DEFTIMEVAR (TV_IPA_LTO_DECOMPRESS , "lto stream inflate")
82DEFTIMEVAR (TV_IPA_LTO_COMPRESS , "lto stream deflate")
83DEFTIMEVAR (TV_IPA_LTO_OUTPUT , "lto stream output")
84DEFTIMEVAR (TV_IPA_LTO_GIMPLE_IN , "ipa lto gimple in")
85DEFTIMEVAR (TV_IPA_LTO_GIMPLE_OUT , "ipa lto gimple out")
86DEFTIMEVAR (TV_IPA_LTO_DECL_IN , "ipa lto decl in")
87DEFTIMEVAR (TV_IPA_LTO_DECL_OUT , "ipa lto decl out")
88DEFTIMEVAR (TV_IPA_LTO_CTORS_IN , "ipa lto constructors in")
89DEFTIMEVAR (TV_IPA_LTO_CTORS_OUT , "ipa lto constructors out")
90DEFTIMEVAR (TV_IPA_LTO_CGRAPH_IO , "ipa lto cgraph I/O")
91DEFTIMEVAR (TV_IPA_LTO_DECL_MERGE , "ipa lto decl merge")
92DEFTIMEVAR (TV_IPA_LTO_CGRAPH_MERGE , "ipa lto cgraph merge")
93DEFTIMEVAR (TV_LTO , "lto")
94DEFTIMEVAR (TV_WHOPR_WPA , "whopr wpa")
95DEFTIMEVAR (TV_WHOPR_WPA_IO , "whopr wpa I/O")
96DEFTIMEVAR (TV_WHOPR_PARTITIONING , "whopr partitioning")
97DEFTIMEVAR (TV_WHOPR_LTRANS , "whopr ltrans")
98DEFTIMEVAR (TV_IPA_REFERENCE , "ipa reference")
99DEFTIMEVAR (TV_IPA_HSA , "ipa HSA")
100DEFTIMEVAR (TV_IPA_PROFILE , "ipa profile")
101DEFTIMEVAR (TV_IPA_AUTOFDO , "auto profile")
102DEFTIMEVAR (TV_IPA_PURE_CONST , "ipa pure const")
103DEFTIMEVAR (TV_IPA_ICF , "ipa icf")
104DEFTIMEVAR (TV_IPA_PTA , "ipa points-to")
105DEFTIMEVAR (TV_IPA_SRA , "ipa SRA")
106DEFTIMEVAR (TV_IPA_FREE_LANG_DATA , "ipa free lang data")
107DEFTIMEVAR (TV_IPA_FREE_INLINE_SUMMARY, "ipa free inline summary")
108/* Time spent by constructing CFG. */
109DEFTIMEVAR (TV_CFG , "cfg construction")
110/* Time spent by cleaning up CFG. */
111DEFTIMEVAR (TV_CLEANUP_CFG , "cfg cleanup")
112DEFTIMEVAR (TV_CFG_VERIFY , "CFG verifier")
113DEFTIMEVAR (TV_DELETE_TRIVIALLY_DEAD , "trivially dead code")
114
115/* Time spent in dataflow problems. */
116DEFTIMEVAR (TV_DF_SCAN , "df scan insns")
117DEFTIMEVAR (TV_DF_MD , "df multiple defs")
118DEFTIMEVAR (TV_DF_RD , "df reaching defs")
119DEFTIMEVAR (TV_DF_LR , "df live regs")
120DEFTIMEVAR (TV_DF_LIVE , "df live&initialized regs")
121DEFTIMEVAR (TV_DF_MIR , "df must-initialized regs")
122DEFTIMEVAR (TV_DF_CHAIN , "df use-def / def-use chains")
123DEFTIMEVAR (TV_DF_WORD_LR , "df live reg subwords")
124DEFTIMEVAR (TV_DF_NOTE , "df reg dead/unused notes")
125DEFTIMEVAR (TV_REG_STATS , "register information")
126
127DEFTIMEVAR (TV_ALIAS_ANALYSIS , "alias analysis")
128DEFTIMEVAR (TV_ALIAS_STMT_WALK , "alias stmt walking")
129DEFTIMEVAR (TV_REG_SCAN , "register scan")
130DEFTIMEVAR (TV_REBUILD_JUMP , "rebuild jump labels")
131/* Timing in various stages of the compiler. */
132DEFTIMEVAR (TV_CPP , "preprocessing")
133DEFTIMEVAR (TV_LEX , "lexical analysis")
134DEFTIMEVAR (TV_PARSE_GLOBAL , "parser (global)")
135DEFTIMEVAR (TV_PARSE_STRUCT , "parser struct body")
136DEFTIMEVAR (TV_PARSE_ENUM , "parser enumerator list")
137DEFTIMEVAR (TV_PARSE_FUNC , "parser function body")
138DEFTIMEVAR (TV_PARSE_INLINE , "parser inl. func. body")
139DEFTIMEVAR (TV_PARSE_INMETH , "parser inl. meth. body")
140DEFTIMEVAR (TV_TEMPLATE_INST , "template instantiation")
141DEFTIMEVAR (TV_CONSTEXPR , "constant expression evaluation")
142DEFTIMEVAR (TV_CONSTRAINT_SAT , "constraint satisfaction")
143DEFTIMEVAR (TV_CONSTRAINT_SUB , "constraint subsumption")
144DEFTIMEVAR (TV_FLATTEN_INLINING , "flatten inlining")
145DEFTIMEVAR (TV_EARLY_INLINING , "early inlining heuristics")
146DEFTIMEVAR (TV_INLINE_PARAMETERS , "inline parameters")
147DEFTIMEVAR (TV_INTEGRATION , "integration")
148DEFTIMEVAR (TV_TREE_GIMPLIFY , "tree gimplify")
149DEFTIMEVAR (TV_TREE_EH , "tree eh")
150DEFTIMEVAR (TV_TREE_CFG , "tree CFG construction")
151DEFTIMEVAR (TV_TREE_CLEANUP_CFG , "tree CFG cleanup")
152DEFTIMEVAR (TV_TREE_TAIL_MERGE , "tree tail merge")
153DEFTIMEVAR (TV_TREE_VRP , "tree VRP")
154DEFTIMEVAR (TV_TREE_EARLY_VRP , "tree Early VRP")
155DEFTIMEVAR (TV_TREE_COPY_PROP , "tree copy propagation")
156DEFTIMEVAR (TV_FIND_REFERENCED_VARS , "tree find ref. vars")
157DEFTIMEVAR (TV_TREE_PTA , "tree PTA")
158DEFTIMEVAR (TV_TREE_INSERT_PHI_NODES , "tree PHI insertion")
159DEFTIMEVAR (TV_TREE_SSA_REWRITE_BLOCKS, "tree SSA rewrite")
160DEFTIMEVAR (TV_TREE_SSA_OTHER , "tree SSA other")
161DEFTIMEVAR (TV_TREE_SSA_INCREMENTAL , "tree SSA incremental")
162DEFTIMEVAR (TV_TREE_OPS , "tree operand scan")
163DEFTIMEVAR (TV_TREE_SSA_DOMINATOR_OPTS , "dominator optimization")
164DEFTIMEVAR (TV_TREE_SSA_THREAD_JUMPS , "backwards jump threading")
165DEFTIMEVAR (TV_TREE_SRA , "tree SRA")
166DEFTIMEVAR (TV_ISOLATE_ERRONEOUS_PATHS , "isolate eroneous paths")
167DEFTIMEVAR (TV_TREE_CCP , "tree CCP")
168DEFTIMEVAR (TV_TREE_PHI_CPROP , "tree PHI const/copy prop")
169DEFTIMEVAR (TV_TREE_SPLIT_EDGES , "tree split crit edges")
170DEFTIMEVAR (TV_TREE_REASSOC , "tree reassociation")
171DEFTIMEVAR (TV_TREE_PRE , "tree PRE")
172DEFTIMEVAR (TV_TREE_FRE , "tree FRE")
173DEFTIMEVAR (TV_TREE_SINK , "tree code sinking")
174DEFTIMEVAR (TV_TREE_PHIOPT , "tree linearize phis")
175DEFTIMEVAR (TV_TREE_BACKPROP , "tree backward propagate")
176DEFTIMEVAR (TV_TREE_FORWPROP , "tree forward propagate")
177DEFTIMEVAR (TV_TREE_PHIPROP , "tree phiprop")
178DEFTIMEVAR (TV_TREE_DCE , "tree conservative DCE")
179DEFTIMEVAR (TV_TREE_CD_DCE , "tree aggressive DCE")
180DEFTIMEVAR (TV_TREE_CALL_CDCE , "tree buildin call DCE")
181DEFTIMEVAR (TV_TREE_DSE , "tree DSE")
182DEFTIMEVAR (TV_TREE_MERGE_PHI , "PHI merge")
183DEFTIMEVAR (TV_TREE_LOOP , "tree loop optimization")
184DEFTIMEVAR (TV_TREE_NOLOOP , "loopless fn")
185DEFTIMEVAR (TV_TREE_LOOP_BOUNDS , "tree loop bounds")
186DEFTIMEVAR (TV_LIM , "tree loop invariant motion")
187DEFTIMEVAR (TV_LINTERCHANGE , "tree loop interchange")
188DEFTIMEVAR (TV_TREE_LOOP_IVCANON , "tree canonical iv")
189DEFTIMEVAR (TV_SCEV_CONST , "scev constant prop")
190DEFTIMEVAR (TV_TREE_LOOP_UNSWITCH , "tree loop unswitching")
191DEFTIMEVAR (TV_LOOP_SPLIT , "loop splitting")
192DEFTIMEVAR (TV_LOOP_JAM , "unroll and jam")
193DEFTIMEVAR (TV_COMPLETE_UNROLL , "complete unrolling")
194DEFTIMEVAR (TV_TREE_PARALLELIZE_LOOPS, "tree parallelize loops")
195DEFTIMEVAR (TV_TREE_VECTORIZATION , "tree vectorization")
196DEFTIMEVAR (TV_TREE_SLP_VECTORIZATION, "tree slp vectorization")
197DEFTIMEVAR (TV_GRAPHITE , "Graphite")
198DEFTIMEVAR (TV_GRAPHITE_TRANSFORMS , "Graphite loop transforms")
199DEFTIMEVAR (TV_GRAPHITE_DATA_DEPS , "Graphite data dep analysis")
200DEFTIMEVAR (TV_GRAPHITE_CODE_GEN , "Graphite code generation")
201DEFTIMEVAR (TV_TREE_LOOP_DISTRIBUTION, "tree loop distribution")
202DEFTIMEVAR (TV_CHECK_DATA_DEPS , "tree check data dependences")
203DEFTIMEVAR (TV_TREE_PREFETCH , "tree prefetching")
204DEFTIMEVAR (TV_TREE_LOOP_IVOPTS , "tree iv optimization")
205DEFTIMEVAR (TV_PREDCOM , "predictive commoning")
206DEFTIMEVAR (TV_TREE_CH , "tree copy headers")
207DEFTIMEVAR (TV_TREE_SSA_UNCPROP , "tree SSA uncprop")
208DEFTIMEVAR (TV_TREE_NRV , "tree NRV optimization")
209DEFTIMEVAR (TV_TREE_COPY_RENAME , "tree rename SSA copies")
210DEFTIMEVAR (TV_TREE_SSA_VERIFY , "tree SSA verifier")
211DEFTIMEVAR (TV_TREE_STMT_VERIFY , "tree STMT verifier")
212DEFTIMEVAR (TV_TREE_SWITCH_CONVERSION, "tree switch conversion")
213DEFTIMEVAR (TV_TREE_SWITCH_LOWERING, "tree switch lowering")
214DEFTIMEVAR (TV_TREE_RECIP , "gimple CSE reciprocals")
215DEFTIMEVAR (TV_TREE_SINCOS , "gimple CSE sin/cos")
216DEFTIMEVAR (TV_TREE_WIDEN_MUL , "gimple widening/fma detection")
217DEFTIMEVAR (TV_TRANS_MEM , "transactional memory")
218DEFTIMEVAR (TV_TREE_STRLEN , "tree strlen optimization")
219DEFTIMEVAR (TV_CGRAPH_VERIFY , "callgraph verifier")
220DEFTIMEVAR (TV_DOM_FRONTIERS , "dominance frontiers")
221DEFTIMEVAR (TV_DOMINANCE , "dominance computation")
222DEFTIMEVAR (TV_CONTROL_DEPENDENCES , "control dependences")
223DEFTIMEVAR (TV_OUT_OF_SSA , "out of ssa")
224DEFTIMEVAR (TV_VAR_EXPAND , "expand vars")
225DEFTIMEVAR (TV_EXPAND , "expand")
226DEFTIMEVAR (TV_POST_EXPAND , "post expand cleanups")
227DEFTIMEVAR (TV_VARCONST , "varconst")
228DEFTIMEVAR (TV_LOWER_SUBREG , "lower subreg")
229DEFTIMEVAR (TV_JUMP , "jump")
230DEFTIMEVAR (TV_FWPROP , "forward prop")
231DEFTIMEVAR (TV_CSE , "CSE")
232DEFTIMEVAR (TV_DCE , "dead code elimination")
233DEFTIMEVAR (TV_DSE1 , "dead store elim1")
234DEFTIMEVAR (TV_DSE2 , "dead store elim2")
235DEFTIMEVAR (TV_LOOP , "loop analysis")
236DEFTIMEVAR (TV_LOOP_INIT , "loop init")
237DEFTIMEVAR (TV_LOOP_MOVE_INVARIANTS , "loop invariant motion")
238DEFTIMEVAR (TV_LOOP_UNROLL , "loop unrolling")
239DEFTIMEVAR (TV_LOOP_DOLOOP , "loop doloop")
240DEFTIMEVAR (TV_LOOP_FINI , "loop fini")
241DEFTIMEVAR (TV_CPROP , "CPROP")
242DEFTIMEVAR (TV_PRE , "PRE")
243DEFTIMEVAR (TV_HOIST , "code hoisting")
244DEFTIMEVAR (TV_LSM , "LSM")
245DEFTIMEVAR (TV_TRACER , "tracer")
246DEFTIMEVAR (TV_WEB , "web")
247DEFTIMEVAR (TV_AUTO_INC_DEC , "auto inc dec")
248DEFTIMEVAR (TV_CSE2 , "CSE 2")
249DEFTIMEVAR (TV_BRANCH_PROB , "branch prediction")
250DEFTIMEVAR (TV_COMBINE , "combiner")
251DEFTIMEVAR (TV_IFCVT , "if-conversion")
252DEFTIMEVAR (TV_MODE_SWITCH , "mode switching")
253DEFTIMEVAR (TV_SMS , "sms modulo scheduling")
254DEFTIMEVAR (TV_LIVE_RANGE_SHRINKAGE , "live range shrinkage")
255DEFTIMEVAR (TV_SCHED , "scheduling")
256DEFTIMEVAR (TV_IRA , "integrated RA")
257DEFTIMEVAR (TV_LRA , "LRA non-specific")
258DEFTIMEVAR (TV_LRA_ELIMINATE , "LRA virtuals elimination")
259DEFTIMEVAR (TV_LRA_INHERITANCE , "LRA reload inheritance")
260DEFTIMEVAR (TV_LRA_CREATE_LIVE_RANGES, "LRA create live ranges")
261DEFTIMEVAR (TV_LRA_ASSIGN , "LRA hard reg assignment")
262DEFTIMEVAR (TV_LRA_COALESCE , "LRA coalesce pseudo regs")
263DEFTIMEVAR (TV_LRA_REMAT , "LRA rematerialization")
264DEFTIMEVAR (TV_RELOAD , "reload")
265DEFTIMEVAR (TV_RELOAD_CSE_REGS , "reload CSE regs")
266DEFTIMEVAR (TV_GCSE_AFTER_RELOAD , "load CSE after reload")
267DEFTIMEVAR (TV_REE , "ree")
268DEFTIMEVAR (TV_THREAD_PROLOGUE_AND_EPILOGUE, "thread pro- & epilogue")
269DEFTIMEVAR (TV_IFCVT2 , "if-conversion 2")
270DEFTIMEVAR (TV_SPLIT_PATHS , "split paths")
271DEFTIMEVAR (TV_COMBINE_STACK_ADJUST , "combine stack adjustments")
272DEFTIMEVAR (TV_PEEPHOLE2 , "peephole 2")
273DEFTIMEVAR (TV_RENAME_REGISTERS , "rename registers")
274DEFTIMEVAR (TV_SCHED_FUSION , "scheduling fusion")
275DEFTIMEVAR (TV_CPROP_REGISTERS , "hard reg cprop")
276DEFTIMEVAR (TV_SCHED2 , "scheduling 2")
277DEFTIMEVAR (TV_MACH_DEP , "machine dep reorg")
278DEFTIMEVAR (TV_DBR_SCHED , "delay branch sched")
279DEFTIMEVAR (TV_REORDER_BLOCKS , "reorder blocks")
280DEFTIMEVAR (TV_SHORTEN_BRANCH , "shorten branches")
281DEFTIMEVAR (TV_REG_STACK , "reg stack")
282DEFTIMEVAR (TV_FINAL , "final")
283DEFTIMEVAR (TV_VAROUT , "variable output")
284DEFTIMEVAR (TV_SYMOUT , "symout")
285DEFTIMEVAR (TV_VAR_TRACKING , "variable tracking")
286DEFTIMEVAR (TV_VAR_TRACKING_DATAFLOW , "var-tracking dataflow")
287DEFTIMEVAR (TV_VAR_TRACKING_EMIT , "var-tracking emit")
288DEFTIMEVAR (TV_TREE_IFCOMBINE , "tree if-combine")
289DEFTIMEVAR (TV_TREE_UNINIT , "uninit var analysis")
290DEFTIMEVAR (TV_PLUGIN_INIT , "plugin initialization")
291DEFTIMEVAR (TV_PLUGIN_RUN , "plugin execution")
292DEFTIMEVAR (TV_GIMPLE_SLSR , "straight-line strength reduction")
293DEFTIMEVAR (TV_GIMPLE_STORE_MERGING , "store merging")
294DEFTIMEVAR (TV_VTABLE_VERIFICATION , "vtable verification")
295DEFTIMEVAR (TV_TREE_UBSAN , "tree ubsan")
296DEFTIMEVAR (TV_INITIALIZE_RTL , "initialize rtl")
297DEFTIMEVAR (TV_GIMPLE_LADDRESS , "address lowering")
298DEFTIMEVAR (TV_TREE_LOOP_IFCVT , "tree loop if-conversion")
299
300/* Everything else in rest_of_compilation not included above. */
301DEFTIMEVAR (TV_EARLY_LOCAL , "early local passes")
302DEFTIMEVAR (TV_OPTIMIZE , "unaccounted optimizations")
303DEFTIMEVAR (TV_REST_OF_COMPILATION , "rest of compilation")
304DEFTIMEVAR (TV_POSTRELOAD , "unaccounted post reload")
305DEFTIMEVAR (TV_LATE_COMPILATION , "unaccounted late compilation")
306DEFTIMEVAR (TV_REMOVE_UNUSED , "remove unused locals")
307DEFTIMEVAR (TV_ADDRESS_TAKEN , "address taken")
308DEFTIMEVAR (TV_TODO , "unaccounted todo")
309DEFTIMEVAR (TV_VERIFY_LOOP_CLOSED , "verify loop closed")
310DEFTIMEVAR (TV_VERIFY_RTL_SHARING , "verify RTL sharing")
311DEFTIMEVAR (TV_REBUILD_FREQUENCIES , "rebuild frequencies")
312DEFTIMEVAR (TV_REPAIR_LOOPS , "repair loop structures")
313
314/* Stuff used by libgccjit.so. */
315DEFTIMEVAR (TV_JIT_REPLAY , "replay of JIT client activity")
316DEFTIMEVAR (TV_ASSEMBLE , "assemble JIT code")
317DEFTIMEVAR (TV_LINK , "link JIT code")
318DEFTIMEVAR (TV_LOAD , "load JIT result")
319DEFTIMEVAR (TV_JIT_ACQUIRING_MUTEX , "acquiring JIT mutex")
320DEFTIMEVAR (TV_JIT_CLIENT_CODE , "JIT client code")
321