Line data Source code
1 : /* This file is auto-generated by gen-pass-instances.awk
2 : from passes.def. */
3 : /* Description of pass structure
4 : Copyright (C) 1987-2026 Free Software Foundation, Inc.
5 :
6 : This file is part of GCC.
7 :
8 : GCC is free software; you can redistribute it and/or modify it under
9 : the terms of the GNU General Public License as published by the Free
10 : Software Foundation; either version 3, or (at your option) any later
11 : version.
12 :
13 : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 : WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 : FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 : 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 : /* Note that this file is processed by a simple parser:
23 : 'gen-pass-instances.awk', so carefully verify the generated
24 : 'pass-instances.def' if you deviate from the syntax otherwise used in
25 : here. */
26 :
27 :
28 : /* All passes needed to lower the function into shape optimizers can
29 : operate on. These passes are always run first on the function, but
30 : backend might produce already lowered functions that are not processed
31 : by these passes. */
32 285722 : INSERT_PASSES_AFTER (all_lowering_passes)
33 285722 : NEXT_PASS (pass_warn_unused_result, 1);
34 285722 : NEXT_PASS (pass_diagnose_omp_blocks, 1);
35 285722 : NEXT_PASS (pass_diagnose_tm_blocks, 1);
36 285722 : NEXT_PASS (pass_omp_oacc_kernels_decompose, 1);
37 285722 : NEXT_PASS (pass_lower_omp, 1);
38 285722 : NEXT_PASS (pass_lower_cf, 1);
39 285722 : NEXT_PASS (pass_lower_tm, 1);
40 285722 : NEXT_PASS (pass_refactor_eh, 1);
41 285722 : NEXT_PASS (pass_lower_eh, 1);
42 285722 : NEXT_PASS (pass_coroutine_lower_builtins, 1);
43 285722 : NEXT_PASS (pass_build_cfg, 1);
44 285722 : NEXT_PASS (pass_warn_function_return, 1);
45 285722 : NEXT_PASS (pass_coroutine_early_expand_ifns, 1);
46 285722 : NEXT_PASS (pass_expand_omp, 1);
47 285722 : NEXT_PASS (pass_build_cgraph_edges, 1);
48 285722 : TERMINATE_PASS_LIST (all_lowering_passes)
49 :
50 : /* Interprocedural optimization passes. */
51 285722 : INSERT_PASSES_AFTER (all_small_ipa_passes)
52 : /* auto_profile_offline uses dwarf_name hook that only
53 : works before free_lang_data. */
54 285722 : NEXT_PASS (pass_ipa_auto_profile_offline, 1);
55 285722 : NEXT_PASS (pass_ipa_free_lang_data, 1);
56 285722 : NEXT_PASS (pass_ipa_function_and_variable_visibility, 1);
57 285722 : NEXT_PASS (pass_ipa_strub_mode, 1);
58 285722 : NEXT_PASS (pass_build_ssa_passes, 1);
59 285722 : PUSH_INSERT_PASSES_WITHIN (pass_build_ssa_passes, 1)
60 285722 : NEXT_PASS (pass_fixup_cfg, 1);
61 285722 : NEXT_PASS (pass_build_ssa, 1);
62 285722 : NEXT_PASS_WITH_ARG (pass_walloca, 1, /*strict_mode_p=*/true);
63 285722 : NEXT_PASS (pass_warn_printf, 1);
64 285722 : NEXT_PASS (pass_warn_nonnull_compare, 1);
65 285722 : NEXT_PASS (pass_early_warn_uninitialized, 1);
66 857166 : NEXT_PASS_WITH_ARGS (pass_warn_access, 1, /*early=*/true, /*check_dangling=*/true);
67 285722 : NEXT_PASS (pass_ubsan, 1);
68 285722 : NEXT_PASS (pass_nothrow, 1);
69 285722 : NEXT_PASS (pass_rebuild_cgraph_edges, 1);
70 : POP_INSERT_PASSES ()
71 285722 : NEXT_PASS_WITH_ARG (pass_target_clone, 1, true);
72 :
73 285722 : NEXT_PASS (pass_local_optimization_passes, 1);
74 285722 : PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes, 1)
75 285722 : NEXT_PASS (pass_fixup_cfg, 2);
76 285722 : NEXT_PASS (pass_rebuild_cgraph_edges, 2);
77 285722 : NEXT_PASS (pass_local_fn_summary, 1);
78 285722 : NEXT_PASS (pass_early_inline, 1);
79 285722 : NEXT_PASS (pass_warn_recursion, 1);
80 285722 : NEXT_PASS (pass_all_early_optimizations, 1);
81 285722 : PUSH_INSERT_PASSES_WITHIN (pass_all_early_optimizations, 1)
82 285722 : NEXT_PASS (pass_remove_cgraph_callee_edges, 1);
83 285722 : NEXT_PASS (pass_early_object_sizes, 1);
84 : /* Don't record nonzero bits before IPA to avoid
85 : using too much memory. */
86 285722 : NEXT_PASS_WITH_ARG (pass_ccp, 1, false /* nonzero_p */);
87 : /* After CCP we rewrite no longer addressed locals into SSA
88 : form if possible. */
89 285722 : NEXT_PASS_WITH_ARG (pass_forwprop, 1, /*full_walk=*/true);
90 285722 : NEXT_PASS_WITH_ARG (pass_early_thread_jumps, 1, /*first=*/true);
91 285722 : NEXT_PASS (pass_sra_early, 1);
92 : /* pass_build_ealias is a dummy pass that ensures that we
93 : execute TODO_rebuild_alias at this point. */
94 285722 : NEXT_PASS (pass_build_ealias, 1);
95 : /* Do phiprop before FRE so we optimize std::min and std::max well. */
96 285722 : NEXT_PASS (pass_phiprop, 1);
97 285722 : NEXT_PASS_WITH_ARG (pass_fre, 1, true /* may_iterate */);
98 285722 : NEXT_PASS (pass_early_vrp, 1);
99 285722 : NEXT_PASS (pass_merge_phi, 1);
100 285722 : NEXT_PASS (pass_dse, 1);
101 857166 : NEXT_PASS_WITH_ARGS (pass_cd_dce, 1, false /* update_address_taken_p */, true /* remove_unused_locals */);
102 285722 : NEXT_PASS_WITH_ARG (pass_phiopt, 1, true /* early_p */);
103 : /* Cleanup eh is done before tail recusision to remove empty (only clobbers)
104 : finally blocks which would block tail recursion. */
105 285722 : NEXT_PASS (pass_cleanup_eh, 1);
106 285722 : NEXT_PASS (pass_tail_recursion, 1);
107 285722 : NEXT_PASS (pass_if_to_switch, 1);
108 285722 : NEXT_PASS (pass_convert_switch, 1);
109 285722 : NEXT_PASS (pass_sccopy, 1);
110 285722 : NEXT_PASS (pass_profile, 1);
111 285722 : NEXT_PASS (pass_local_pure_const, 1);
112 285722 : NEXT_PASS (pass_modref, 1);
113 : /* Split functions creates parts that are not run through
114 : early optimizations again. It is thus good idea to do this
115 : late. */
116 285722 : NEXT_PASS (pass_split_functions, 1);
117 285722 : NEXT_PASS_WITH_ARG (pass_strip_predict_hints, 1, true /* early_p */);
118 : POP_INSERT_PASSES ()
119 285722 : NEXT_PASS (pass_release_ssa_names, 1);
120 285722 : NEXT_PASS (pass_rebuild_cgraph_edges, 3);
121 285722 : NEXT_PASS (pass_local_fn_summary, 2);
122 : POP_INSERT_PASSES ()
123 :
124 285722 : NEXT_PASS (pass_ipa_remove_symbols, 1);
125 285722 : NEXT_PASS (pass_ipa_strub, 1);
126 285722 : NEXT_PASS (pass_ipa_oacc, 1);
127 285722 : PUSH_INSERT_PASSES_WITHIN (pass_ipa_oacc, 1)
128 285722 : NEXT_PASS (pass_ipa_pta, 1);
129 : /* Pass group that runs when the function is an offloaded function
130 : containing oacc kernels loops. */
131 285722 : NEXT_PASS (pass_ipa_oacc_kernels, 1);
132 285722 : PUSH_INSERT_PASSES_WITHIN (pass_ipa_oacc_kernels, 1)
133 285722 : NEXT_PASS (pass_oacc_kernels, 1);
134 285722 : PUSH_INSERT_PASSES_WITHIN (pass_oacc_kernels, 1)
135 285722 : NEXT_PASS (pass_ch, 1);
136 285722 : NEXT_PASS_WITH_ARG (pass_fre, 2, true /* may_iterate */);
137 : /* We use pass_lim to rewrite in-memory iteration and reduction
138 : variable accesses in loops into local variables accesses. */
139 285722 : NEXT_PASS (pass_lim, 1);
140 285722 : NEXT_PASS_WITH_ARG (pass_dominator, 1, false /* may_peel_loop_headers_p */);
141 285722 : NEXT_PASS (pass_dce, 1);
142 285722 : NEXT_PASS_WITH_ARG (pass_parallelize_loops, 1, true /* oacc_kernels_p */);
143 285722 : NEXT_PASS (pass_expand_omp_ssa, 1);
144 285722 : NEXT_PASS (pass_rebuild_cgraph_edges, 4);
145 : POP_INSERT_PASSES ()
146 : POP_INSERT_PASSES ()
147 : POP_INSERT_PASSES ()
148 :
149 285722 : NEXT_PASS_WITH_ARG (pass_target_clone, 2, false);
150 285722 : NEXT_PASS (pass_ipa_auto_profile, 1);
151 285722 : PUSH_INSERT_PASSES_WITHIN (pass_ipa_auto_profile, 1)
152 285722 : NEXT_PASS (pass_feedback_split_functions, 1);
153 : POP_INSERT_PASSES ()
154 285722 : NEXT_PASS (pass_ipa_tree_profile, 1);
155 285722 : PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile, 1)
156 285722 : NEXT_PASS (pass_feedback_split_functions, 2);
157 : POP_INSERT_PASSES ()
158 285722 : NEXT_PASS_WITH_ARG (pass_ipa_free_fn_summary, 1, true /* small_p */);
159 285722 : NEXT_PASS (pass_ipa_increase_alignment, 1);
160 285722 : NEXT_PASS (pass_ipa_tm, 1);
161 285722 : NEXT_PASS (pass_ipa_lower_emutls, 1);
162 285722 : NEXT_PASS (pass_ipa_asm_lgen, 1);
163 285722 : TERMINATE_PASS_LIST (all_small_ipa_passes)
164 :
165 285722 : INSERT_PASSES_AFTER (all_regular_ipa_passes)
166 285722 : NEXT_PASS (pass_analyzer, 1);
167 285722 : NEXT_PASS (pass_ipa_asm_wpa, 1);
168 285722 : NEXT_PASS (pass_ipa_odr, 1);
169 285722 : NEXT_PASS (pass_ipa_whole_program_visibility, 1);
170 285722 : NEXT_PASS (pass_ipa_profile, 1);
171 285722 : NEXT_PASS (pass_ipa_icf, 1);
172 285722 : NEXT_PASS (pass_ipa_devirt, 1);
173 285722 : NEXT_PASS (pass_ipa_cdtor_merge, 1);
174 285722 : NEXT_PASS (pass_ipa_cp, 1);
175 285722 : NEXT_PASS (pass_ipa_sra, 1);
176 285722 : NEXT_PASS (pass_ipa_fn_summary, 1);
177 285722 : NEXT_PASS (pass_ipa_inline, 1);
178 285722 : NEXT_PASS (pass_ipa_locality_cloning, 1);
179 285722 : NEXT_PASS (pass_ipa_pure_const, 1);
180 285722 : NEXT_PASS (pass_ipa_modref, 1);
181 285722 : NEXT_PASS_WITH_ARG (pass_ipa_free_fn_summary, 2, false /* small_p */);
182 285722 : NEXT_PASS (pass_ipa_reference, 1);
183 : /* This pass needs to be scheduled after any IP code duplication. */
184 285722 : NEXT_PASS (pass_ipa_single_use, 1);
185 : /* Comdat privatization come last, as direct references to comdat local
186 : symbols are not allowed outside of the comdat group. Privatizing early
187 : would result in missed optimizations due to this restriction. */
188 285722 : NEXT_PASS (pass_ipa_comdats, 1);
189 285722 : TERMINATE_PASS_LIST (all_regular_ipa_passes)
190 :
191 : /* Simple IPA passes executed after the regular passes. In WHOPR mode the
192 : passes are executed after partitioning and thus see just parts of the
193 : compiled unit. */
194 285722 : INSERT_PASSES_AFTER (all_late_ipa_passes)
195 285722 : NEXT_PASS (pass_ipa_pta, 2);
196 285722 : NEXT_PASS (pass_omp_simd_clone, 1);
197 285722 : TERMINATE_PASS_LIST (all_late_ipa_passes)
198 :
199 : /* These passes are run after IPA passes on every function that is being
200 : output to the assembler file. */
201 285722 : INSERT_PASSES_AFTER (all_passes)
202 285722 : NEXT_PASS (pass_fixup_cfg, 3);
203 285722 : NEXT_PASS (pass_lower_eh_dispatch, 1);
204 285722 : NEXT_PASS (pass_oacc_loop_designation, 1);
205 285722 : NEXT_PASS (pass_omp_oacc_neuter_broadcast, 1);
206 285722 : NEXT_PASS (pass_oacc_device_lower, 1);
207 285722 : NEXT_PASS (pass_omp_device_lower, 1);
208 285722 : NEXT_PASS (pass_omp_target_link, 1);
209 285722 : NEXT_PASS (pass_adjust_alignment, 1);
210 285722 : NEXT_PASS (pass_harden_control_flow_redundancy, 1);
211 285722 : NEXT_PASS (pass_all_optimizations, 1);
212 285722 : PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations, 1)
213 285722 : NEXT_PASS (pass_remove_cgraph_callee_edges, 2);
214 : /* Initial scalar cleanups before alias computation.
215 : They ensure memory accesses are not indirect wherever possible. */
216 285722 : NEXT_PASS_WITH_ARG (pass_strip_predict_hints, 2, false /* early_p */);
217 285722 : NEXT_PASS_WITH_ARG (pass_ccp, 2, true /* nonzero_p */);
218 : /* After CCP we rewrite no longer addressed locals into SSA
219 : form if possible. */
220 285722 : NEXT_PASS (pass_object_sizes, 1);
221 285722 : NEXT_PASS (pass_post_ipa_warn, 1);
222 : /* Must run before loop unrolling. */
223 857166 : NEXT_PASS_WITH_ARGS (pass_warn_access, 2, /*early=*/false, /*check_dangling=*/true);
224 : /* Profile count may overflow as a result of inlinining very large
225 : loop nests. This pass should run before any late pass that makes
226 : use of profile. */
227 285722 : NEXT_PASS (pass_rebuild_frequencies, 1);
228 285722 : NEXT_PASS (pass_complete_unrolli, 1);
229 285722 : NEXT_PASS (pass_backprop, 1);
230 285722 : NEXT_PASS (pass_phiprop, 2);
231 285722 : NEXT_PASS_WITH_ARG (pass_forwprop, 2, /*full_walk=*/true);
232 : /* pass_build_alias is a dummy pass that ensures that we
233 : execute TODO_rebuild_alias at this point. */
234 285722 : NEXT_PASS (pass_build_alias, 1);
235 285722 : NEXT_PASS (pass_return_slot, 1);
236 285722 : NEXT_PASS_WITH_ARG (pass_fre, 3, true /* may_iterate */);
237 285722 : NEXT_PASS (pass_merge_phi, 2);
238 285722 : NEXT_PASS_WITH_ARG (pass_thread_jumps_full, 1, /*first=*/true);
239 285722 : NEXT_PASS_WITH_ARG (pass_vrp, 1, false /* final_p*/);
240 285722 : NEXT_PASS (pass_array_bounds, 1);
241 285722 : NEXT_PASS (pass_dse, 2);
242 857166 : NEXT_PASS_WITH_ARGS (pass_dce, 2, false /* update_address_taken_p */, true /* remove_unused_locals */);
243 285722 : NEXT_PASS (pass_stdarg, 1);
244 285722 : NEXT_PASS (pass_call_cdce, 1);
245 285722 : NEXT_PASS (pass_cselim, 1);
246 285722 : NEXT_PASS (pass_copy_prop, 1);
247 285722 : NEXT_PASS (pass_tree_ifcombine, 1);
248 285722 : NEXT_PASS (pass_merge_phi, 3);
249 285722 : NEXT_PASS_WITH_ARG (pass_phiopt, 2, false /* early_p */);
250 285722 : NEXT_PASS (pass_tail_recursion, 2);
251 285722 : NEXT_PASS (pass_ch, 2);
252 285722 : NEXT_PASS (pass_lower_complex, 1);
253 285722 : NEXT_PASS (pass_lower_bitint, 1);
254 285722 : NEXT_PASS (pass_sra, 1);
255 : /* The dom pass will also resolve all __builtin_constant_p calls
256 : that are still there to 0. This has to be done after some
257 : propagations have already run, but before some more dead code
258 : is removed, and this place fits nicely. Remember this when
259 : trying to move or duplicate pass_dominator somewhere earlier. */
260 285722 : NEXT_PASS_WITH_ARG (pass_thread_jumps, 1, /*first=*/true);
261 285722 : NEXT_PASS_WITH_ARG (pass_dominator, 2, true /* may_peel_loop_headers_p */);
262 : /* Threading can leave many const/copy propagations in the IL.
263 : Clean them up. Failure to do so well can lead to false
264 : positives from warnings for erroneous code. */
265 285722 : NEXT_PASS (pass_copy_prop, 2);
266 : /* Identify paths that should never be executed in a conforming
267 : program and isolate those paths. */
268 285722 : NEXT_PASS (pass_isolate_erroneous_paths, 1);
269 285722 : NEXT_PASS_WITH_ARG (pass_reassoc, 1, true /* early_p */);
270 285722 : NEXT_PASS (pass_dce, 3);
271 285722 : NEXT_PASS (pass_forwprop, 3);
272 285722 : NEXT_PASS_WITH_ARG (pass_phiopt, 3, false /* early_p */);
273 285722 : NEXT_PASS_WITH_ARG (pass_ccp, 3, true /* nonzero_p */);
274 : /* After CCP we rewrite no longer addressed locals into SSA
275 : form if possible. */
276 285722 : NEXT_PASS (pass_expand_pow, 1);
277 285722 : NEXT_PASS (pass_optimize_bswap, 1);
278 285722 : NEXT_PASS (pass_laddress, 1);
279 285722 : NEXT_PASS (pass_lim, 2);
280 285722 : NEXT_PASS_WITH_ARG (pass_walloca, 2, false);
281 285722 : NEXT_PASS (pass_pre, 1);
282 285722 : NEXT_PASS_WITH_ARG (pass_sink_code, 1, false /* unsplit edges */);
283 285722 : NEXT_PASS (pass_sancov, 1);
284 285722 : NEXT_PASS (pass_asan, 1);
285 285722 : NEXT_PASS (pass_tsan, 1);
286 285722 : NEXT_PASS_WITH_ARG (pass_dse, 3, true /* use DR analysis */);
287 857166 : NEXT_PASS_WITH_ARGS (pass_dce, 4, false /* update_address_taken_p */, false /* remove_unused_locals */);
288 : /* Pass group that runs when 1) enabled, 2) there are loops
289 : in the function. Make sure to run pass_fix_loops before
290 : to discover/remove loops before running the gate function
291 : of pass_tree_loop. */
292 285722 : NEXT_PASS (pass_fix_loops, 1);
293 285722 : NEXT_PASS (pass_tree_loop, 1);
294 285722 : PUSH_INSERT_PASSES_WITHIN (pass_tree_loop, 1)
295 : /* Before loop_init we rewrite no longer addressed locals into SSA
296 : form if possible. */
297 285722 : NEXT_PASS (pass_tree_loop_init, 1);
298 285722 : NEXT_PASS (pass_tree_unswitch, 1);
299 285722 : NEXT_PASS (pass_loop_split, 1);
300 285722 : NEXT_PASS (pass_scev_cprop, 1);
301 285722 : NEXT_PASS (pass_loop_versioning, 1);
302 285722 : NEXT_PASS (pass_loop_jam, 1);
303 : /* All unswitching, final value replacement and splitting can expose
304 : empty loops. Remove them now. */
305 285722 : NEXT_PASS_WITH_ARG (pass_cd_dce, 2, false /* update_address_taken_p */);
306 285722 : NEXT_PASS (pass_iv_canon, 1);
307 285722 : NEXT_PASS (pass_loop_distribution, 1);
308 285722 : NEXT_PASS (pass_crc_optimization, 1);
309 285722 : NEXT_PASS (pass_linterchange, 1);
310 285722 : NEXT_PASS (pass_copy_prop, 3);
311 285722 : NEXT_PASS (pass_graphite, 1);
312 285722 : PUSH_INSERT_PASSES_WITHIN (pass_graphite, 1)
313 285722 : NEXT_PASS (pass_graphite_transforms, 1);
314 285722 : NEXT_PASS (pass_lim, 3);
315 285722 : NEXT_PASS (pass_copy_prop, 4);
316 285722 : NEXT_PASS (pass_dce, 5);
317 : POP_INSERT_PASSES ()
318 285722 : NEXT_PASS_WITH_ARG (pass_parallelize_loops, 2, false /* oacc_kernels_p */);
319 285722 : NEXT_PASS (pass_expand_omp_ssa, 2);
320 285722 : NEXT_PASS (pass_ch_vect, 1);
321 285722 : NEXT_PASS (pass_if_conversion, 1);
322 : /* pass_vectorize must immediately follow pass_if_conversion.
323 : Please do not add any other passes in between. */
324 285722 : NEXT_PASS (pass_vectorize, 1);
325 285722 : PUSH_INSERT_PASSES_WITHIN (pass_vectorize, 1)
326 285722 : NEXT_PASS (pass_dce, 6);
327 : POP_INSERT_PASSES ()
328 285722 : NEXT_PASS (pass_predcom, 1);
329 285722 : NEXT_PASS (pass_complete_unroll, 1);
330 285722 : NEXT_PASS (pass_pre_slp_scalar_cleanup, 1);
331 285722 : PUSH_INSERT_PASSES_WITHIN (pass_pre_slp_scalar_cleanup, 1)
332 285722 : NEXT_PASS_WITH_ARG (pass_fre, 4, false /* may_iterate */);
333 285722 : NEXT_PASS (pass_dse, 4);
334 : POP_INSERT_PASSES ()
335 285722 : NEXT_PASS (pass_slp_vectorize, 1);
336 285722 : NEXT_PASS (pass_loop_prefetch, 1);
337 : /* Run IVOPTs after the last pass that uses data-reference analysis
338 : as that doesn't handle TARGET_MEM_REFs. */
339 285722 : NEXT_PASS (pass_iv_optimize, 1);
340 285722 : NEXT_PASS (pass_lim, 4);
341 285722 : NEXT_PASS (pass_tree_loop_done, 1);
342 : POP_INSERT_PASSES ()
343 : /* Pass group that runs when pass_tree_loop is disabled or there
344 : are no loops in the function. */
345 285722 : NEXT_PASS (pass_tree_no_loop, 1);
346 285722 : PUSH_INSERT_PASSES_WITHIN (pass_tree_no_loop, 1)
347 285722 : NEXT_PASS (pass_slp_vectorize, 2);
348 : POP_INSERT_PASSES ()
349 285722 : NEXT_PASS (pass_simduid_cleanup, 1);
350 285722 : NEXT_PASS (pass_lower_vector_ssa, 1);
351 285722 : NEXT_PASS (pass_lower_switch, 1);
352 285722 : NEXT_PASS (pass_cse_sincos, 1);
353 285722 : NEXT_PASS (pass_cse_reciprocals, 1);
354 285722 : NEXT_PASS_WITH_ARG (pass_reassoc, 2, false /* early_p */);
355 285722 : NEXT_PASS (pass_strength_reduction, 1);
356 285722 : NEXT_PASS (pass_split_paths, 1);
357 285722 : NEXT_PASS (pass_tracer, 1);
358 285722 : NEXT_PASS_WITH_ARG (pass_fre, 5, false /* may_iterate */);
359 : /* After late FRE we rewrite no longer addressed locals into SSA
360 : form if possible. */
361 285722 : NEXT_PASS_WITH_ARG (pass_thread_jumps, 2, /*first=*/false);
362 285722 : NEXT_PASS_WITH_ARG (pass_dominator, 3, false /* may_peel_loop_headers_p */);
363 285722 : NEXT_PASS (pass_strlen, 1);
364 285722 : NEXT_PASS_WITH_ARG (pass_thread_jumps_full, 2, /*first=*/false);
365 285722 : NEXT_PASS_WITH_ARG (pass_vrp, 2, true /* final_p */);
366 : /* Run CCP to compute alignment and nonzero bits. */
367 285722 : NEXT_PASS_WITH_ARG (pass_ccp, 4, true /* nonzero_p */);
368 285722 : NEXT_PASS (pass_warn_restrict, 1);
369 285722 : NEXT_PASS (pass_dse, 5);
370 857166 : NEXT_PASS_WITH_ARGS (pass_dce, 7, true /* update_address_taken_p */, true /* remove_unused_locals */);
371 : /* After late DCE we rewrite no longer addressed locals into SSA
372 : form if possible. */
373 857166 : NEXT_PASS_WITH_ARGS (pass_forwprop, 4, /*full_walk=*/false, /*last=*/true);
374 285722 : NEXT_PASS_WITH_ARG (pass_sink_code, 2, true /* unsplit edges */);
375 285722 : NEXT_PASS_WITH_ARG (pass_phiopt, 4, false /* early_p */);
376 285722 : NEXT_PASS (pass_optimize_widening_mul, 1);
377 285722 : NEXT_PASS (pass_store_merging, 1);
378 : /* If DCE is not run before checking for uninitialized uses,
379 : we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c).
380 : However, this also causes us to misdiagnose cases that should be
381 : real warnings (e.g., testsuite/gcc.dg/pr18501.c). */
382 285722 : NEXT_PASS_WITH_ARG (pass_cd_dce, 3, false /* update_address_taken_p */);
383 285722 : NEXT_PASS (pass_sccopy, 2);
384 285722 : NEXT_PASS (pass_tail_calls, 1);
385 : /* Split critical edges before late uninit warning to reduce the
386 : number of false positives from it. */
387 285722 : NEXT_PASS (pass_split_crit_edges, 1);
388 285722 : NEXT_PASS (pass_late_warn_uninitialized, 1);
389 285722 : NEXT_PASS (pass_local_pure_const, 2);
390 285722 : NEXT_PASS (pass_modref, 2);
391 : /* uncprop replaces constants by SSA names. This makes analysis harder
392 : and thus it should be run last. */
393 285722 : NEXT_PASS (pass_uncprop, 1);
394 : POP_INSERT_PASSES ()
395 285722 : NEXT_PASS (pass_all_optimizations_g, 1);
396 285722 : PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations_g, 1)
397 : /* The idea is that with -Og we do not perform any IPA optimization
398 : so post-IPA work should be restricted to semantically required
399 : passes and all optimization work is done early. */
400 285722 : NEXT_PASS (pass_remove_cgraph_callee_edges, 3);
401 285722 : NEXT_PASS_WITH_ARG (pass_strip_predict_hints, 3, false /* early_p */);
402 : /* Lower remaining pieces of GIMPLE. */
403 285722 : NEXT_PASS (pass_lower_complex, 2);
404 285722 : NEXT_PASS (pass_lower_bitint, 2);
405 285722 : NEXT_PASS (pass_lower_vector_ssa, 2);
406 285722 : NEXT_PASS (pass_lower_switch, 2);
407 : /* Perform simple scalar cleanup which is constant/copy propagation. */
408 285722 : NEXT_PASS_WITH_ARG (pass_ccp, 5, true /* nonzero_p */);
409 285722 : NEXT_PASS (pass_post_ipa_warn, 2);
410 285722 : NEXT_PASS (pass_object_sizes, 2);
411 285722 : NEXT_PASS (pass_strlen, 2);
412 : /* Fold remaining builtins. */
413 857166 : NEXT_PASS_WITH_ARGS (pass_forwprop, 5, /*full_walk=*/false, /*last=*/true);
414 285722 : NEXT_PASS (pass_dce, 8);
415 : /* Profile count may overflow as a result of inlinining very large
416 : loop nests. This pass should run before any late pass that makes
417 : use of profile. */
418 285722 : NEXT_PASS (pass_rebuild_frequencies, 2);
419 285722 : NEXT_PASS (pass_sancov, 2);
420 285722 : NEXT_PASS (pass_asan, 2);
421 285722 : NEXT_PASS (pass_tsan, 2);
422 : /* ??? We do want some kind of loop invariant motion, but we possibly
423 : need to adjust LIM to be more friendly towards preserving accurate
424 : debug information here. */
425 : /* Split critical edges before late uninit warning to reduce the
426 : number of false positives from it. */
427 285722 : NEXT_PASS (pass_split_crit_edges, 2);
428 285722 : NEXT_PASS (pass_late_warn_uninitialized, 2);
429 : /* uncprop replaces constants by SSA names. This makes analysis harder
430 : and thus it should be run last. */
431 285722 : NEXT_PASS (pass_uncprop, 2);
432 : POP_INSERT_PASSES ()
433 285722 : NEXT_PASS (pass_assumptions, 1);
434 285722 : NEXT_PASS (pass_tm_init, 1);
435 285722 : PUSH_INSERT_PASSES_WITHIN (pass_tm_init, 1)
436 285722 : NEXT_PASS (pass_tm_mark, 1);
437 285722 : NEXT_PASS (pass_tm_memopt, 1);
438 285722 : NEXT_PASS (pass_tm_edges, 1);
439 : POP_INSERT_PASSES ()
440 285722 : NEXT_PASS (pass_simduid_cleanup, 2);
441 285722 : NEXT_PASS (pass_vtable_verify, 1);
442 285722 : NEXT_PASS (pass_lower_vaarg, 1);
443 285722 : NEXT_PASS (pass_lower_vector, 1);
444 285722 : NEXT_PASS (pass_lower_complex_O0, 1);
445 285722 : NEXT_PASS (pass_lower_bitint_O0, 1);
446 285722 : NEXT_PASS (pass_sancov_O0, 1);
447 285722 : NEXT_PASS (pass_lower_switch_O0, 1);
448 285722 : NEXT_PASS (pass_asan_O0, 1);
449 285722 : NEXT_PASS (pass_tsan_O0, 1);
450 285722 : NEXT_PASS (pass_musttail, 1);
451 285722 : NEXT_PASS (pass_sanopt, 1);
452 285722 : NEXT_PASS (pass_cleanup_eh, 2);
453 285722 : NEXT_PASS (pass_lower_resx, 1);
454 285722 : NEXT_PASS (pass_nrv, 1);
455 285722 : NEXT_PASS (pass_gimple_isel, 1);
456 285722 : NEXT_PASS (pass_harden_conditional_branches, 1);
457 285722 : NEXT_PASS (pass_harden_compares, 1);
458 857166 : NEXT_PASS_WITH_ARGS (pass_warn_access, 3, /*early=*/false, /*check_dangling=*/false);
459 285722 : NEXT_PASS (pass_cleanup_cfg_post_optimizing, 1);
460 285722 : NEXT_PASS (pass_warn_function_noreturn, 1);
461 :
462 285722 : NEXT_PASS (pass_expand, 1);
463 :
464 285722 : NEXT_PASS (pass_rest_of_compilation, 1);
465 285722 : PUSH_INSERT_PASSES_WITHIN (pass_rest_of_compilation, 1)
466 285722 : NEXT_PASS (pass_instantiate_virtual_regs, 1);
467 285722 : NEXT_PASS (pass_into_cfg_layout_mode, 1);
468 285722 : NEXT_PASS (pass_jump, 1);
469 285722 : NEXT_PASS (pass_lower_subreg, 1);
470 285722 : NEXT_PASS (pass_df_initialize_opt, 1);
471 285722 : NEXT_PASS (pass_cse, 1);
472 285722 : NEXT_PASS (pass_rtl_fwprop, 1);
473 285722 : NEXT_PASS (pass_rtl_cprop, 1);
474 285722 : NEXT_PASS (pass_rtl_pre, 1);
475 285722 : NEXT_PASS (pass_rtl_hoist, 1);
476 285722 : NEXT_PASS (pass_hardreg_pre, 1);
477 285722 : NEXT_PASS (pass_rtl_cprop, 2);
478 285722 : NEXT_PASS (pass_rtl_store_motion, 1);
479 285722 : NEXT_PASS (pass_cse_after_global_opts, 1);
480 285722 : NEXT_PASS (pass_rtl_ifcvt, 1);
481 285722 : NEXT_PASS (pass_apx_nf_convert, 1);
482 285722 : NEXT_PASS (pass_reginfo_init, 1);
483 : /* Perform loop optimizations. It might be better to do them a bit
484 : sooner, but we want the profile feedback to work more
485 : efficiently. */
486 285722 : NEXT_PASS (pass_loop2, 1);
487 285722 : PUSH_INSERT_PASSES_WITHIN (pass_loop2, 1)
488 285722 : NEXT_PASS (pass_rtl_loop_init, 1);
489 285722 : NEXT_PASS (pass_rtl_move_loop_invariants, 1);
490 285722 : NEXT_PASS (pass_rtl_unroll_loops, 1);
491 285722 : NEXT_PASS (pass_rtl_doloop, 1);
492 285722 : NEXT_PASS (pass_rtl_loop_done, 1);
493 : POP_INSERT_PASSES ()
494 285722 : NEXT_PASS (pass_lower_subreg2, 1);
495 285722 : NEXT_PASS (pass_web, 1);
496 285722 : NEXT_PASS (pass_rtl_cprop, 3);
497 285722 : NEXT_PASS_WITH_ARG (pass_stv, 1, true /* timode_p */);
498 285722 : NEXT_PASS (pass_cse2, 1);
499 285722 : NEXT_PASS (pass_rtl_dse1, 1);
500 285722 : NEXT_PASS (pass_rtl_fwprop_addr, 1);
501 285722 : NEXT_PASS (pass_inc_dec, 1);
502 285722 : NEXT_PASS (pass_initialize_regs, 1);
503 285722 : NEXT_PASS (pass_ud_rtl_dce, 1);
504 285722 : NEXT_PASS (pass_ext_dce, 1);
505 285722 : NEXT_PASS (pass_combine, 1);
506 285722 : NEXT_PASS (pass_late_combine, 1);
507 285722 : NEXT_PASS (pass_remove_partial_avx_dependency, 1);
508 285722 : NEXT_PASS (pass_x86_cse, 1);
509 285722 : NEXT_PASS_WITH_ARG (pass_stv, 2, false /* timode_p */);
510 285722 : NEXT_PASS (pass_if_after_combine, 1);
511 285722 : NEXT_PASS (pass_jump_after_combine, 1);
512 285722 : NEXT_PASS (pass_partition_blocks, 1);
513 285722 : NEXT_PASS (pass_outof_cfg_layout_mode, 1);
514 285722 : NEXT_PASS (pass_split_all_insns, 1);
515 285722 : NEXT_PASS (pass_lower_subreg3, 1);
516 285722 : NEXT_PASS (pass_df_initialize_no_opt, 1);
517 285722 : NEXT_PASS (pass_stack_ptr_mod, 1);
518 285722 : NEXT_PASS (pass_mode_switching, 1);
519 285722 : NEXT_PASS (pass_match_asm_constraints, 1);
520 285722 : NEXT_PASS (pass_sms, 1);
521 285722 : NEXT_PASS (pass_live_range_shrinkage, 1);
522 285722 : NEXT_PASS (pass_sched, 1);
523 285722 : NEXT_PASS (pass_rtl_avoid_store_forwarding, 1);
524 285722 : NEXT_PASS (pass_early_remat, 1);
525 285722 : NEXT_PASS (pass_dep_fusion, 1);
526 285722 : NEXT_PASS (pass_ira, 1);
527 285722 : NEXT_PASS (pass_reload, 1);
528 : /* In the following, some passes are tied to 'pass_postreload' and others
529 : to 'pass_late_compilation'. The difference is that the latter also
530 : run for 'targetm.no_register_allocation' targets. */
531 285722 : NEXT_PASS (pass_postreload, 1);
532 285722 : PUSH_INSERT_PASSES_WITHIN (pass_postreload, 1)
533 285722 : NEXT_PASS (pass_postreload_cse, 1);
534 285722 : NEXT_PASS (pass_insert_vzeroupper, 1);
535 285722 : NEXT_PASS (pass_late_combine, 2);
536 285722 : NEXT_PASS (pass_gcse2, 1);
537 285722 : NEXT_PASS (pass_split_after_reload, 1);
538 285722 : NEXT_PASS (pass_ree, 1);
539 285722 : NEXT_PASS (pass_compare_elim_after_reload, 1);
540 285722 : NEXT_PASS (pass_thread_prologue_and_epilogue, 1);
541 285722 : NEXT_PASS (pass_rtl_dse2, 1);
542 285722 : NEXT_PASS (pass_stack_adjustments, 1);
543 285722 : NEXT_PASS (pass_jump2, 1);
544 285722 : NEXT_PASS (pass_duplicate_computed_gotos, 1);
545 285722 : NEXT_PASS (pass_sched_fusion, 1);
546 285722 : NEXT_PASS (pass_peephole2, 1);
547 285722 : NEXT_PASS (pass_if_after_reload, 1);
548 285722 : NEXT_PASS (pass_dep_fusion, 2);
549 285722 : NEXT_PASS (pass_regrename, 1);
550 285722 : NEXT_PASS (pass_fold_mem_offsets, 1);
551 285722 : NEXT_PASS (pass_cprop_hardreg, 1);
552 285722 : NEXT_PASS (pass_fast_rtl_dce, 1);
553 285722 : NEXT_PASS (pass_reorder_blocks, 1);
554 285722 : NEXT_PASS (pass_leaf_regs, 1);
555 285722 : NEXT_PASS (pass_split_before_sched2, 1);
556 285722 : NEXT_PASS (pass_sched2, 1);
557 285722 : NEXT_PASS (pass_stack_regs, 1);
558 285722 : PUSH_INSERT_PASSES_WITHIN (pass_stack_regs, 1)
559 285722 : NEXT_PASS (pass_split_before_regstack, 1);
560 285722 : NEXT_PASS (pass_stack_regs_run, 1);
561 : POP_INSERT_PASSES ()
562 : POP_INSERT_PASSES ()
563 285722 : NEXT_PASS (pass_late_thread_prologue_and_epilogue, 1);
564 : /* No target-independent code motion is allowed beyond this point,
565 : excepting the legacy delayed-branch pass. */
566 285722 : NEXT_PASS (pass_late_compilation, 1);
567 285722 : PUSH_INSERT_PASSES_WITHIN (pass_late_compilation, 1)
568 285722 : NEXT_PASS (pass_zero_call_used_regs, 1);
569 285722 : NEXT_PASS (pass_compute_alignments, 1);
570 285722 : NEXT_PASS (pass_variable_tracking, 1);
571 285722 : NEXT_PASS (pass_free_cfg, 1);
572 285722 : NEXT_PASS (pass_machine_reorg, 1);
573 285722 : NEXT_PASS (pass_cleanup_barriers, 1);
574 285722 : NEXT_PASS (pass_delay_slots, 1);
575 285722 : NEXT_PASS (pass_split_for_shorten_branches, 1);
576 285722 : NEXT_PASS (pass_convert_to_eh_region_ranges, 1);
577 285722 : NEXT_PASS (pass_insert_endbr_and_patchable_area, 1);
578 285722 : NEXT_PASS (pass_align_tight_loops, 1);
579 285722 : NEXT_PASS (pass_shorten_branches, 1);
580 285722 : NEXT_PASS (pass_set_nothrow_function_flags, 1);
581 285722 : NEXT_PASS (pass_dwarf2_frame, 1);
582 285722 : NEXT_PASS (pass_final, 1);
583 : POP_INSERT_PASSES ()
584 285722 : NEXT_PASS (pass_df_finish, 1);
585 : POP_INSERT_PASSES ()
586 571444 : NEXT_PASS (pass_clean_state, 1);
587 285722 : TERMINATE_PASS_LIST (all_passes)
588 : /* Description of target passes for IA-32
589 : Copyright (C) 2016-2026 Free Software Foundation, Inc.
590 :
591 : This file is part of GCC.
592 :
593 : GCC is free software; you can redistribute it and/or modify it under
594 : the terms of the GNU General Public License as published by the Free
595 : Software Foundation; either version 3, or (at your option) any later
596 : version.
597 :
598 : GCC is distributed in the hope that it will be useful, but WITHOUT ANY
599 : WARRANTY; without even the implied warranty of MERCHANTABILITY or
600 : FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
601 : for more details.
602 :
603 : You should have received a copy of the GNU General Public License
604 : along with GCC; see the file COPYING3. If not see
605 : <http://www.gnu.org/licenses/>. */
606 :
607 : /*
608 : Macros that can be used in this file:
609 : */
610 :
611 : /* Run the 64-bit STV pass before the CSE pass so that CONST0_RTX and
612 : CONSTM1_RTX generated by the STV pass can be CSEed. */
613 :
614 : /* pass_align_tight_loops must be after pass_insert_endbr_and_patchable_area.
615 : PR116174. */
616 :
617 : #undef INSERT_PASSES_AFTER
618 : #undef PUSH_INSERT_PASSES_WITHIN
619 : #undef POP_INSERT_PASSES
620 : #undef NEXT_PASS
621 : #undef NEXT_PASS_WITH_ARG
622 : #undef NEXT_PASS_WITH_ARGS
623 : #undef TERMINATE_PASS_LIST
|