annotate gcc/passes.def @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
kono
parents:
diff changeset
1 /* Description of pass structure
kono
parents:
diff changeset
2 Copyright (C) 1987-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 /*
kono
parents:
diff changeset
21 Macros that should be defined when using this file:
kono
parents:
diff changeset
22 INSERT_PASSES_AFTER (PASS)
kono
parents:
diff changeset
23 PUSH_INSERT_PASSES_WITHIN (PASS)
kono
parents:
diff changeset
24 POP_INSERT_PASSES ()
kono
parents:
diff changeset
25 NEXT_PASS (PASS)
kono
parents:
diff changeset
26 TERMINATE_PASS_LIST (PASS)
kono
parents:
diff changeset
27 */
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 /* All passes needed to lower the function into shape optimizers can
kono
parents:
diff changeset
30 operate on. These passes are always run first on the function, but
kono
parents:
diff changeset
31 backend might produce already lowered functions that are not processed
kono
parents:
diff changeset
32 by these passes. */
kono
parents:
diff changeset
33 INSERT_PASSES_AFTER (all_lowering_passes)
kono
parents:
diff changeset
34 NEXT_PASS (pass_warn_unused_result);
kono
parents:
diff changeset
35 NEXT_PASS (pass_diagnose_omp_blocks);
kono
parents:
diff changeset
36 NEXT_PASS (pass_diagnose_tm_blocks);
kono
parents:
diff changeset
37 NEXT_PASS (pass_lower_omp);
kono
parents:
diff changeset
38 NEXT_PASS (pass_lower_cf);
kono
parents:
diff changeset
39 NEXT_PASS (pass_lower_tm);
kono
parents:
diff changeset
40 NEXT_PASS (pass_refactor_eh);
kono
parents:
diff changeset
41 NEXT_PASS (pass_lower_eh);
kono
parents:
diff changeset
42 NEXT_PASS (pass_build_cfg);
kono
parents:
diff changeset
43 NEXT_PASS (pass_warn_function_return);
kono
parents:
diff changeset
44 NEXT_PASS (pass_expand_omp);
kono
parents:
diff changeset
45 NEXT_PASS (pass_sprintf_length, false);
kono
parents:
diff changeset
46 NEXT_PASS (pass_walloca, /*strict_mode_p=*/true);
kono
parents:
diff changeset
47 NEXT_PASS (pass_build_cgraph_edges);
kono
parents:
diff changeset
48 TERMINATE_PASS_LIST (all_lowering_passes)
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 /* Interprocedural optimization passes. */
kono
parents:
diff changeset
51 INSERT_PASSES_AFTER (all_small_ipa_passes)
kono
parents:
diff changeset
52 NEXT_PASS (pass_ipa_free_lang_data);
kono
parents:
diff changeset
53 NEXT_PASS (pass_ipa_function_and_variable_visibility);
kono
parents:
diff changeset
54 NEXT_PASS (pass_ipa_chkp_versioning);
kono
parents:
diff changeset
55 NEXT_PASS (pass_ipa_chkp_early_produce_thunks);
kono
parents:
diff changeset
56 NEXT_PASS (pass_build_ssa_passes);
kono
parents:
diff changeset
57 PUSH_INSERT_PASSES_WITHIN (pass_build_ssa_passes)
kono
parents:
diff changeset
58 NEXT_PASS (pass_fixup_cfg);
kono
parents:
diff changeset
59 NEXT_PASS (pass_build_ssa);
kono
parents:
diff changeset
60 NEXT_PASS (pass_warn_nonnull_compare);
kono
parents:
diff changeset
61 NEXT_PASS (pass_ubsan);
kono
parents:
diff changeset
62 NEXT_PASS (pass_early_warn_uninitialized);
kono
parents:
diff changeset
63 NEXT_PASS (pass_nothrow);
kono
parents:
diff changeset
64 NEXT_PASS (pass_rebuild_cgraph_edges);
kono
parents:
diff changeset
65 POP_INSERT_PASSES ()
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 NEXT_PASS (pass_chkp_instrumentation_passes);
kono
parents:
diff changeset
68 PUSH_INSERT_PASSES_WITHIN (pass_chkp_instrumentation_passes)
kono
parents:
diff changeset
69 NEXT_PASS (pass_fixup_cfg);
kono
parents:
diff changeset
70 NEXT_PASS (pass_chkp);
kono
parents:
diff changeset
71 NEXT_PASS (pass_rebuild_cgraph_edges);
kono
parents:
diff changeset
72 POP_INSERT_PASSES ()
kono
parents:
diff changeset
73
kono
parents:
diff changeset
74 NEXT_PASS (pass_local_optimization_passes);
kono
parents:
diff changeset
75 PUSH_INSERT_PASSES_WITHIN (pass_local_optimization_passes)
kono
parents:
diff changeset
76 NEXT_PASS (pass_fixup_cfg);
kono
parents:
diff changeset
77 NEXT_PASS (pass_rebuild_cgraph_edges);
kono
parents:
diff changeset
78 NEXT_PASS (pass_local_fn_summary);
kono
parents:
diff changeset
79 NEXT_PASS (pass_early_inline);
kono
parents:
diff changeset
80 NEXT_PASS (pass_all_early_optimizations);
kono
parents:
diff changeset
81 PUSH_INSERT_PASSES_WITHIN (pass_all_early_optimizations)
kono
parents:
diff changeset
82 NEXT_PASS (pass_remove_cgraph_callee_edges);
kono
parents:
diff changeset
83 NEXT_PASS (pass_object_sizes, true /* insert_min_max_p */);
kono
parents:
diff changeset
84 /* Don't record nonzero bits before IPA to avoid
kono
parents:
diff changeset
85 using too much memory. */
kono
parents:
diff changeset
86 NEXT_PASS (pass_ccp, false /* nonzero_p */);
kono
parents:
diff changeset
87 /* After CCP we rewrite no longer addressed locals into SSA
kono
parents:
diff changeset
88 form if possible. */
kono
parents:
diff changeset
89 NEXT_PASS (pass_forwprop);
kono
parents:
diff changeset
90 NEXT_PASS (pass_early_thread_jumps);
kono
parents:
diff changeset
91 NEXT_PASS (pass_sra_early);
kono
parents:
diff changeset
92 /* pass_build_ealias is a dummy pass that ensures that we
kono
parents:
diff changeset
93 execute TODO_rebuild_alias at this point. */
kono
parents:
diff changeset
94 NEXT_PASS (pass_build_ealias);
kono
parents:
diff changeset
95 NEXT_PASS (pass_fre);
kono
parents:
diff changeset
96 NEXT_PASS (pass_early_vrp);
kono
parents:
diff changeset
97 NEXT_PASS (pass_merge_phi);
kono
parents:
diff changeset
98 NEXT_PASS (pass_dse);
kono
parents:
diff changeset
99 NEXT_PASS (pass_cd_dce);
kono
parents:
diff changeset
100 NEXT_PASS (pass_early_ipa_sra);
kono
parents:
diff changeset
101 NEXT_PASS (pass_tail_recursion);
kono
parents:
diff changeset
102 NEXT_PASS (pass_convert_switch);
kono
parents:
diff changeset
103 NEXT_PASS (pass_cleanup_eh);
kono
parents:
diff changeset
104 NEXT_PASS (pass_profile);
kono
parents:
diff changeset
105 NEXT_PASS (pass_local_pure_const);
kono
parents:
diff changeset
106 /* Split functions creates parts that are not run through
kono
parents:
diff changeset
107 early optimizations again. It is thus good idea to do this
kono
parents:
diff changeset
108 late. */
kono
parents:
diff changeset
109 NEXT_PASS (pass_split_functions);
kono
parents:
diff changeset
110 NEXT_PASS (pass_strip_predict_hints);
kono
parents:
diff changeset
111 POP_INSERT_PASSES ()
kono
parents:
diff changeset
112 NEXT_PASS (pass_release_ssa_names);
kono
parents:
diff changeset
113 NEXT_PASS (pass_rebuild_cgraph_edges);
kono
parents:
diff changeset
114 NEXT_PASS (pass_local_fn_summary);
kono
parents:
diff changeset
115 POP_INSERT_PASSES ()
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 NEXT_PASS (pass_ipa_oacc);
kono
parents:
diff changeset
118 PUSH_INSERT_PASSES_WITHIN (pass_ipa_oacc)
kono
parents:
diff changeset
119 NEXT_PASS (pass_ipa_pta);
kono
parents:
diff changeset
120 /* Pass group that runs when the function is an offloaded function
kono
parents:
diff changeset
121 containing oacc kernels loops. */
kono
parents:
diff changeset
122 NEXT_PASS (pass_ipa_oacc_kernels);
kono
parents:
diff changeset
123 PUSH_INSERT_PASSES_WITHIN (pass_ipa_oacc_kernels)
kono
parents:
diff changeset
124 NEXT_PASS (pass_oacc_kernels);
kono
parents:
diff changeset
125 PUSH_INSERT_PASSES_WITHIN (pass_oacc_kernels)
kono
parents:
diff changeset
126 NEXT_PASS (pass_ch);
kono
parents:
diff changeset
127 NEXT_PASS (pass_fre);
kono
parents:
diff changeset
128 /* We use pass_lim to rewrite in-memory iteration and reduction
kono
parents:
diff changeset
129 variable accesses in loops into local variables accesses. */
kono
parents:
diff changeset
130 NEXT_PASS (pass_lim);
kono
parents:
diff changeset
131 NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
kono
parents:
diff changeset
132 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
133 NEXT_PASS (pass_parallelize_loops, true /* oacc_kernels_p */);
kono
parents:
diff changeset
134 NEXT_PASS (pass_expand_omp_ssa);
kono
parents:
diff changeset
135 NEXT_PASS (pass_rebuild_cgraph_edges);
kono
parents:
diff changeset
136 POP_INSERT_PASSES ()
kono
parents:
diff changeset
137 POP_INSERT_PASSES ()
kono
parents:
diff changeset
138 POP_INSERT_PASSES ()
kono
parents:
diff changeset
139
kono
parents:
diff changeset
140 NEXT_PASS (pass_target_clone);
kono
parents:
diff changeset
141 NEXT_PASS (pass_ipa_chkp_produce_thunks);
kono
parents:
diff changeset
142 NEXT_PASS (pass_ipa_auto_profile);
kono
parents:
diff changeset
143 NEXT_PASS (pass_ipa_tree_profile);
kono
parents:
diff changeset
144 PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile)
kono
parents:
diff changeset
145 NEXT_PASS (pass_feedback_split_functions);
kono
parents:
diff changeset
146 POP_INSERT_PASSES ()
kono
parents:
diff changeset
147 NEXT_PASS (pass_ipa_free_fn_summary);
kono
parents:
diff changeset
148 NEXT_PASS (pass_ipa_increase_alignment);
kono
parents:
diff changeset
149 NEXT_PASS (pass_ipa_tm);
kono
parents:
diff changeset
150 NEXT_PASS (pass_ipa_lower_emutls);
kono
parents:
diff changeset
151 TERMINATE_PASS_LIST (all_small_ipa_passes)
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 INSERT_PASSES_AFTER (all_regular_ipa_passes)
kono
parents:
diff changeset
154 NEXT_PASS (pass_ipa_whole_program_visibility);
kono
parents:
diff changeset
155 NEXT_PASS (pass_ipa_profile);
kono
parents:
diff changeset
156 NEXT_PASS (pass_ipa_icf);
kono
parents:
diff changeset
157 NEXT_PASS (pass_ipa_devirt);
kono
parents:
diff changeset
158 NEXT_PASS (pass_ipa_cp);
kono
parents:
diff changeset
159 NEXT_PASS (pass_ipa_cdtor_merge);
kono
parents:
diff changeset
160 NEXT_PASS (pass_ipa_hsa);
kono
parents:
diff changeset
161 NEXT_PASS (pass_ipa_fn_summary);
kono
parents:
diff changeset
162 NEXT_PASS (pass_ipa_inline);
kono
parents:
diff changeset
163 NEXT_PASS (pass_ipa_pure_const);
kono
parents:
diff changeset
164 NEXT_PASS (pass_ipa_reference);
kono
parents:
diff changeset
165 /* This pass needs to be scheduled after any IP code duplication. */
kono
parents:
diff changeset
166 NEXT_PASS (pass_ipa_single_use);
kono
parents:
diff changeset
167 /* Comdat privatization come last, as direct references to comdat local
kono
parents:
diff changeset
168 symbols are not allowed outside of the comdat group. Privatizing early
kono
parents:
diff changeset
169 would result in missed optimizations due to this restriction. */
kono
parents:
diff changeset
170 NEXT_PASS (pass_ipa_comdats);
kono
parents:
diff changeset
171 TERMINATE_PASS_LIST (all_regular_ipa_passes)
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 /* Simple IPA passes executed after the regular passes. In WHOPR mode the
kono
parents:
diff changeset
174 passes are executed after partitioning and thus see just parts of the
kono
parents:
diff changeset
175 compiled unit. */
kono
parents:
diff changeset
176 INSERT_PASSES_AFTER (all_late_ipa_passes)
kono
parents:
diff changeset
177 NEXT_PASS (pass_materialize_all_clones);
kono
parents:
diff changeset
178 NEXT_PASS (pass_ipa_pta);
kono
parents:
diff changeset
179 NEXT_PASS (pass_omp_simd_clone);
kono
parents:
diff changeset
180 TERMINATE_PASS_LIST (all_late_ipa_passes)
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 /* These passes are run after IPA passes on every function that is being
kono
parents:
diff changeset
183 output to the assembler file. */
kono
parents:
diff changeset
184 INSERT_PASSES_AFTER (all_passes)
kono
parents:
diff changeset
185 NEXT_PASS (pass_fixup_cfg);
kono
parents:
diff changeset
186 NEXT_PASS (pass_lower_eh_dispatch);
kono
parents:
diff changeset
187 NEXT_PASS (pass_oacc_device_lower);
kono
parents:
diff changeset
188 NEXT_PASS (pass_omp_device_lower);
kono
parents:
diff changeset
189 NEXT_PASS (pass_omp_target_link);
kono
parents:
diff changeset
190 NEXT_PASS (pass_all_optimizations);
kono
parents:
diff changeset
191 PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations)
kono
parents:
diff changeset
192 NEXT_PASS (pass_remove_cgraph_callee_edges);
kono
parents:
diff changeset
193 /* Initial scalar cleanups before alias computation.
kono
parents:
diff changeset
194 They ensure memory accesses are not indirect wherever possible. */
kono
parents:
diff changeset
195 NEXT_PASS (pass_strip_predict_hints);
kono
parents:
diff changeset
196 NEXT_PASS (pass_ccp, true /* nonzero_p */);
kono
parents:
diff changeset
197 NEXT_PASS (pass_post_ipa_warn);
kono
parents:
diff changeset
198 /* After CCP we rewrite no longer addressed locals into SSA
kono
parents:
diff changeset
199 form if possible. */
kono
parents:
diff changeset
200 NEXT_PASS (pass_complete_unrolli);
kono
parents:
diff changeset
201 NEXT_PASS (pass_backprop);
kono
parents:
diff changeset
202 NEXT_PASS (pass_phiprop);
kono
parents:
diff changeset
203 NEXT_PASS (pass_forwprop);
kono
parents:
diff changeset
204 NEXT_PASS (pass_object_sizes, false /* insert_min_max_p */);
kono
parents:
diff changeset
205 /* pass_build_alias is a dummy pass that ensures that we
kono
parents:
diff changeset
206 execute TODO_rebuild_alias at this point. */
kono
parents:
diff changeset
207 NEXT_PASS (pass_build_alias);
kono
parents:
diff changeset
208 NEXT_PASS (pass_return_slot);
kono
parents:
diff changeset
209 NEXT_PASS (pass_fre);
kono
parents:
diff changeset
210 NEXT_PASS (pass_merge_phi);
kono
parents:
diff changeset
211 NEXT_PASS (pass_thread_jumps);
kono
parents:
diff changeset
212 NEXT_PASS (pass_vrp, true /* warn_array_bounds_p */);
kono
parents:
diff changeset
213 NEXT_PASS (pass_chkp_opt);
kono
parents:
diff changeset
214 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
215 NEXT_PASS (pass_stdarg);
kono
parents:
diff changeset
216 NEXT_PASS (pass_call_cdce);
kono
parents:
diff changeset
217 NEXT_PASS (pass_cselim);
kono
parents:
diff changeset
218 NEXT_PASS (pass_copy_prop);
kono
parents:
diff changeset
219 NEXT_PASS (pass_tree_ifcombine);
kono
parents:
diff changeset
220 NEXT_PASS (pass_merge_phi);
kono
parents:
diff changeset
221 NEXT_PASS (pass_phiopt);
kono
parents:
diff changeset
222 NEXT_PASS (pass_tail_recursion);
kono
parents:
diff changeset
223 NEXT_PASS (pass_ch);
kono
parents:
diff changeset
224 NEXT_PASS (pass_lower_complex);
kono
parents:
diff changeset
225 NEXT_PASS (pass_sra);
kono
parents:
diff changeset
226 /* The dom pass will also resolve all __builtin_constant_p calls
kono
parents:
diff changeset
227 that are still there to 0. This has to be done after some
kono
parents:
diff changeset
228 propagations have already run, but before some more dead code
kono
parents:
diff changeset
229 is removed, and this place fits nicely. Remember this when
kono
parents:
diff changeset
230 trying to move or duplicate pass_dominator somewhere earlier. */
kono
parents:
diff changeset
231 NEXT_PASS (pass_thread_jumps);
kono
parents:
diff changeset
232 NEXT_PASS (pass_dominator, true /* may_peel_loop_headers_p */);
kono
parents:
diff changeset
233 /* At this point the majority of const/copy propagations
kono
parents:
diff changeset
234 are exposed. Go ahead and identify paths that should never
kono
parents:
diff changeset
235 be executed in a conforming program and isolate those paths.
kono
parents:
diff changeset
236
kono
parents:
diff changeset
237 This will expose more degenerate PHIs in the main path and
kono
parents:
diff changeset
238 expose more PRE/DOM optimization opportunities. */
kono
parents:
diff changeset
239 NEXT_PASS (pass_isolate_erroneous_paths);
kono
parents:
diff changeset
240 /* The only const/copy propagation opportunities left after
kono
parents:
diff changeset
241 DOM and erroneous path isolation should be due to degenerate PHI nodes.
kono
parents:
diff changeset
242 So rather than run the full propagators, run a specialized pass which
kono
parents:
diff changeset
243 only examines PHIs to discover const/copy propagation
kono
parents:
diff changeset
244 opportunities. */
kono
parents:
diff changeset
245 NEXT_PASS (pass_phi_only_cprop);
kono
parents:
diff changeset
246 NEXT_PASS (pass_dse);
kono
parents:
diff changeset
247 NEXT_PASS (pass_reassoc, true /* insert_powi_p */);
kono
parents:
diff changeset
248 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
249 NEXT_PASS (pass_forwprop);
kono
parents:
diff changeset
250 NEXT_PASS (pass_phiopt);
kono
parents:
diff changeset
251 NEXT_PASS (pass_ccp, true /* nonzero_p */);
kono
parents:
diff changeset
252 /* After CCP we rewrite no longer addressed locals into SSA
kono
parents:
diff changeset
253 form if possible. */
kono
parents:
diff changeset
254 NEXT_PASS (pass_cse_sincos);
kono
parents:
diff changeset
255 NEXT_PASS (pass_optimize_bswap);
kono
parents:
diff changeset
256 NEXT_PASS (pass_laddress);
kono
parents:
diff changeset
257 NEXT_PASS (pass_lim);
kono
parents:
diff changeset
258 NEXT_PASS (pass_walloca, false);
kono
parents:
diff changeset
259 NEXT_PASS (pass_pre);
kono
parents:
diff changeset
260 NEXT_PASS (pass_sink_code);
kono
parents:
diff changeset
261 NEXT_PASS (pass_sancov);
kono
parents:
diff changeset
262 NEXT_PASS (pass_asan);
kono
parents:
diff changeset
263 NEXT_PASS (pass_tsan);
kono
parents:
diff changeset
264 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
265 /* Pass group that runs when 1) enabled, 2) there are loops
kono
parents:
diff changeset
266 in the function. Make sure to run pass_fix_loops before
kono
parents:
diff changeset
267 to discover/remove loops before running the gate function
kono
parents:
diff changeset
268 of pass_tree_loop. */
kono
parents:
diff changeset
269 NEXT_PASS (pass_fix_loops);
kono
parents:
diff changeset
270 NEXT_PASS (pass_tree_loop);
kono
parents:
diff changeset
271 PUSH_INSERT_PASSES_WITHIN (pass_tree_loop)
kono
parents:
diff changeset
272 NEXT_PASS (pass_tree_loop_init);
kono
parents:
diff changeset
273 NEXT_PASS (pass_tree_unswitch);
kono
parents:
diff changeset
274 NEXT_PASS (pass_scev_cprop);
kono
parents:
diff changeset
275 NEXT_PASS (pass_loop_split);
kono
parents:
diff changeset
276 /* All unswitching, final value replacement and splitting can expose
kono
parents:
diff changeset
277 empty loops. Remove them now. */
kono
parents:
diff changeset
278 NEXT_PASS (pass_cd_dce);
kono
parents:
diff changeset
279 NEXT_PASS (pass_iv_canon);
kono
parents:
diff changeset
280 NEXT_PASS (pass_loop_distribution);
kono
parents:
diff changeset
281 NEXT_PASS (pass_copy_prop);
kono
parents:
diff changeset
282 NEXT_PASS (pass_graphite);
kono
parents:
diff changeset
283 PUSH_INSERT_PASSES_WITHIN (pass_graphite)
kono
parents:
diff changeset
284 NEXT_PASS (pass_graphite_transforms);
kono
parents:
diff changeset
285 NEXT_PASS (pass_lim);
kono
parents:
diff changeset
286 NEXT_PASS (pass_copy_prop);
kono
parents:
diff changeset
287 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
288 POP_INSERT_PASSES ()
kono
parents:
diff changeset
289 NEXT_PASS (pass_parallelize_loops, false /* oacc_kernels_p */);
kono
parents:
diff changeset
290 NEXT_PASS (pass_expand_omp_ssa);
kono
parents:
diff changeset
291 NEXT_PASS (pass_ch_vect);
kono
parents:
diff changeset
292 NEXT_PASS (pass_if_conversion);
kono
parents:
diff changeset
293 /* pass_vectorize must immediately follow pass_if_conversion.
kono
parents:
diff changeset
294 Please do not add any other passes in between. */
kono
parents:
diff changeset
295 NEXT_PASS (pass_vectorize);
kono
parents:
diff changeset
296 PUSH_INSERT_PASSES_WITHIN (pass_vectorize)
kono
parents:
diff changeset
297 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
298 POP_INSERT_PASSES ()
kono
parents:
diff changeset
299 NEXT_PASS (pass_predcom);
kono
parents:
diff changeset
300 NEXT_PASS (pass_complete_unroll);
kono
parents:
diff changeset
301 NEXT_PASS (pass_slp_vectorize);
kono
parents:
diff changeset
302 NEXT_PASS (pass_loop_prefetch);
kono
parents:
diff changeset
303 /* Run IVOPTs after the last pass that uses data-reference analysis
kono
parents:
diff changeset
304 as that doesn't handle TARGET_MEM_REFs. */
kono
parents:
diff changeset
305 NEXT_PASS (pass_iv_optimize);
kono
parents:
diff changeset
306 NEXT_PASS (pass_lim);
kono
parents:
diff changeset
307 NEXT_PASS (pass_tree_loop_done);
kono
parents:
diff changeset
308 POP_INSERT_PASSES ()
kono
parents:
diff changeset
309 /* Pass group that runs when pass_tree_loop is disabled or there
kono
parents:
diff changeset
310 are no loops in the function. */
kono
parents:
diff changeset
311 NEXT_PASS (pass_tree_no_loop);
kono
parents:
diff changeset
312 PUSH_INSERT_PASSES_WITHIN (pass_tree_no_loop)
kono
parents:
diff changeset
313 NEXT_PASS (pass_slp_vectorize);
kono
parents:
diff changeset
314 POP_INSERT_PASSES ()
kono
parents:
diff changeset
315 NEXT_PASS (pass_simduid_cleanup);
kono
parents:
diff changeset
316 NEXT_PASS (pass_lower_vector_ssa);
kono
parents:
diff changeset
317 NEXT_PASS (pass_cse_reciprocals);
kono
parents:
diff changeset
318 NEXT_PASS (pass_sprintf_length, true);
kono
parents:
diff changeset
319 NEXT_PASS (pass_reassoc, false /* insert_powi_p */);
kono
parents:
diff changeset
320 NEXT_PASS (pass_strength_reduction);
kono
parents:
diff changeset
321 NEXT_PASS (pass_split_paths);
kono
parents:
diff changeset
322 NEXT_PASS (pass_tracer);
kono
parents:
diff changeset
323 NEXT_PASS (pass_thread_jumps);
kono
parents:
diff changeset
324 NEXT_PASS (pass_dominator, false /* may_peel_loop_headers_p */);
kono
parents:
diff changeset
325 NEXT_PASS (pass_strlen);
kono
parents:
diff changeset
326 NEXT_PASS (pass_thread_jumps);
kono
parents:
diff changeset
327 NEXT_PASS (pass_vrp, false /* warn_array_bounds_p */);
kono
parents:
diff changeset
328 /* The only const/copy propagation opportunities left after
kono
parents:
diff changeset
329 DOM and VRP should be due to degenerate PHI nodes. So rather than
kono
parents:
diff changeset
330 run the full propagators, run a specialized pass which
kono
parents:
diff changeset
331 only examines PHIs to discover const/copy propagation
kono
parents:
diff changeset
332 opportunities. */
kono
parents:
diff changeset
333 NEXT_PASS (pass_phi_only_cprop);
kono
parents:
diff changeset
334 NEXT_PASS (pass_dse);
kono
parents:
diff changeset
335 NEXT_PASS (pass_cd_dce);
kono
parents:
diff changeset
336 NEXT_PASS (pass_forwprop);
kono
parents:
diff changeset
337 NEXT_PASS (pass_phiopt);
kono
parents:
diff changeset
338 NEXT_PASS (pass_fold_builtins);
kono
parents:
diff changeset
339 NEXT_PASS (pass_optimize_widening_mul);
kono
parents:
diff changeset
340 NEXT_PASS (pass_store_merging);
kono
parents:
diff changeset
341 NEXT_PASS (pass_tail_calls);
kono
parents:
diff changeset
342 /* If DCE is not run before checking for uninitialized uses,
kono
parents:
diff changeset
343 we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c).
kono
parents:
diff changeset
344 However, this also causes us to misdiagnose cases that should be
kono
parents:
diff changeset
345 real warnings (e.g., testsuite/gcc.dg/pr18501.c). */
kono
parents:
diff changeset
346 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
347 /* Split critical edges before late uninit warning to reduce the
kono
parents:
diff changeset
348 number of false positives from it. */
kono
parents:
diff changeset
349 NEXT_PASS (pass_split_crit_edges);
kono
parents:
diff changeset
350 NEXT_PASS (pass_late_warn_uninitialized);
kono
parents:
diff changeset
351 NEXT_PASS (pass_uncprop);
kono
parents:
diff changeset
352 NEXT_PASS (pass_local_pure_const);
kono
parents:
diff changeset
353 POP_INSERT_PASSES ()
kono
parents:
diff changeset
354 NEXT_PASS (pass_all_optimizations_g);
kono
parents:
diff changeset
355 PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations_g)
kono
parents:
diff changeset
356 NEXT_PASS (pass_remove_cgraph_callee_edges);
kono
parents:
diff changeset
357 NEXT_PASS (pass_strip_predict_hints);
kono
parents:
diff changeset
358 /* Lower remaining pieces of GIMPLE. */
kono
parents:
diff changeset
359 NEXT_PASS (pass_lower_complex);
kono
parents:
diff changeset
360 NEXT_PASS (pass_lower_vector_ssa);
kono
parents:
diff changeset
361 /* Perform simple scalar cleanup which is constant/copy propagation. */
kono
parents:
diff changeset
362 NEXT_PASS (pass_ccp, true /* nonzero_p */);
kono
parents:
diff changeset
363 NEXT_PASS (pass_post_ipa_warn);
kono
parents:
diff changeset
364 NEXT_PASS (pass_object_sizes);
kono
parents:
diff changeset
365 /* Fold remaining builtins. */
kono
parents:
diff changeset
366 NEXT_PASS (pass_fold_builtins);
kono
parents:
diff changeset
367 NEXT_PASS (pass_sprintf_length, true);
kono
parents:
diff changeset
368 /* Copy propagation also copy-propagates constants, this is necessary
kono
parents:
diff changeset
369 to forward object-size and builtin folding results properly. */
kono
parents:
diff changeset
370 NEXT_PASS (pass_copy_prop);
kono
parents:
diff changeset
371 NEXT_PASS (pass_dce);
kono
parents:
diff changeset
372 NEXT_PASS (pass_sancov);
kono
parents:
diff changeset
373 NEXT_PASS (pass_asan);
kono
parents:
diff changeset
374 NEXT_PASS (pass_tsan);
kono
parents:
diff changeset
375 /* ??? We do want some kind of loop invariant motion, but we possibly
kono
parents:
diff changeset
376 need to adjust LIM to be more friendly towards preserving accurate
kono
parents:
diff changeset
377 debug information here. */
kono
parents:
diff changeset
378 /* Split critical edges before late uninit warning to reduce the
kono
parents:
diff changeset
379 number of false positives from it. */
kono
parents:
diff changeset
380 NEXT_PASS (pass_split_crit_edges);
kono
parents:
diff changeset
381 NEXT_PASS (pass_late_warn_uninitialized);
kono
parents:
diff changeset
382 NEXT_PASS (pass_uncprop);
kono
parents:
diff changeset
383 NEXT_PASS (pass_local_pure_const);
kono
parents:
diff changeset
384 POP_INSERT_PASSES ()
kono
parents:
diff changeset
385 NEXT_PASS (pass_tm_init);
kono
parents:
diff changeset
386 PUSH_INSERT_PASSES_WITHIN (pass_tm_init)
kono
parents:
diff changeset
387 NEXT_PASS (pass_tm_mark);
kono
parents:
diff changeset
388 NEXT_PASS (pass_tm_memopt);
kono
parents:
diff changeset
389 NEXT_PASS (pass_tm_edges);
kono
parents:
diff changeset
390 POP_INSERT_PASSES ()
kono
parents:
diff changeset
391 NEXT_PASS (pass_simduid_cleanup);
kono
parents:
diff changeset
392 NEXT_PASS (pass_vtable_verify);
kono
parents:
diff changeset
393 NEXT_PASS (pass_lower_vaarg);
kono
parents:
diff changeset
394 NEXT_PASS (pass_lower_vector);
kono
parents:
diff changeset
395 NEXT_PASS (pass_lower_complex_O0);
kono
parents:
diff changeset
396 NEXT_PASS (pass_lower_switch);
kono
parents:
diff changeset
397 NEXT_PASS (pass_sancov_O0);
kono
parents:
diff changeset
398 NEXT_PASS (pass_asan_O0);
kono
parents:
diff changeset
399 NEXT_PASS (pass_tsan_O0);
kono
parents:
diff changeset
400 NEXT_PASS (pass_sanopt);
kono
parents:
diff changeset
401 NEXT_PASS (pass_cleanup_eh);
kono
parents:
diff changeset
402 NEXT_PASS (pass_lower_resx);
kono
parents:
diff changeset
403 NEXT_PASS (pass_nrv);
kono
parents:
diff changeset
404 NEXT_PASS (pass_cleanup_cfg_post_optimizing);
kono
parents:
diff changeset
405 NEXT_PASS (pass_warn_function_noreturn);
kono
parents:
diff changeset
406 NEXT_PASS (pass_gen_hsail);
kono
parents:
diff changeset
407
kono
parents:
diff changeset
408 NEXT_PASS (pass_expand);
kono
parents:
diff changeset
409
kono
parents:
diff changeset
410 NEXT_PASS (pass_rest_of_compilation);
kono
parents:
diff changeset
411 PUSH_INSERT_PASSES_WITHIN (pass_rest_of_compilation)
kono
parents:
diff changeset
412 NEXT_PASS (pass_instantiate_virtual_regs);
kono
parents:
diff changeset
413 NEXT_PASS (pass_into_cfg_layout_mode);
kono
parents:
diff changeset
414 NEXT_PASS (pass_jump);
kono
parents:
diff changeset
415 NEXT_PASS (pass_lower_subreg);
kono
parents:
diff changeset
416 NEXT_PASS (pass_df_initialize_opt);
kono
parents:
diff changeset
417 NEXT_PASS (pass_cse);
kono
parents:
diff changeset
418 NEXT_PASS (pass_rtl_fwprop);
kono
parents:
diff changeset
419 NEXT_PASS (pass_rtl_cprop);
kono
parents:
diff changeset
420 NEXT_PASS (pass_rtl_pre);
kono
parents:
diff changeset
421 NEXT_PASS (pass_rtl_hoist);
kono
parents:
diff changeset
422 NEXT_PASS (pass_rtl_cprop);
kono
parents:
diff changeset
423 NEXT_PASS (pass_rtl_store_motion);
kono
parents:
diff changeset
424 NEXT_PASS (pass_cse_after_global_opts);
kono
parents:
diff changeset
425 NEXT_PASS (pass_rtl_ifcvt);
kono
parents:
diff changeset
426 NEXT_PASS (pass_reginfo_init);
kono
parents:
diff changeset
427 /* Perform loop optimizations. It might be better to do them a bit
kono
parents:
diff changeset
428 sooner, but we want the profile feedback to work more
kono
parents:
diff changeset
429 efficiently. */
kono
parents:
diff changeset
430 NEXT_PASS (pass_loop2);
kono
parents:
diff changeset
431 PUSH_INSERT_PASSES_WITHIN (pass_loop2)
kono
parents:
diff changeset
432 NEXT_PASS (pass_rtl_loop_init);
kono
parents:
diff changeset
433 NEXT_PASS (pass_rtl_move_loop_invariants);
kono
parents:
diff changeset
434 NEXT_PASS (pass_rtl_unroll_loops);
kono
parents:
diff changeset
435 NEXT_PASS (pass_rtl_doloop);
kono
parents:
diff changeset
436 NEXT_PASS (pass_rtl_loop_done);
kono
parents:
diff changeset
437 POP_INSERT_PASSES ()
kono
parents:
diff changeset
438 NEXT_PASS (pass_web);
kono
parents:
diff changeset
439 NEXT_PASS (pass_rtl_cprop);
kono
parents:
diff changeset
440 NEXT_PASS (pass_cse2);
kono
parents:
diff changeset
441 NEXT_PASS (pass_rtl_dse1);
kono
parents:
diff changeset
442 NEXT_PASS (pass_rtl_fwprop_addr);
kono
parents:
diff changeset
443 NEXT_PASS (pass_inc_dec);
kono
parents:
diff changeset
444 NEXT_PASS (pass_initialize_regs);
kono
parents:
diff changeset
445 NEXT_PASS (pass_ud_rtl_dce);
kono
parents:
diff changeset
446 NEXT_PASS (pass_combine);
kono
parents:
diff changeset
447 NEXT_PASS (pass_if_after_combine);
kono
parents:
diff changeset
448 NEXT_PASS (pass_partition_blocks);
kono
parents:
diff changeset
449 NEXT_PASS (pass_outof_cfg_layout_mode);
kono
parents:
diff changeset
450 NEXT_PASS (pass_split_all_insns);
kono
parents:
diff changeset
451 NEXT_PASS (pass_lower_subreg2);
kono
parents:
diff changeset
452 NEXT_PASS (pass_df_initialize_no_opt);
kono
parents:
diff changeset
453 NEXT_PASS (pass_stack_ptr_mod);
kono
parents:
diff changeset
454 NEXT_PASS (pass_mode_switching);
kono
parents:
diff changeset
455 NEXT_PASS (pass_match_asm_constraints);
kono
parents:
diff changeset
456 NEXT_PASS (pass_sms);
kono
parents:
diff changeset
457 NEXT_PASS (pass_live_range_shrinkage);
kono
parents:
diff changeset
458 NEXT_PASS (pass_sched);
kono
parents:
diff changeset
459 NEXT_PASS (pass_ira);
kono
parents:
diff changeset
460 NEXT_PASS (pass_reload);
kono
parents:
diff changeset
461 NEXT_PASS (pass_postreload);
kono
parents:
diff changeset
462 PUSH_INSERT_PASSES_WITHIN (pass_postreload)
kono
parents:
diff changeset
463 NEXT_PASS (pass_postreload_cse);
kono
parents:
diff changeset
464 NEXT_PASS (pass_gcse2);
kono
parents:
diff changeset
465 NEXT_PASS (pass_split_after_reload);
kono
parents:
diff changeset
466 NEXT_PASS (pass_ree);
kono
parents:
diff changeset
467 NEXT_PASS (pass_compare_elim_after_reload);
kono
parents:
diff changeset
468 NEXT_PASS (pass_branch_target_load_optimize1);
kono
parents:
diff changeset
469 NEXT_PASS (pass_thread_prologue_and_epilogue);
kono
parents:
diff changeset
470 NEXT_PASS (pass_rtl_dse2);
kono
parents:
diff changeset
471 NEXT_PASS (pass_stack_adjustments);
kono
parents:
diff changeset
472 NEXT_PASS (pass_jump2);
kono
parents:
diff changeset
473 NEXT_PASS (pass_duplicate_computed_gotos);
kono
parents:
diff changeset
474 NEXT_PASS (pass_sched_fusion);
kono
parents:
diff changeset
475 NEXT_PASS (pass_peephole2);
kono
parents:
diff changeset
476 NEXT_PASS (pass_if_after_reload);
kono
parents:
diff changeset
477 NEXT_PASS (pass_regrename);
kono
parents:
diff changeset
478 NEXT_PASS (pass_cprop_hardreg);
kono
parents:
diff changeset
479 NEXT_PASS (pass_fast_rtl_dce);
kono
parents:
diff changeset
480 NEXT_PASS (pass_reorder_blocks);
kono
parents:
diff changeset
481 NEXT_PASS (pass_branch_target_load_optimize2);
kono
parents:
diff changeset
482 NEXT_PASS (pass_leaf_regs);
kono
parents:
diff changeset
483 NEXT_PASS (pass_split_before_sched2);
kono
parents:
diff changeset
484 NEXT_PASS (pass_sched2);
kono
parents:
diff changeset
485 NEXT_PASS (pass_stack_regs);
kono
parents:
diff changeset
486 PUSH_INSERT_PASSES_WITHIN (pass_stack_regs)
kono
parents:
diff changeset
487 NEXT_PASS (pass_split_before_regstack);
kono
parents:
diff changeset
488 NEXT_PASS (pass_stack_regs_run);
kono
parents:
diff changeset
489 POP_INSERT_PASSES ()
kono
parents:
diff changeset
490 POP_INSERT_PASSES ()
kono
parents:
diff changeset
491 NEXT_PASS (pass_late_compilation);
kono
parents:
diff changeset
492 PUSH_INSERT_PASSES_WITHIN (pass_late_compilation)
kono
parents:
diff changeset
493 NEXT_PASS (pass_compute_alignments);
kono
parents:
diff changeset
494 NEXT_PASS (pass_variable_tracking);
kono
parents:
diff changeset
495 NEXT_PASS (pass_free_cfg);
kono
parents:
diff changeset
496 NEXT_PASS (pass_machine_reorg);
kono
parents:
diff changeset
497 NEXT_PASS (pass_cleanup_barriers);
kono
parents:
diff changeset
498 NEXT_PASS (pass_delay_slots);
kono
parents:
diff changeset
499 NEXT_PASS (pass_split_for_shorten_branches);
kono
parents:
diff changeset
500 NEXT_PASS (pass_convert_to_eh_region_ranges);
kono
parents:
diff changeset
501 NEXT_PASS (pass_shorten_branches);
kono
parents:
diff changeset
502 NEXT_PASS (pass_set_nothrow_function_flags);
kono
parents:
diff changeset
503 NEXT_PASS (pass_dwarf2_frame);
kono
parents:
diff changeset
504 NEXT_PASS (pass_final);
kono
parents:
diff changeset
505 POP_INSERT_PASSES ()
kono
parents:
diff changeset
506 NEXT_PASS (pass_df_finish);
kono
parents:
diff changeset
507 POP_INSERT_PASSES ()
kono
parents:
diff changeset
508 NEXT_PASS (pass_clean_state);
kono
parents:
diff changeset
509 TERMINATE_PASS_LIST (all_passes)