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