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