Mercurial > hg > CbC > CbC_gcc
comparison gcc/tree-pass.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
21 | 21 |
22 | 22 |
23 #ifndef GCC_TREE_PASS_H | 23 #ifndef GCC_TREE_PASS_H |
24 #define GCC_TREE_PASS_H 1 | 24 #define GCC_TREE_PASS_H 1 |
25 | 25 |
26 /* In tree-dump.c */ | 26 #include "timevar.h" |
27 | 27 |
28 /* Different tree dump places. When you add new tree dump places, | 28 /* Different tree dump places. When you add new tree dump places, |
29 extend the DUMP_FILES array in tree-dump.c. */ | 29 extend the DUMP_FILES array in tree-dump.c. */ |
30 enum tree_dump_index | 30 enum tree_dump_index |
31 { | 31 { |
69 #define TDF_MEMSYMS (1 << 14) /* display memory symbols in expr. | 69 #define TDF_MEMSYMS (1 << 14) /* display memory symbols in expr. |
70 Implies TDF_VOPS. */ | 70 Implies TDF_VOPS. */ |
71 | 71 |
72 #define TDF_DIAGNOSTIC (1 << 15) /* A dump to be put in a diagnostic | 72 #define TDF_DIAGNOSTIC (1 << 15) /* A dump to be put in a diagnostic |
73 message. */ | 73 message. */ |
74 #define TDF_VERBOSE (1 << 16) /* A dump that uses the full tree | 74 #define TDF_VERBOSE (1 << 16) /* A dump that uses the full tree |
75 dumper to print stmts. */ | 75 dumper to print stmts. */ |
76 #define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of | 76 #define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of |
77 a gimple stmt. */ | 77 a gimple stmt. */ |
78 | 78 #define TDF_ASMNAME (1 << 18) /* display asm names of decls */ |
79 extern char *get_dump_file_name (enum tree_dump_index); | 79 #define TDF_EH (1 << 19) /* display EH region number |
80 extern int dump_enabled_p (enum tree_dump_index); | 80 holding this gimple statement. */ |
81 extern int dump_initialized_p (enum tree_dump_index); | 81 |
82 extern FILE *dump_begin (enum tree_dump_index, int *); | 82 #define TDF_NOUID (1 << 20) /* omit UIDs from dumps. */ |
83 extern void dump_end (enum tree_dump_index, FILE *); | 83 |
84 /* In tree-dump.c */ | |
85 | |
86 extern char *get_dump_file_name (int); | |
87 extern int dump_enabled_p (int); | |
88 extern int dump_initialized_p (int); | |
89 extern FILE *dump_begin (int, int *); | |
90 extern void dump_end (int, FILE *); | |
84 extern void dump_node (const_tree, int, FILE *); | 91 extern void dump_node (const_tree, int, FILE *); |
85 extern int dump_switch_p (const char *); | 92 extern int dump_switch_p (const char *); |
86 extern const char *dump_flag_name (enum tree_dump_index); | 93 extern const char *dump_flag_name (int); |
87 | 94 |
88 /* Global variables used to communicate with passes. */ | 95 /* Global variables used to communicate with passes. */ |
89 extern FILE *dump_file; | 96 extern FILE *dump_file; |
90 extern int dump_flags; | 97 extern int dump_flags; |
91 extern const char *dump_file_name; | 98 extern const char *dump_file_name; |
92 | 99 |
93 /* Return the dump_file_info for the given phase. */ | 100 /* Return the dump_file_info for the given phase. */ |
94 extern struct dump_file_info *get_dump_file_info (enum tree_dump_index); | 101 extern struct dump_file_info *get_dump_file_info (int); |
102 | |
103 /* Optimization pass type. */ | |
104 enum opt_pass_type | |
105 { | |
106 GIMPLE_PASS, | |
107 RTL_PASS, | |
108 SIMPLE_IPA_PASS, | |
109 IPA_PASS | |
110 }; | |
95 | 111 |
96 /* Describe one pass; this is the common part shared across different pass | 112 /* Describe one pass; this is the common part shared across different pass |
97 types. */ | 113 types. */ |
98 struct opt_pass | 114 struct opt_pass |
99 { | 115 { |
100 /* Optimization pass type. */ | 116 /* Optimization pass type. */ |
101 enum opt_pass_type { | 117 enum opt_pass_type type; |
102 GIMPLE_PASS, | 118 |
103 RTL_PASS, | |
104 SIMPLE_IPA_PASS, | |
105 IPA_PASS | |
106 } type; | |
107 /* Terse name of the pass used as a fragment of the dump file | 119 /* Terse name of the pass used as a fragment of the dump file |
108 name. If the name starts with a star, no dump happens. */ | 120 name. If the name starts with a star, no dump happens. */ |
109 const char *name; | 121 const char *name; |
110 | 122 |
111 /* If non-null, this pass and all sub-passes are executed only if | 123 /* If non-null, this pass and all sub-passes are executed only if |
126 /* Static pass number, used as a fragment of the dump file name. */ | 138 /* Static pass number, used as a fragment of the dump file name. */ |
127 int static_pass_number; | 139 int static_pass_number; |
128 | 140 |
129 /* The timevar id associated with this pass. */ | 141 /* The timevar id associated with this pass. */ |
130 /* ??? Ideally would be dynamically assigned. */ | 142 /* ??? Ideally would be dynamically assigned. */ |
131 unsigned int tv_id; | 143 timevar_id_t tv_id; |
132 | 144 |
133 /* Sets of properties input and output from this pass. */ | 145 /* Sets of properties input and output from this pass. */ |
134 unsigned int properties_required; | 146 unsigned int properties_required; |
135 unsigned int properties_provided; | 147 unsigned int properties_provided; |
136 unsigned int properties_destroyed; | 148 unsigned int properties_destroyed; |
152 struct opt_pass pass; | 164 struct opt_pass pass; |
153 }; | 165 }; |
154 | 166 |
155 struct varpool_node; | 167 struct varpool_node; |
156 struct cgraph_node; | 168 struct cgraph_node; |
169 struct cgraph_node_set_def; | |
157 | 170 |
158 /* Description of IPA pass with generate summary, write, execute, read and | 171 /* Description of IPA pass with generate summary, write, execute, read and |
159 transform stages. */ | 172 transform stages. */ |
160 struct ipa_opt_pass | 173 struct ipa_opt_pass_d |
161 { | 174 { |
162 struct opt_pass pass; | 175 struct opt_pass pass; |
163 | 176 |
164 /* IPA passes can analyze function body and variable initializers | 177 /* IPA passes can analyze function body and variable initializers |
165 using this hook and produce summary. */ | 178 using this hook and produce summary. */ |
166 void (*generate_summary) (void); | 179 void (*generate_summary) (void); |
167 | 180 |
168 /* This hook is used to serialize IPA summaries on disk. */ | 181 /* This hook is used to serialize IPA summaries on disk. */ |
169 void (*write_summary) (void); | 182 void (*write_summary) (struct cgraph_node_set_def *); |
170 | 183 |
171 /* For most ipa passes, the information can only be deserialized in | 184 /* For most ipa passes, the information can only be deserialized in |
172 one chunk. However, function bodies are read function at a time | 185 one chunk. However, function bodies are read function at a time |
173 as needed so both calls are necessary. */ | 186 as needed so both calls are necessary. */ |
174 void (*read_summary) (void); | 187 void (*read_summary) (void); |
175 void (*function_read_summary) (struct cgraph_node *); | 188 void (*function_read_summary) (struct cgraph_node *); |
176 | 189 /* Hook to convert gimple stmt uids into true gimple statements. The second |
190 parameter is an array of statements indexed by their uid. */ | |
191 void (*stmt_fixup) (struct cgraph_node *, gimple *); | |
192 | |
177 /* Results of interprocedural propagation of an IPA pass is applied to | 193 /* Results of interprocedural propagation of an IPA pass is applied to |
178 function body via this hook. */ | 194 function body via this hook. */ |
179 unsigned int function_transform_todo_flags_start; | 195 unsigned int function_transform_todo_flags_start; |
180 unsigned int (*function_transform) (struct cgraph_node *); | 196 unsigned int (*function_transform) (struct cgraph_node *); |
181 void (*variable_transform) (struct varpool_node *); | 197 void (*variable_transform) (struct varpool_node *); |
206 #define PROP_cfg (1 << 3) | 222 #define PROP_cfg (1 << 3) |
207 #define PROP_referenced_vars (1 << 4) | 223 #define PROP_referenced_vars (1 << 4) |
208 #define PROP_ssa (1 << 5) | 224 #define PROP_ssa (1 << 5) |
209 #define PROP_no_crit_edges (1 << 6) | 225 #define PROP_no_crit_edges (1 << 6) |
210 #define PROP_rtl (1 << 7) | 226 #define PROP_rtl (1 << 7) |
211 #define PROP_alias (1 << 8) | 227 #define PROP_gimple_lomp (1 << 8) /* lowered OpenMP directives */ |
212 #define PROP_gimple_lomp (1 << 9) /* lowered OpenMP directives */ | 228 #define PROP_cfglayout (1 << 9) /* cfglayout mode on RTL */ |
213 | 229 |
214 #define PROP_trees \ | 230 #define PROP_trees \ |
215 (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) | 231 (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) |
216 | 232 |
217 /* To-do flags. */ | 233 /* To-do flags. */ |
218 #define TODO_dump_func (1 << 0) | 234 #define TODO_dump_func (1 << 0) |
219 #define TODO_ggc_collect (1 << 1) | 235 #define TODO_ggc_collect (1 << 1) |
220 #define TODO_verify_ssa (1 << 2) | 236 #define TODO_verify_ssa (1 << 2) |
221 #define TODO_verify_flow (1 << 3) | 237 #define TODO_verify_flow (1 << 3) |
222 #define TODO_verify_stmts (1 << 4) | 238 #define TODO_verify_stmts (1 << 4) |
223 #define TODO_cleanup_cfg (1 << 5) | 239 #define TODO_cleanup_cfg (1 << 5) |
224 #define TODO_verify_loops (1 << 6) | 240 #define TODO_verify_loops (1 << 6) |
225 #define TODO_dump_cgraph (1 << 7) | 241 #define TODO_dump_cgraph (1 << 7) |
247 | 263 |
248 /* Insert PHI nodes everywhere they are needed. No pruning of the | 264 /* Insert PHI nodes everywhere they are needed. No pruning of the |
249 IDF is done. This is used by passes that need the PHI nodes for | 265 IDF is done. This is used by passes that need the PHI nodes for |
250 O_j even if it means that some arguments will come from the default | 266 O_j even if it means that some arguments will come from the default |
251 definition of O_j's symbol (e.g., pass_linear_transform). | 267 definition of O_j's symbol (e.g., pass_linear_transform). |
252 | 268 |
253 WARNING: If you need to use this flag, chances are that your pass | 269 WARNING: If you need to use this flag, chances are that your pass |
254 may be doing something wrong. Inserting PHI nodes for an old name | 270 may be doing something wrong. Inserting PHI nodes for an old name |
255 where not all edges carry a new replacement may lead to silent | 271 where not all edges carry a new replacement may lead to silent |
256 codegen errors or spurious uninitialized warnings. */ | 272 codegen errors or spurious uninitialized warnings. */ |
257 #define TODO_update_ssa_full_phi (1 << 13) | 273 #define TODO_update_ssa_full_phi (1 << 13) |
267 /* Some passes leave unused local variables that can be removed from | 283 /* Some passes leave unused local variables that can be removed from |
268 cfun->local_decls. This reduces the size of dump files | 284 cfun->local_decls. This reduces the size of dump files |
269 and the memory footprint for VAR_DECLs. */ | 285 and the memory footprint for VAR_DECLs. */ |
270 #define TODO_remove_unused_locals (1 << 15) | 286 #define TODO_remove_unused_locals (1 << 15) |
271 | 287 |
272 /* Internally used for the first in a sequence of passes. It is set | |
273 for the passes that are handed to register_dump_files. */ | |
274 #define TODO_set_props (1 << 16) | |
275 | |
276 /* Call df_finish at the end of the pass. This is done after all of | 288 /* Call df_finish at the end of the pass. This is done after all of |
277 the dumpers have been allowed to run so that they have access to | 289 the dumpers have been allowed to run so that they have access to |
278 the instance before it is destroyed. */ | 290 the instance before it is destroyed. */ |
279 #define TODO_df_finish (1 << 17) | 291 #define TODO_df_finish (1 << 17) |
280 | 292 |
283 | 295 |
284 /* Internally used for the first instance of a pass. */ | 296 /* Internally used for the first instance of a pass. */ |
285 #define TODO_mark_first_instance (1 << 19) | 297 #define TODO_mark_first_instance (1 << 19) |
286 | 298 |
287 /* Rebuild aliasing info. */ | 299 /* Rebuild aliasing info. */ |
288 #define TODO_rebuild_alias (1 << 20) | 300 #define TODO_rebuild_alias (1 << 20) |
289 | 301 |
302 /* Rebuild the addressable-vars bitmap and do register promotion. */ | |
303 #define TODO_update_address_taken (1 << 21) | |
304 | |
305 /* Internally used in execute_function_todo(). */ | |
290 #define TODO_update_ssa_any \ | 306 #define TODO_update_ssa_any \ |
291 (TODO_update_ssa \ | 307 (TODO_update_ssa \ |
292 | TODO_update_ssa_no_phi \ | 308 | TODO_update_ssa_no_phi \ |
293 | TODO_update_ssa_full_phi \ | 309 | TODO_update_ssa_full_phi \ |
294 | TODO_update_ssa_only_virtuals) | 310 | TODO_update_ssa_only_virtuals) |
295 | 311 |
296 #define TODO_verify_all \ | 312 #define TODO_verify_all \ |
297 (TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts) | 313 (TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts) |
298 | 314 |
315 | |
316 /* Register pass info. */ | |
317 | |
318 enum pass_positioning_ops | |
319 { | |
320 PASS_POS_INSERT_AFTER, /* Insert after the reference pass. */ | |
321 PASS_POS_INSERT_BEFORE, /* Insert before the reference pass. */ | |
322 PASS_POS_REPLACE /* Replace the reference pass. */ | |
323 }; | |
324 | |
325 struct register_pass_info | |
326 { | |
327 struct opt_pass *pass; /* New pass to register. */ | |
328 const char *reference_pass_name; /* Name of the reference pass for hooking | |
329 up the new pass. */ | |
330 int ref_pass_instance_number; /* Insert the pass at the specified | |
331 instance number of the reference pass. | |
332 Do it for every instance if it is 0. */ | |
333 enum pass_positioning_ops pos_op; /* how to insert the new pass. */ | |
334 }; | |
335 | |
299 extern void tree_lowering_passes (tree decl); | 336 extern void tree_lowering_passes (tree decl); |
300 | 337 |
301 extern struct gimple_opt_pass pass_mudflap_1; | 338 extern struct gimple_opt_pass pass_mudflap_1; |
302 extern struct gimple_opt_pass pass_mudflap_2; | 339 extern struct gimple_opt_pass pass_mudflap_2; |
303 extern struct gimple_opt_pass pass_remove_useless_stmts; | |
304 extern struct gimple_opt_pass pass_lower_cf; | 340 extern struct gimple_opt_pass pass_lower_cf; |
305 extern struct gimple_opt_pass pass_refactor_eh; | 341 extern struct gimple_opt_pass pass_refactor_eh; |
306 extern struct gimple_opt_pass pass_lower_eh; | 342 extern struct gimple_opt_pass pass_lower_eh; |
343 extern struct gimple_opt_pass pass_lower_eh_dispatch; | |
344 extern struct gimple_opt_pass pass_lower_resx; | |
307 extern struct gimple_opt_pass pass_build_cfg; | 345 extern struct gimple_opt_pass pass_build_cfg; |
308 extern struct gimple_opt_pass pass_tree_profile; | 346 extern struct gimple_opt_pass pass_tree_profile; |
309 extern struct gimple_opt_pass pass_early_tree_profile; | 347 extern struct gimple_opt_pass pass_early_tree_profile; |
310 extern struct gimple_opt_pass pass_cleanup_cfg; | 348 extern struct gimple_opt_pass pass_cleanup_cfg; |
311 extern struct gimple_opt_pass pass_referenced_vars; | 349 extern struct gimple_opt_pass pass_referenced_vars; |
350 extern struct gimple_opt_pass pass_cleanup_eh; | |
351 extern struct gimple_opt_pass pass_fixup_cfg; | |
312 extern struct gimple_opt_pass pass_sra; | 352 extern struct gimple_opt_pass pass_sra; |
313 extern struct gimple_opt_pass pass_sra_early; | 353 extern struct gimple_opt_pass pass_sra_early; |
354 extern struct gimple_opt_pass pass_early_ipa_sra; | |
314 extern struct gimple_opt_pass pass_tail_recursion; | 355 extern struct gimple_opt_pass pass_tail_recursion; |
315 extern struct gimple_opt_pass pass_tail_calls; | 356 extern struct gimple_opt_pass pass_tail_calls; |
316 extern struct gimple_opt_pass pass_tree_loop; | 357 extern struct gimple_opt_pass pass_tree_loop; |
317 extern struct gimple_opt_pass pass_tree_loop_init; | 358 extern struct gimple_opt_pass pass_tree_loop_init; |
318 extern struct gimple_opt_pass pass_lim; | 359 extern struct gimple_opt_pass pass_lim; |
324 extern struct gimple_opt_pass pass_record_bounds; | 365 extern struct gimple_opt_pass pass_record_bounds; |
325 extern struct gimple_opt_pass pass_graphite_transforms; | 366 extern struct gimple_opt_pass pass_graphite_transforms; |
326 extern struct gimple_opt_pass pass_if_conversion; | 367 extern struct gimple_opt_pass pass_if_conversion; |
327 extern struct gimple_opt_pass pass_loop_distribution; | 368 extern struct gimple_opt_pass pass_loop_distribution; |
328 extern struct gimple_opt_pass pass_vectorize; | 369 extern struct gimple_opt_pass pass_vectorize; |
370 extern struct gimple_opt_pass pass_slp_vectorize; | |
329 extern struct gimple_opt_pass pass_complete_unroll; | 371 extern struct gimple_opt_pass pass_complete_unroll; |
330 extern struct gimple_opt_pass pass_complete_unrolli; | 372 extern struct gimple_opt_pass pass_complete_unrolli; |
331 extern struct gimple_opt_pass pass_parallelize_loops; | 373 extern struct gimple_opt_pass pass_parallelize_loops; |
332 extern struct gimple_opt_pass pass_loop_prefetch; | 374 extern struct gimple_opt_pass pass_loop_prefetch; |
333 extern struct gimple_opt_pass pass_iv_optimize; | 375 extern struct gimple_opt_pass pass_iv_optimize; |
334 extern struct gimple_opt_pass pass_tree_loop_done; | 376 extern struct gimple_opt_pass pass_tree_loop_done; |
335 extern struct gimple_opt_pass pass_ch; | 377 extern struct gimple_opt_pass pass_ch; |
336 extern struct gimple_opt_pass pass_ccp; | 378 extern struct gimple_opt_pass pass_ccp; |
337 extern struct gimple_opt_pass pass_phi_only_cprop; | 379 extern struct gimple_opt_pass pass_phi_only_cprop; |
338 extern struct gimple_opt_pass pass_build_ssa; | 380 extern struct gimple_opt_pass pass_build_ssa; |
339 extern struct gimple_opt_pass pass_del_ssa; | |
340 extern struct gimple_opt_pass pass_build_alias; | 381 extern struct gimple_opt_pass pass_build_alias; |
382 extern struct gimple_opt_pass pass_build_ealias; | |
341 extern struct gimple_opt_pass pass_dominator; | 383 extern struct gimple_opt_pass pass_dominator; |
342 extern struct gimple_opt_pass pass_dce; | 384 extern struct gimple_opt_pass pass_dce; |
343 extern struct gimple_opt_pass pass_dce_loop; | 385 extern struct gimple_opt_pass pass_dce_loop; |
344 extern struct gimple_opt_pass pass_cd_dce; | 386 extern struct gimple_opt_pass pass_cd_dce; |
345 extern struct gimple_opt_pass pass_call_cdce; | 387 extern struct gimple_opt_pass pass_call_cdce; |
351 extern struct gimple_opt_pass pass_lower_complex_O0; | 393 extern struct gimple_opt_pass pass_lower_complex_O0; |
352 extern struct gimple_opt_pass pass_lower_complex; | 394 extern struct gimple_opt_pass pass_lower_complex; |
353 extern struct gimple_opt_pass pass_lower_vector; | 395 extern struct gimple_opt_pass pass_lower_vector; |
354 extern struct gimple_opt_pass pass_lower_vector_ssa; | 396 extern struct gimple_opt_pass pass_lower_vector_ssa; |
355 extern struct gimple_opt_pass pass_lower_omp; | 397 extern struct gimple_opt_pass pass_lower_omp; |
398 extern struct gimple_opt_pass pass_diagnose_omp_blocks; | |
356 extern struct gimple_opt_pass pass_expand_omp; | 399 extern struct gimple_opt_pass pass_expand_omp; |
357 extern struct gimple_opt_pass pass_expand_omp_ssa; | 400 extern struct gimple_opt_pass pass_expand_omp_ssa; |
358 extern struct gimple_opt_pass pass_object_sizes; | 401 extern struct gimple_opt_pass pass_object_sizes; |
359 extern struct gimple_opt_pass pass_fold_builtins; | 402 extern struct gimple_opt_pass pass_fold_builtins; |
360 extern struct gimple_opt_pass pass_stdarg; | 403 extern struct gimple_opt_pass pass_stdarg; |
361 extern struct gimple_opt_pass pass_early_warn_uninitialized; | 404 extern struct gimple_opt_pass pass_early_warn_uninitialized; |
362 extern struct gimple_opt_pass pass_late_warn_uninitialized; | 405 extern struct gimple_opt_pass pass_late_warn_uninitialized; |
363 extern struct gimple_opt_pass pass_cse_reciprocals; | 406 extern struct gimple_opt_pass pass_cse_reciprocals; |
364 extern struct gimple_opt_pass pass_cse_sincos; | 407 extern struct gimple_opt_pass pass_cse_sincos; |
365 extern struct gimple_opt_pass pass_convert_to_rsqrt; | 408 extern struct gimple_opt_pass pass_optimize_bswap; |
366 extern struct gimple_opt_pass pass_warn_function_return; | 409 extern struct gimple_opt_pass pass_warn_function_return; |
367 extern struct gimple_opt_pass pass_warn_function_noreturn; | 410 extern struct gimple_opt_pass pass_warn_function_noreturn; |
368 extern struct gimple_opt_pass pass_cselim; | 411 extern struct gimple_opt_pass pass_cselim; |
369 extern struct gimple_opt_pass pass_phiopt; | 412 extern struct gimple_opt_pass pass_phiopt; |
370 extern struct gimple_opt_pass pass_forwprop; | 413 extern struct gimple_opt_pass pass_forwprop; |
371 extern struct gimple_opt_pass pass_phiprop; | 414 extern struct gimple_opt_pass pass_phiprop; |
372 extern struct gimple_opt_pass pass_tree_ifcombine; | 415 extern struct gimple_opt_pass pass_tree_ifcombine; |
373 extern struct gimple_opt_pass pass_dse; | 416 extern struct gimple_opt_pass pass_dse; |
374 extern struct gimple_opt_pass pass_simple_dse; | |
375 extern struct gimple_opt_pass pass_nrv; | 417 extern struct gimple_opt_pass pass_nrv; |
376 extern struct gimple_opt_pass pass_mark_used_blocks; | |
377 extern struct gimple_opt_pass pass_rename_ssa_copies; | 418 extern struct gimple_opt_pass pass_rename_ssa_copies; |
378 extern struct gimple_opt_pass pass_rest_of_compilation; | 419 extern struct gimple_opt_pass pass_rest_of_compilation; |
379 extern struct gimple_opt_pass pass_sink_code; | 420 extern struct gimple_opt_pass pass_sink_code; |
380 extern struct gimple_opt_pass pass_fre; | 421 extern struct gimple_opt_pass pass_fre; |
381 extern struct gimple_opt_pass pass_linear_transform; | 422 extern struct gimple_opt_pass pass_linear_transform; |
384 extern struct gimple_opt_pass pass_vrp; | 425 extern struct gimple_opt_pass pass_vrp; |
385 extern struct gimple_opt_pass pass_uncprop; | 426 extern struct gimple_opt_pass pass_uncprop; |
386 extern struct gimple_opt_pass pass_return_slot; | 427 extern struct gimple_opt_pass pass_return_slot; |
387 extern struct gimple_opt_pass pass_reassoc; | 428 extern struct gimple_opt_pass pass_reassoc; |
388 extern struct gimple_opt_pass pass_rebuild_cgraph_edges; | 429 extern struct gimple_opt_pass pass_rebuild_cgraph_edges; |
430 extern struct gimple_opt_pass pass_remove_cgraph_callee_edges; | |
389 extern struct gimple_opt_pass pass_build_cgraph_edges; | 431 extern struct gimple_opt_pass pass_build_cgraph_edges; |
390 extern struct gimple_opt_pass pass_reset_cc_flags; | 432 extern struct gimple_opt_pass pass_local_pure_const; |
433 extern struct gimple_opt_pass pass_tracer; | |
434 extern struct gimple_opt_pass pass_warn_unused_result; | |
391 | 435 |
392 /* IPA Passes */ | 436 /* IPA Passes */ |
393 extern struct ipa_opt_pass pass_ipa_inline; | 437 extern struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility; |
394 extern struct ipa_opt_pass pass_ipa_cp; | 438 extern struct simple_ipa_opt_pass pass_ipa_early_inline; |
395 extern struct ipa_opt_pass pass_ipa_reference; | 439 |
396 extern struct ipa_opt_pass pass_ipa_pure_const; | 440 extern struct simple_ipa_opt_pass pass_early_local_passes; |
397 | 441 |
442 extern struct ipa_opt_pass_d pass_ipa_whole_program_visibility; | |
443 extern struct ipa_opt_pass_d pass_ipa_lto_gimple_out; | |
444 extern struct simple_ipa_opt_pass pass_ipa_increase_alignment; | |
398 extern struct simple_ipa_opt_pass pass_ipa_matrix_reorg; | 445 extern struct simple_ipa_opt_pass pass_ipa_matrix_reorg; |
399 extern struct simple_ipa_opt_pass pass_ipa_early_inline; | 446 extern struct ipa_opt_pass_d pass_ipa_inline; |
447 extern struct simple_ipa_opt_pass pass_ipa_free_lang_data; | |
448 extern struct ipa_opt_pass_d pass_ipa_cp; | |
449 extern struct ipa_opt_pass_d pass_ipa_reference; | |
450 extern struct ipa_opt_pass_d pass_ipa_pure_const; | |
400 extern struct simple_ipa_opt_pass pass_ipa_type_escape; | 451 extern struct simple_ipa_opt_pass pass_ipa_type_escape; |
401 extern struct simple_ipa_opt_pass pass_ipa_pta; | 452 extern struct simple_ipa_opt_pass pass_ipa_pta; |
402 extern struct simple_ipa_opt_pass pass_ipa_struct_reorg; | 453 extern struct simple_ipa_opt_pass pass_ipa_struct_reorg; |
403 extern struct simple_ipa_opt_pass pass_early_local_passes; | 454 extern struct ipa_opt_pass_d pass_ipa_lto_wpa_fixup; |
404 extern struct simple_ipa_opt_pass pass_ipa_increase_alignment; | 455 extern struct ipa_opt_pass_d pass_ipa_lto_finish_out; |
405 extern struct simple_ipa_opt_pass pass_ipa_function_and_variable_visibility; | |
406 | 456 |
407 extern struct gimple_opt_pass pass_all_optimizations; | 457 extern struct gimple_opt_pass pass_all_optimizations; |
408 extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing; | 458 extern struct gimple_opt_pass pass_cleanup_cfg_post_optimizing; |
409 extern struct gimple_opt_pass pass_free_cfg_annotations; | |
410 extern struct gimple_opt_pass pass_free_datastructures; | |
411 extern struct gimple_opt_pass pass_init_datastructures; | 459 extern struct gimple_opt_pass pass_init_datastructures; |
412 extern struct gimple_opt_pass pass_fixup_cfg; | 460 extern struct gimple_opt_pass pass_fixup_cfg; |
413 | 461 |
414 extern struct rtl_opt_pass pass_expand; | 462 extern struct rtl_opt_pass pass_expand; |
415 extern struct rtl_opt_pass pass_init_function; | 463 extern struct rtl_opt_pass pass_init_function; |
427 extern struct rtl_opt_pass pass_ud_rtl_dce; | 475 extern struct rtl_opt_pass pass_ud_rtl_dce; |
428 extern struct rtl_opt_pass pass_rtl_dce; | 476 extern struct rtl_opt_pass pass_rtl_dce; |
429 extern struct rtl_opt_pass pass_rtl_dse1; | 477 extern struct rtl_opt_pass pass_rtl_dse1; |
430 extern struct rtl_opt_pass pass_rtl_dse2; | 478 extern struct rtl_opt_pass pass_rtl_dse2; |
431 extern struct rtl_opt_pass pass_rtl_dse3; | 479 extern struct rtl_opt_pass pass_rtl_dse3; |
432 extern struct rtl_opt_pass pass_gcse; | 480 extern struct rtl_opt_pass pass_rtl_cprop; |
433 extern struct rtl_opt_pass pass_jump_bypass; | 481 extern struct rtl_opt_pass pass_rtl_pre; |
434 extern struct rtl_opt_pass pass_profiling; | 482 extern struct rtl_opt_pass pass_rtl_hoist; |
483 extern struct rtl_opt_pass pass_rtl_store_motion; | |
484 extern struct rtl_opt_pass pass_cse_after_global_opts; | |
435 extern struct rtl_opt_pass pass_rtl_ifcvt; | 485 extern struct rtl_opt_pass pass_rtl_ifcvt; |
436 extern struct gimple_opt_pass pass_tracer; | |
437 | 486 |
438 extern struct rtl_opt_pass pass_into_cfg_layout_mode; | 487 extern struct rtl_opt_pass pass_into_cfg_layout_mode; |
439 extern struct rtl_opt_pass pass_outof_cfg_layout_mode; | 488 extern struct rtl_opt_pass pass_outof_cfg_layout_mode; |
440 | 489 |
441 extern struct rtl_opt_pass pass_loop2; | 490 extern struct rtl_opt_pass pass_loop2; |
449 extern struct rtl_opt_pass pass_web; | 498 extern struct rtl_opt_pass pass_web; |
450 extern struct rtl_opt_pass pass_cse2; | 499 extern struct rtl_opt_pass pass_cse2; |
451 extern struct rtl_opt_pass pass_df_initialize_opt; | 500 extern struct rtl_opt_pass pass_df_initialize_opt; |
452 extern struct rtl_opt_pass pass_df_initialize_no_opt; | 501 extern struct rtl_opt_pass pass_df_initialize_no_opt; |
453 extern struct rtl_opt_pass pass_reginfo_init; | 502 extern struct rtl_opt_pass pass_reginfo_init; |
454 extern struct rtl_opt_pass pass_subregs_of_mode_init; | |
455 extern struct rtl_opt_pass pass_subregs_of_mode_finish; | |
456 extern struct rtl_opt_pass pass_inc_dec; | 503 extern struct rtl_opt_pass pass_inc_dec; |
457 extern struct rtl_opt_pass pass_stack_ptr_mod; | 504 extern struct rtl_opt_pass pass_stack_ptr_mod; |
458 extern struct rtl_opt_pass pass_initialize_regs; | 505 extern struct rtl_opt_pass pass_initialize_regs; |
459 extern struct rtl_opt_pass pass_combine; | 506 extern struct rtl_opt_pass pass_combine; |
460 extern struct rtl_opt_pass pass_if_after_combine; | 507 extern struct rtl_opt_pass pass_if_after_combine; |
463 extern struct rtl_opt_pass pass_regmove; | 510 extern struct rtl_opt_pass pass_regmove; |
464 extern struct rtl_opt_pass pass_split_all_insns; | 511 extern struct rtl_opt_pass pass_split_all_insns; |
465 extern struct rtl_opt_pass pass_fast_rtl_byte_dce; | 512 extern struct rtl_opt_pass pass_fast_rtl_byte_dce; |
466 extern struct rtl_opt_pass pass_lower_subreg2; | 513 extern struct rtl_opt_pass pass_lower_subreg2; |
467 extern struct rtl_opt_pass pass_mode_switching; | 514 extern struct rtl_opt_pass pass_mode_switching; |
468 extern struct rtl_opt_pass pass_see; | |
469 extern struct rtl_opt_pass pass_sms; | 515 extern struct rtl_opt_pass pass_sms; |
470 extern struct rtl_opt_pass pass_sched; | 516 extern struct rtl_opt_pass pass_sched; |
471 extern struct rtl_opt_pass pass_ira; | 517 extern struct rtl_opt_pass pass_ira; |
472 extern struct rtl_opt_pass pass_postreload; | 518 extern struct rtl_opt_pass pass_postreload; |
473 extern struct rtl_opt_pass pass_clean_state; | 519 extern struct rtl_opt_pass pass_clean_state; |
511 extern struct gimple_opt_pass pass_all_early_optimizations; | 557 extern struct gimple_opt_pass pass_all_early_optimizations; |
512 extern struct gimple_opt_pass pass_update_address_taken; | 558 extern struct gimple_opt_pass pass_update_address_taken; |
513 extern struct gimple_opt_pass pass_convert_switch; | 559 extern struct gimple_opt_pass pass_convert_switch; |
514 | 560 |
515 /* The root of the compilation pass tree, once constructed. */ | 561 /* The root of the compilation pass tree, once constructed. */ |
516 extern struct opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes; | 562 extern struct opt_pass *all_passes, *all_small_ipa_passes, *all_lowering_passes, |
563 *all_regular_ipa_passes, *all_lto_gen_passes; | |
564 | |
565 /* Define a list of pass lists so that both passes.c and plugins can easily | |
566 find all the pass lists. */ | |
567 #define GCC_PASS_LISTS \ | |
568 DEF_PASS_LIST (all_lowering_passes) \ | |
569 DEF_PASS_LIST (all_small_ipa_passes) \ | |
570 DEF_PASS_LIST (all_regular_ipa_passes) \ | |
571 DEF_PASS_LIST (all_lto_gen_passes) \ | |
572 DEF_PASS_LIST (all_passes) | |
573 | |
574 #define DEF_PASS_LIST(LIST) PASS_LIST_NO_##LIST, | |
575 enum | |
576 { | |
577 GCC_PASS_LISTS | |
578 PASS_LIST_NUM | |
579 }; | |
580 #undef DEF_PASS_LIST | |
581 | |
582 /* This is used by plugins, and should also be used in | |
583 passes.c:register_pass. */ | |
584 extern struct opt_pass **gcc_pass_lists[]; | |
517 | 585 |
518 /* Current optimization pass. */ | 586 /* Current optimization pass. */ |
519 extern struct opt_pass *current_pass; | 587 extern struct opt_pass *current_pass; |
520 | 588 |
521 extern struct opt_pass * get_pass_for_id (int); | 589 extern struct opt_pass * get_pass_for_id (int); |
590 extern bool execute_one_pass (struct opt_pass *); | |
522 extern void execute_pass_list (struct opt_pass *); | 591 extern void execute_pass_list (struct opt_pass *); |
523 extern void execute_ipa_pass_list (struct opt_pass *); | 592 extern void execute_ipa_pass_list (struct opt_pass *); |
593 extern void execute_ipa_summary_passes (struct ipa_opt_pass_d *); | |
594 extern void execute_all_ipa_transforms (void); | |
595 extern void execute_all_ipa_stmt_fixups (struct cgraph_node *, gimple *); | |
596 extern bool pass_init_dump_file (struct opt_pass *); | |
597 extern void pass_fini_dump_file (struct opt_pass *); | |
598 | |
599 extern const char *get_current_pass_name (void); | |
524 extern void print_current_pass (FILE *); | 600 extern void print_current_pass (FILE *); |
525 extern void debug_pass (void); | 601 extern void debug_pass (void); |
602 extern void ipa_write_summaries (void); | |
603 extern void ipa_write_summaries_of_cgraph_node_set ( | |
604 struct cgraph_node_set_def *); | |
605 extern void ipa_read_summaries (void); | |
606 extern void register_one_dump_file (struct opt_pass *); | |
607 extern bool function_called_by_processed_nodes_p (void); | |
608 extern void register_pass (struct register_pass_info *); | |
526 | 609 |
527 /* Set to true if the pass is called the first time during compilation of the | 610 /* Set to true if the pass is called the first time during compilation of the |
528 current function. Note that using this information in the optimization | 611 current function. Note that using this information in the optimization |
529 passes is considered not to be clean, and it should be avoided if possible. | 612 passes is considered not to be clean, and it should be avoided if possible. |
530 This flag is currently used to prevent loops from being peeled repeatedly | 613 This flag is currently used to prevent loops from being peeled repeatedly |
531 in jump threading; it will be removed once we preserve loop structures | 614 in jump threading; it will be removed once we preserve loop structures |
532 throughout the compilation -- we will be able to mark the affected loops | 615 throughout the compilation -- we will be able to mark the affected loops |
533 directly in jump threading, and avoid peeling them next time. */ | 616 directly in jump threading, and avoid peeling them next time. */ |
534 extern bool first_pass_instance; | 617 extern bool first_pass_instance; |
535 | 618 |
619 /* Declare for plugins. */ | |
620 extern void do_per_function_toporder (void (*) (void *), void *); | |
621 | |
536 #endif /* GCC_TREE_PASS_H */ | 622 #endif /* GCC_TREE_PASS_H */ |