From: David Malcolm <dmalcolm@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: David Malcolm <dmalcolm@redhat.com>
Subject: [PATCH 2/4] Move the construction of the pass hierarchy into a new passes.def file.
Date: Thu, 18 Jul 2013 01:18:00 -0000 [thread overview]
Message-ID: <1374110303-9758-3-git-send-email-dmalcolm@redhat.com> (raw)
In-Reply-To: <1374110303-9758-1-git-send-email-dmalcolm@redhat.com>
gcc/
* passes.def: New.
* passes.c (init_optimization_passes): Move the construction of
the pass hierarchy into a new passes.def file.
* Makefile.in (passes.o): Add dependency on passes.def.
---
gcc/Makefile.in | 2 +-
gcc/passes.c | 378 +---------------------------------------------------
gcc/passes.def | 405 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 407 insertions(+), 378 deletions(-)
create mode 100644 gcc/passes.def
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5bc0f0b..966c38a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2743,7 +2743,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
hosthooks.h $(CGRAPH_H) $(COVERAGE_H) $(TREE_PASS_H) $(TREE_DUMP_H) \
$(GGC_H) $(OPTS_H) $(TREE_FLOW_H) $(TREE_INLINE_H) \
gt-passes.h $(DF_H) $(PREDICT_H) $(LTO_STREAMER_H) \
- $(PLUGIN_H) $(IPA_UTILS_H)
+ $(PLUGIN_H) $(IPA_UTILS_H) passes.def
plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(HASH_TABLE_H) $(DIAGNOSTIC_CORE_H) $(TREE_H) $(TREE_PASS_H) \
diff --git a/gcc/passes.c b/gcc/passes.c
index 6ca4134..94fb586 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1297,383 +1297,7 @@ init_optimization_passes (void)
#define TERMINATE_PASS_LIST() \
*p = NULL;
- /* All passes needed to lower the function into shape optimizers can
- operate on. These passes are always run first on the function, but
- backend might produce already lowered functions that are not processed
- by these passes. */
- INSERT_PASSES_AFTER (all_lowering_passes)
- NEXT_PASS (pass_warn_unused_result);
- NEXT_PASS (pass_diagnose_omp_blocks);
- NEXT_PASS (pass_diagnose_tm_blocks);
- NEXT_PASS (pass_mudflap_1);
- NEXT_PASS (pass_lower_omp);
- NEXT_PASS (pass_lower_cf);
- NEXT_PASS (pass_lower_tm);
- NEXT_PASS (pass_refactor_eh);
- NEXT_PASS (pass_lower_eh);
- NEXT_PASS (pass_build_cfg);
- NEXT_PASS (pass_warn_function_return);
- NEXT_PASS (pass_expand_omp);
- NEXT_PASS (pass_build_cgraph_edges);
- TERMINATE_PASS_LIST ()
-
- /* Interprocedural optimization passes. */
- INSERT_PASSES_AFTER (all_small_ipa_passes)
- NEXT_PASS (pass_ipa_free_lang_data);
- NEXT_PASS (pass_ipa_function_and_variable_visibility);
- NEXT_PASS (pass_early_local_passes);
- PUSH_INSERT_PASSES_WITHIN (pass_early_local_passes)
- NEXT_PASS (pass_fixup_cfg);
- NEXT_PASS (pass_init_datastructures);
-
- NEXT_PASS (pass_build_ssa);
- NEXT_PASS (pass_early_warn_uninitialized);
- NEXT_PASS (pass_rebuild_cgraph_edges);
- NEXT_PASS (pass_inline_parameters);
- NEXT_PASS (pass_early_inline);
- NEXT_PASS (pass_all_early_optimizations);
- PUSH_INSERT_PASSES_WITHIN (pass_all_early_optimizations)
- NEXT_PASS (pass_remove_cgraph_callee_edges);
- NEXT_PASS (pass_rename_ssa_copies);
- NEXT_PASS (pass_ccp);
- /* After CCP we rewrite no longer addressed locals into SSA
- form if possible. */
- NEXT_PASS (pass_forwprop);
- /* pass_build_ealias is a dummy pass that ensures that we
- execute TODO_rebuild_alias at this point. */
- NEXT_PASS (pass_build_ealias);
- NEXT_PASS (pass_sra_early);
- NEXT_PASS (pass_fre);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_merge_phi);
- NEXT_PASS (pass_cd_dce);
- NEXT_PASS (pass_early_ipa_sra);
- NEXT_PASS (pass_tail_recursion);
- NEXT_PASS (pass_convert_switch);
- NEXT_PASS (pass_cleanup_eh);
- NEXT_PASS (pass_profile);
- NEXT_PASS (pass_local_pure_const);
- /* Split functions creates parts that are not run through
- early optimizations again. It is thus good idea to do this
- late. */
- NEXT_PASS (pass_split_functions);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_release_ssa_names);
- NEXT_PASS (pass_rebuild_cgraph_edges);
- NEXT_PASS (pass_inline_parameters);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_ipa_free_inline_summary);
- NEXT_PASS (pass_ipa_tree_profile);
- PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile)
- NEXT_PASS (pass_feedback_split_functions);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_ipa_increase_alignment);
- NEXT_PASS (pass_ipa_tm);
- NEXT_PASS (pass_ipa_lower_emutls);
- TERMINATE_PASS_LIST ()
-
- INSERT_PASSES_AFTER (all_regular_ipa_passes)
- NEXT_PASS (pass_ipa_whole_program_visibility);
- NEXT_PASS (pass_ipa_profile);
- NEXT_PASS (pass_ipa_cp);
- NEXT_PASS (pass_ipa_cdtor_merge);
- NEXT_PASS (pass_ipa_inline);
- NEXT_PASS (pass_ipa_pure_const);
- NEXT_PASS (pass_ipa_reference);
- TERMINATE_PASS_LIST ()
-
- INSERT_PASSES_AFTER (all_lto_gen_passes)
- NEXT_PASS (pass_ipa_lto_gimple_out);
- NEXT_PASS (pass_ipa_lto_finish_out); /* This must be the last LTO pass. */
- TERMINATE_PASS_LIST ()
-
- /* Simple IPA passes executed after the regular passes. In WHOPR mode the
- passes are executed after partitioning and thus see just parts of the
- compiled unit. */
- INSERT_PASSES_AFTER (all_late_ipa_passes)
- NEXT_PASS (pass_ipa_pta);
- TERMINATE_PASS_LIST ()
-
- /* These passes are run after IPA passes on every function that is being
- output to the assembler file. */
- INSERT_PASSES_AFTER (all_passes)
- NEXT_PASS (pass_fixup_cfg);
- NEXT_PASS (pass_lower_eh_dispatch);
- NEXT_PASS (pass_all_optimizations);
- PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations)
- NEXT_PASS (pass_remove_cgraph_callee_edges);
- /* Initial scalar cleanups before alias computation.
- They ensure memory accesses are not indirect wherever possible. */
- NEXT_PASS (pass_strip_predict_hints);
- NEXT_PASS (pass_rename_ssa_copies);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_complete_unrolli);
- NEXT_PASS (pass_ccp);
- /* After CCP we rewrite no longer addressed locals into SSA
- form if possible. */
- NEXT_PASS (pass_phiprop);
- NEXT_PASS (pass_forwprop);
- /* pass_build_alias is a dummy pass that ensures that we
- execute TODO_rebuild_alias at this point. */
- NEXT_PASS (pass_build_alias);
- NEXT_PASS (pass_return_slot);
- NEXT_PASS (pass_fre);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_merge_phi);
- NEXT_PASS (pass_vrp);
- NEXT_PASS (pass_dce);
- NEXT_PASS (pass_call_cdce);
- NEXT_PASS (pass_cselim);
- NEXT_PASS (pass_tree_ifcombine);
- NEXT_PASS (pass_phiopt);
- NEXT_PASS (pass_tail_recursion);
- NEXT_PASS (pass_ch);
- NEXT_PASS (pass_stdarg);
- NEXT_PASS (pass_lower_complex);
- NEXT_PASS (pass_sra);
- NEXT_PASS (pass_rename_ssa_copies);
- /* The dom pass will also resolve all __builtin_constant_p calls
- that are still there to 0. This has to be done after some
- propagations have already run, but before some more dead code
- is removed, and this place fits nicely. Remember this when
- trying to move or duplicate pass_dominator somewhere earlier. */
- NEXT_PASS (pass_dominator);
- /* The only const/copy propagation opportunities left after
- DOM should be due to degenerate PHI nodes. So rather than
- run the full propagators, run a specialized pass which
- only examines PHIs to discover const/copy propagation
- opportunities. */
- NEXT_PASS (pass_phi_only_cprop);
- NEXT_PASS (pass_dse);
- NEXT_PASS (pass_reassoc);
- NEXT_PASS (pass_dce);
- NEXT_PASS (pass_forwprop);
- NEXT_PASS (pass_phiopt);
- NEXT_PASS (pass_object_sizes);
- NEXT_PASS (pass_strlen);
- NEXT_PASS (pass_ccp);
- /* After CCP we rewrite no longer addressed locals into SSA
- form if possible. */
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_cse_sincos);
- NEXT_PASS (pass_optimize_bswap);
- NEXT_PASS (pass_split_crit_edges);
- NEXT_PASS (pass_pre);
- NEXT_PASS (pass_sink_code);
- NEXT_PASS (pass_asan);
- NEXT_PASS (pass_tsan);
- NEXT_PASS (pass_tree_loop);
- PUSH_INSERT_PASSES_WITHIN (pass_tree_loop)
- NEXT_PASS (pass_tree_loop_init);
- NEXT_PASS (pass_lim);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_dce_loop);
- NEXT_PASS (pass_tree_unswitch);
- NEXT_PASS (pass_scev_cprop);
- NEXT_PASS (pass_record_bounds);
- NEXT_PASS (pass_check_data_deps);
- NEXT_PASS (pass_loop_distribution);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_graphite);
- PUSH_INSERT_PASSES_WITHIN (pass_graphite)
- NEXT_PASS (pass_graphite_transforms);
- NEXT_PASS (pass_lim);
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_dce_loop);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_iv_canon);
- NEXT_PASS (pass_parallelize_loops);
- NEXT_PASS (pass_if_conversion);
- NEXT_PASS (pass_vectorize);
- PUSH_INSERT_PASSES_WITHIN (pass_vectorize)
- NEXT_PASS (pass_dce_loop);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_predcom);
- NEXT_PASS (pass_complete_unroll);
- NEXT_PASS (pass_slp_vectorize);
- NEXT_PASS (pass_loop_prefetch);
- NEXT_PASS (pass_iv_optimize);
- NEXT_PASS (pass_lim);
- NEXT_PASS (pass_tree_loop_done);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_lower_vector_ssa);
- NEXT_PASS (pass_cse_reciprocals);
- NEXT_PASS (pass_reassoc);
- NEXT_PASS (pass_strength_reduction);
- NEXT_PASS (pass_dominator);
- /* The only const/copy propagation opportunities left after
- DOM should be due to degenerate PHI nodes. So rather than
- run the full propagators, run a specialized pass which
- only examines PHIs to discover const/copy propagation
- opportunities. */
- NEXT_PASS (pass_phi_only_cprop);
- NEXT_PASS (pass_vrp);
- NEXT_PASS (pass_cd_dce);
- NEXT_PASS (pass_tracer);
-
- /* FIXME: If DCE is not run before checking for uninitialized uses,
- we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c).
- However, this also causes us to misdiagnose cases that should be
- real warnings (e.g., testsuite/gcc.dg/pr18501.c).
-
- To fix the false positives in uninit-5.c, we would have to
- account for the predicates protecting the set and the use of each
- variable. Using a representation like Gated Single Assignment
- may help. */
- NEXT_PASS (pass_late_warn_uninitialized);
- NEXT_PASS (pass_dse);
- NEXT_PASS (pass_forwprop);
- NEXT_PASS (pass_phiopt);
- NEXT_PASS (pass_fold_builtins);
- NEXT_PASS (pass_optimize_widening_mul);
- NEXT_PASS (pass_tail_calls);
- NEXT_PASS (pass_rename_ssa_copies);
- NEXT_PASS (pass_uncprop);
- NEXT_PASS (pass_local_pure_const);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_all_optimizations_g);
- PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations_g)
- NEXT_PASS (pass_remove_cgraph_callee_edges);
- NEXT_PASS (pass_strip_predict_hints);
- /* Lower remaining pieces of GIMPLE. */
- NEXT_PASS (pass_lower_complex);
- NEXT_PASS (pass_lower_vector_ssa);
- /* Perform simple scalar cleanup which is constant/copy propagation. */
- NEXT_PASS (pass_ccp);
- NEXT_PASS (pass_object_sizes);
- /* Fold remaining builtins. */
- NEXT_PASS (pass_fold_builtins);
- /* Copy propagation also copy-propagates constants, this is necessary
- to forward object-size and builtin folding results properly. */
- NEXT_PASS (pass_copy_prop);
- NEXT_PASS (pass_dce);
- NEXT_PASS (pass_asan);
- NEXT_PASS (pass_tsan);
- NEXT_PASS (pass_rename_ssa_copies);
- /* ??? We do want some kind of loop invariant motion, but we possibly
- need to adjust LIM to be more friendly towards preserving accurate
- debug information here. */
- NEXT_PASS (pass_late_warn_uninitialized);
- NEXT_PASS (pass_uncprop);
- NEXT_PASS (pass_local_pure_const);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_tm_init);
- PUSH_INSERT_PASSES_WITHIN (pass_tm_init)
- NEXT_PASS (pass_tm_mark);
- NEXT_PASS (pass_tm_memopt);
- NEXT_PASS (pass_tm_edges);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_lower_vector);
- NEXT_PASS (pass_lower_complex_O0);
- NEXT_PASS (pass_asan_O0);
- NEXT_PASS (pass_tsan_O0);
- NEXT_PASS (pass_cleanup_eh);
- NEXT_PASS (pass_lower_resx);
- NEXT_PASS (pass_nrv);
- NEXT_PASS (pass_mudflap_2);
- NEXT_PASS (pass_cleanup_cfg_post_optimizing);
- NEXT_PASS (pass_warn_function_noreturn);
-
- NEXT_PASS (pass_expand);
-
- NEXT_PASS (pass_rest_of_compilation);
- PUSH_INSERT_PASSES_WITHIN (pass_rest_of_compilation)
- NEXT_PASS (pass_instantiate_virtual_regs);
- NEXT_PASS (pass_into_cfg_layout_mode);
- NEXT_PASS (pass_jump);
- NEXT_PASS (pass_lower_subreg);
- NEXT_PASS (pass_df_initialize_opt);
- NEXT_PASS (pass_cse);
- NEXT_PASS (pass_rtl_fwprop);
- NEXT_PASS (pass_rtl_cprop);
- NEXT_PASS (pass_rtl_pre);
- NEXT_PASS (pass_rtl_hoist);
- NEXT_PASS (pass_rtl_cprop);
- NEXT_PASS (pass_rtl_store_motion);
- NEXT_PASS (pass_cse_after_global_opts);
- NEXT_PASS (pass_rtl_ifcvt);
- NEXT_PASS (pass_reginfo_init);
- /* Perform loop optimizations. It might be better to do them a bit
- sooner, but we want the profile feedback to work more
- efficiently. */
- NEXT_PASS (pass_loop2);
- PUSH_INSERT_PASSES_WITHIN (pass_loop2)
- NEXT_PASS (pass_rtl_loop_init);
- NEXT_PASS (pass_rtl_move_loop_invariants);
- NEXT_PASS (pass_rtl_unswitch);
- NEXT_PASS (pass_rtl_unroll_and_peel_loops);
- NEXT_PASS (pass_rtl_doloop);
- NEXT_PASS (pass_rtl_loop_done);
- TERMINATE_PASS_LIST ()
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_web);
- NEXT_PASS (pass_rtl_cprop);
- NEXT_PASS (pass_cse2);
- NEXT_PASS (pass_rtl_dse1);
- NEXT_PASS (pass_rtl_fwprop_addr);
- NEXT_PASS (pass_inc_dec);
- NEXT_PASS (pass_initialize_regs);
- NEXT_PASS (pass_ud_rtl_dce);
- NEXT_PASS (pass_combine);
- NEXT_PASS (pass_if_after_combine);
- NEXT_PASS (pass_partition_blocks);
- NEXT_PASS (pass_regmove);
- NEXT_PASS (pass_outof_cfg_layout_mode);
- NEXT_PASS (pass_split_all_insns);
- NEXT_PASS (pass_lower_subreg2);
- NEXT_PASS (pass_df_initialize_no_opt);
- NEXT_PASS (pass_stack_ptr_mod);
- NEXT_PASS (pass_mode_switching);
- NEXT_PASS (pass_match_asm_constraints);
- NEXT_PASS (pass_sms);
- NEXT_PASS (pass_sched);
- NEXT_PASS (pass_ira);
- NEXT_PASS (pass_reload);
- NEXT_PASS (pass_postreload);
- PUSH_INSERT_PASSES_WITHIN (pass_postreload)
- NEXT_PASS (pass_postreload_cse);
- NEXT_PASS (pass_gcse2);
- NEXT_PASS (pass_split_after_reload);
- NEXT_PASS (pass_ree);
- NEXT_PASS (pass_compare_elim_after_reload);
- NEXT_PASS (pass_branch_target_load_optimize1);
- NEXT_PASS (pass_thread_prologue_and_epilogue);
- NEXT_PASS (pass_rtl_dse2);
- NEXT_PASS (pass_stack_adjustments);
- NEXT_PASS (pass_jump2);
- NEXT_PASS (pass_peephole2);
- NEXT_PASS (pass_if_after_reload);
- NEXT_PASS (pass_regrename);
- NEXT_PASS (pass_cprop_hardreg);
- NEXT_PASS (pass_fast_rtl_dce);
- NEXT_PASS (pass_reorder_blocks);
- NEXT_PASS (pass_branch_target_load_optimize2);
- NEXT_PASS (pass_leaf_regs);
- NEXT_PASS (pass_split_before_sched2);
- NEXT_PASS (pass_sched2);
- NEXT_PASS (pass_stack_regs);
- PUSH_INSERT_PASSES_WITHIN (pass_stack_regs)
- NEXT_PASS (pass_split_before_regstack);
- NEXT_PASS (pass_stack_regs_run);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_compute_alignments);
- NEXT_PASS (pass_duplicate_computed_gotos);
- NEXT_PASS (pass_variable_tracking);
- NEXT_PASS (pass_free_cfg);
- NEXT_PASS (pass_machine_reorg);
- NEXT_PASS (pass_cleanup_barriers);
- NEXT_PASS (pass_delay_slots);
- NEXT_PASS (pass_split_for_shorten_branches);
- NEXT_PASS (pass_convert_to_eh_region_ranges);
- NEXT_PASS (pass_shorten_branches);
- NEXT_PASS (pass_set_nothrow_function_flags);
- NEXT_PASS (pass_dwarf2_frame);
- NEXT_PASS (pass_final);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_df_finish);
- POP_INSERT_PASSES ()
- NEXT_PASS (pass_clean_state);
- TERMINATE_PASS_LIST ()
+#include "passes.def"
#undef INSERT_PASSES_AFTER
#undef PUSH_INSERT_PASSES_WITHIN
diff --git a/gcc/passes.def b/gcc/passes.def
new file mode 100644
index 0000000..fa03d16
--- /dev/null
+++ b/gcc/passes.def
@@ -0,0 +1,405 @@
+/* Description of pass structure
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/*
+ Macros that should be defined when using this file:
+ INSERT_PASSES_AFTER (PASS)
+ PUSH_INSERT_PASSES_WITHIN (PASS)
+ POP_INSERT_PASSES ()
+ NEXT_PASS (PASS)
+ TERMINATE_PASS_LIST ()
+ */
+
+ /* All passes needed to lower the function into shape optimizers can
+ operate on. These passes are always run first on the function, but
+ backend might produce already lowered functions that are not processed
+ by these passes. */
+ INSERT_PASSES_AFTER (all_lowering_passes)
+ NEXT_PASS (pass_warn_unused_result);
+ NEXT_PASS (pass_diagnose_omp_blocks);
+ NEXT_PASS (pass_diagnose_tm_blocks);
+ NEXT_PASS (pass_mudflap_1);
+ NEXT_PASS (pass_lower_omp);
+ NEXT_PASS (pass_lower_cf);
+ NEXT_PASS (pass_lower_tm);
+ NEXT_PASS (pass_refactor_eh);
+ NEXT_PASS (pass_lower_eh);
+ NEXT_PASS (pass_build_cfg);
+ NEXT_PASS (pass_warn_function_return);
+ NEXT_PASS (pass_expand_omp);
+ NEXT_PASS (pass_build_cgraph_edges);
+ TERMINATE_PASS_LIST ()
+
+ /* Interprocedural optimization passes. */
+ INSERT_PASSES_AFTER (all_small_ipa_passes)
+ NEXT_PASS (pass_ipa_free_lang_data);
+ NEXT_PASS (pass_ipa_function_and_variable_visibility);
+ NEXT_PASS (pass_early_local_passes);
+ PUSH_INSERT_PASSES_WITHIN (pass_early_local_passes)
+ NEXT_PASS (pass_fixup_cfg);
+ NEXT_PASS (pass_init_datastructures);
+
+ NEXT_PASS (pass_build_ssa);
+ NEXT_PASS (pass_early_warn_uninitialized);
+ NEXT_PASS (pass_rebuild_cgraph_edges);
+ NEXT_PASS (pass_inline_parameters);
+ NEXT_PASS (pass_early_inline);
+ NEXT_PASS (pass_all_early_optimizations);
+ PUSH_INSERT_PASSES_WITHIN (pass_all_early_optimizations)
+ NEXT_PASS (pass_remove_cgraph_callee_edges);
+ NEXT_PASS (pass_rename_ssa_copies);
+ NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
+ NEXT_PASS (pass_forwprop);
+ /* pass_build_ealias is a dummy pass that ensures that we
+ execute TODO_rebuild_alias at this point. */
+ NEXT_PASS (pass_build_ealias);
+ NEXT_PASS (pass_sra_early);
+ NEXT_PASS (pass_fre);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_merge_phi);
+ NEXT_PASS (pass_cd_dce);
+ NEXT_PASS (pass_early_ipa_sra);
+ NEXT_PASS (pass_tail_recursion);
+ NEXT_PASS (pass_convert_switch);
+ NEXT_PASS (pass_cleanup_eh);
+ NEXT_PASS (pass_profile);
+ NEXT_PASS (pass_local_pure_const);
+ /* Split functions creates parts that are not run through
+ early optimizations again. It is thus good idea to do this
+ late. */
+ NEXT_PASS (pass_split_functions);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_release_ssa_names);
+ NEXT_PASS (pass_rebuild_cgraph_edges);
+ NEXT_PASS (pass_inline_parameters);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_ipa_free_inline_summary);
+ NEXT_PASS (pass_ipa_tree_profile);
+ PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile)
+ NEXT_PASS (pass_feedback_split_functions);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_ipa_increase_alignment);
+ NEXT_PASS (pass_ipa_tm);
+ NEXT_PASS (pass_ipa_lower_emutls);
+ TERMINATE_PASS_LIST ()
+
+ INSERT_PASSES_AFTER (all_regular_ipa_passes)
+ NEXT_PASS (pass_ipa_whole_program_visibility);
+ NEXT_PASS (pass_ipa_profile);
+ NEXT_PASS (pass_ipa_cp);
+ NEXT_PASS (pass_ipa_cdtor_merge);
+ NEXT_PASS (pass_ipa_inline);
+ NEXT_PASS (pass_ipa_pure_const);
+ NEXT_PASS (pass_ipa_reference);
+ TERMINATE_PASS_LIST ()
+
+ INSERT_PASSES_AFTER (all_lto_gen_passes)
+ NEXT_PASS (pass_ipa_lto_gimple_out);
+ NEXT_PASS (pass_ipa_lto_finish_out); /* This must be the last LTO pass. */
+ TERMINATE_PASS_LIST ()
+
+ /* Simple IPA passes executed after the regular passes. In WHOPR mode the
+ passes are executed after partitioning and thus see just parts of the
+ compiled unit. */
+ INSERT_PASSES_AFTER (all_late_ipa_passes)
+ NEXT_PASS (pass_ipa_pta);
+ TERMINATE_PASS_LIST ()
+
+ /* These passes are run after IPA passes on every function that is being
+ output to the assembler file. */
+ INSERT_PASSES_AFTER (all_passes)
+ NEXT_PASS (pass_fixup_cfg);
+ NEXT_PASS (pass_lower_eh_dispatch);
+ NEXT_PASS (pass_all_optimizations);
+ PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations)
+ NEXT_PASS (pass_remove_cgraph_callee_edges);
+ /* Initial scalar cleanups before alias computation.
+ They ensure memory accesses are not indirect wherever possible. */
+ NEXT_PASS (pass_strip_predict_hints);
+ NEXT_PASS (pass_rename_ssa_copies);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_complete_unrolli);
+ NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
+ NEXT_PASS (pass_phiprop);
+ NEXT_PASS (pass_forwprop);
+ /* pass_build_alias is a dummy pass that ensures that we
+ execute TODO_rebuild_alias at this point. */
+ NEXT_PASS (pass_build_alias);
+ NEXT_PASS (pass_return_slot);
+ NEXT_PASS (pass_fre);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_merge_phi);
+ NEXT_PASS (pass_vrp);
+ NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_call_cdce);
+ NEXT_PASS (pass_cselim);
+ NEXT_PASS (pass_tree_ifcombine);
+ NEXT_PASS (pass_phiopt);
+ NEXT_PASS (pass_tail_recursion);
+ NEXT_PASS (pass_ch);
+ NEXT_PASS (pass_stdarg);
+ NEXT_PASS (pass_lower_complex);
+ NEXT_PASS (pass_sra);
+ NEXT_PASS (pass_rename_ssa_copies);
+ /* The dom pass will also resolve all __builtin_constant_p calls
+ that are still there to 0. This has to be done after some
+ propagations have already run, but before some more dead code
+ is removed, and this place fits nicely. Remember this when
+ trying to move or duplicate pass_dominator somewhere earlier. */
+ NEXT_PASS (pass_dominator);
+ /* The only const/copy propagation opportunities left after
+ DOM should be due to degenerate PHI nodes. So rather than
+ run the full propagators, run a specialized pass which
+ only examines PHIs to discover const/copy propagation
+ opportunities. */
+ NEXT_PASS (pass_phi_only_cprop);
+ NEXT_PASS (pass_dse);
+ NEXT_PASS (pass_reassoc);
+ NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_forwprop);
+ NEXT_PASS (pass_phiopt);
+ NEXT_PASS (pass_object_sizes);
+ NEXT_PASS (pass_strlen);
+ NEXT_PASS (pass_ccp);
+ /* After CCP we rewrite no longer addressed locals into SSA
+ form if possible. */
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_cse_sincos);
+ NEXT_PASS (pass_optimize_bswap);
+ NEXT_PASS (pass_split_crit_edges);
+ NEXT_PASS (pass_pre);
+ NEXT_PASS (pass_sink_code);
+ NEXT_PASS (pass_asan);
+ NEXT_PASS (pass_tsan);
+ NEXT_PASS (pass_tree_loop);
+ PUSH_INSERT_PASSES_WITHIN (pass_tree_loop)
+ NEXT_PASS (pass_tree_loop_init);
+ NEXT_PASS (pass_lim);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_dce_loop);
+ NEXT_PASS (pass_tree_unswitch);
+ NEXT_PASS (pass_scev_cprop);
+ NEXT_PASS (pass_record_bounds);
+ NEXT_PASS (pass_check_data_deps);
+ NEXT_PASS (pass_loop_distribution);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_graphite);
+ PUSH_INSERT_PASSES_WITHIN (pass_graphite)
+ NEXT_PASS (pass_graphite_transforms);
+ NEXT_PASS (pass_lim);
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_dce_loop);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_iv_canon);
+ NEXT_PASS (pass_parallelize_loops);
+ NEXT_PASS (pass_if_conversion);
+ NEXT_PASS (pass_vectorize);
+ PUSH_INSERT_PASSES_WITHIN (pass_vectorize)
+ NEXT_PASS (pass_dce_loop);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_predcom);
+ NEXT_PASS (pass_complete_unroll);
+ NEXT_PASS (pass_slp_vectorize);
+ NEXT_PASS (pass_loop_prefetch);
+ NEXT_PASS (pass_iv_optimize);
+ NEXT_PASS (pass_lim);
+ NEXT_PASS (pass_tree_loop_done);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_lower_vector_ssa);
+ NEXT_PASS (pass_cse_reciprocals);
+ NEXT_PASS (pass_reassoc);
+ NEXT_PASS (pass_strength_reduction);
+ NEXT_PASS (pass_dominator);
+ /* The only const/copy propagation opportunities left after
+ DOM should be due to degenerate PHI nodes. So rather than
+ run the full propagators, run a specialized pass which
+ only examines PHIs to discover const/copy propagation
+ opportunities. */
+ NEXT_PASS (pass_phi_only_cprop);
+ NEXT_PASS (pass_vrp);
+ NEXT_PASS (pass_cd_dce);
+ NEXT_PASS (pass_tracer);
+
+ /* FIXME: If DCE is not run before checking for uninitialized uses,
+ we may get false warnings (e.g., testsuite/gcc.dg/uninit-5.c).
+ However, this also causes us to misdiagnose cases that should be
+ real warnings (e.g., testsuite/gcc.dg/pr18501.c).
+
+ To fix the false positives in uninit-5.c, we would have to
+ account for the predicates protecting the set and the use of each
+ variable. Using a representation like Gated Single Assignment
+ may help. */
+ NEXT_PASS (pass_late_warn_uninitialized);
+ NEXT_PASS (pass_dse);
+ NEXT_PASS (pass_forwprop);
+ NEXT_PASS (pass_phiopt);
+ NEXT_PASS (pass_fold_builtins);
+ NEXT_PASS (pass_optimize_widening_mul);
+ NEXT_PASS (pass_tail_calls);
+ NEXT_PASS (pass_rename_ssa_copies);
+ NEXT_PASS (pass_uncprop);
+ NEXT_PASS (pass_local_pure_const);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_all_optimizations_g);
+ PUSH_INSERT_PASSES_WITHIN (pass_all_optimizations_g)
+ NEXT_PASS (pass_remove_cgraph_callee_edges);
+ NEXT_PASS (pass_strip_predict_hints);
+ /* Lower remaining pieces of GIMPLE. */
+ NEXT_PASS (pass_lower_complex);
+ NEXT_PASS (pass_lower_vector_ssa);
+ /* Perform simple scalar cleanup which is constant/copy propagation. */
+ NEXT_PASS (pass_ccp);
+ NEXT_PASS (pass_object_sizes);
+ /* Fold remaining builtins. */
+ NEXT_PASS (pass_fold_builtins);
+ /* Copy propagation also copy-propagates constants, this is necessary
+ to forward object-size and builtin folding results properly. */
+ NEXT_PASS (pass_copy_prop);
+ NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_asan);
+ NEXT_PASS (pass_tsan);
+ NEXT_PASS (pass_rename_ssa_copies);
+ /* ??? We do want some kind of loop invariant motion, but we possibly
+ need to adjust LIM to be more friendly towards preserving accurate
+ debug information here. */
+ NEXT_PASS (pass_late_warn_uninitialized);
+ NEXT_PASS (pass_uncprop);
+ NEXT_PASS (pass_local_pure_const);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_tm_init);
+ PUSH_INSERT_PASSES_WITHIN (pass_tm_init)
+ NEXT_PASS (pass_tm_mark);
+ NEXT_PASS (pass_tm_memopt);
+ NEXT_PASS (pass_tm_edges);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_lower_vector);
+ NEXT_PASS (pass_lower_complex_O0);
+ NEXT_PASS (pass_asan_O0);
+ NEXT_PASS (pass_tsan_O0);
+ NEXT_PASS (pass_cleanup_eh);
+ NEXT_PASS (pass_lower_resx);
+ NEXT_PASS (pass_nrv);
+ NEXT_PASS (pass_mudflap_2);
+ NEXT_PASS (pass_cleanup_cfg_post_optimizing);
+ NEXT_PASS (pass_warn_function_noreturn);
+
+ NEXT_PASS (pass_expand);
+
+ NEXT_PASS (pass_rest_of_compilation);
+ PUSH_INSERT_PASSES_WITHIN (pass_rest_of_compilation)
+ NEXT_PASS (pass_instantiate_virtual_regs);
+ NEXT_PASS (pass_into_cfg_layout_mode);
+ NEXT_PASS (pass_jump);
+ NEXT_PASS (pass_lower_subreg);
+ NEXT_PASS (pass_df_initialize_opt);
+ NEXT_PASS (pass_cse);
+ NEXT_PASS (pass_rtl_fwprop);
+ NEXT_PASS (pass_rtl_cprop);
+ NEXT_PASS (pass_rtl_pre);
+ NEXT_PASS (pass_rtl_hoist);
+ NEXT_PASS (pass_rtl_cprop);
+ NEXT_PASS (pass_rtl_store_motion);
+ NEXT_PASS (pass_cse_after_global_opts);
+ NEXT_PASS (pass_rtl_ifcvt);
+ NEXT_PASS (pass_reginfo_init);
+ /* Perform loop optimizations. It might be better to do them a bit
+ sooner, but we want the profile feedback to work more
+ efficiently. */
+ NEXT_PASS (pass_loop2);
+ PUSH_INSERT_PASSES_WITHIN (pass_loop2)
+ NEXT_PASS (pass_rtl_loop_init);
+ NEXT_PASS (pass_rtl_move_loop_invariants);
+ NEXT_PASS (pass_rtl_unswitch);
+ NEXT_PASS (pass_rtl_unroll_and_peel_loops);
+ NEXT_PASS (pass_rtl_doloop);
+ NEXT_PASS (pass_rtl_loop_done);
+ TERMINATE_PASS_LIST ()
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_web);
+ NEXT_PASS (pass_rtl_cprop);
+ NEXT_PASS (pass_cse2);
+ NEXT_PASS (pass_rtl_dse1);
+ NEXT_PASS (pass_rtl_fwprop_addr);
+ NEXT_PASS (pass_inc_dec);
+ NEXT_PASS (pass_initialize_regs);
+ NEXT_PASS (pass_ud_rtl_dce);
+ NEXT_PASS (pass_combine);
+ NEXT_PASS (pass_if_after_combine);
+ NEXT_PASS (pass_partition_blocks);
+ NEXT_PASS (pass_regmove);
+ NEXT_PASS (pass_outof_cfg_layout_mode);
+ NEXT_PASS (pass_split_all_insns);
+ NEXT_PASS (pass_lower_subreg2);
+ NEXT_PASS (pass_df_initialize_no_opt);
+ NEXT_PASS (pass_stack_ptr_mod);
+ NEXT_PASS (pass_mode_switching);
+ NEXT_PASS (pass_match_asm_constraints);
+ NEXT_PASS (pass_sms);
+ NEXT_PASS (pass_sched);
+ NEXT_PASS (pass_ira);
+ NEXT_PASS (pass_reload);
+ NEXT_PASS (pass_postreload);
+ PUSH_INSERT_PASSES_WITHIN (pass_postreload)
+ NEXT_PASS (pass_postreload_cse);
+ NEXT_PASS (pass_gcse2);
+ NEXT_PASS (pass_split_after_reload);
+ NEXT_PASS (pass_ree);
+ NEXT_PASS (pass_compare_elim_after_reload);
+ NEXT_PASS (pass_branch_target_load_optimize1);
+ NEXT_PASS (pass_thread_prologue_and_epilogue);
+ NEXT_PASS (pass_rtl_dse2);
+ NEXT_PASS (pass_stack_adjustments);
+ NEXT_PASS (pass_jump2);
+ NEXT_PASS (pass_peephole2);
+ NEXT_PASS (pass_if_after_reload);
+ NEXT_PASS (pass_regrename);
+ NEXT_PASS (pass_cprop_hardreg);
+ NEXT_PASS (pass_fast_rtl_dce);
+ NEXT_PASS (pass_reorder_blocks);
+ NEXT_PASS (pass_branch_target_load_optimize2);
+ NEXT_PASS (pass_leaf_regs);
+ NEXT_PASS (pass_split_before_sched2);
+ NEXT_PASS (pass_sched2);
+ NEXT_PASS (pass_stack_regs);
+ PUSH_INSERT_PASSES_WITHIN (pass_stack_regs)
+ NEXT_PASS (pass_split_before_regstack);
+ NEXT_PASS (pass_stack_regs_run);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_compute_alignments);
+ NEXT_PASS (pass_duplicate_computed_gotos);
+ NEXT_PASS (pass_variable_tracking);
+ NEXT_PASS (pass_free_cfg);
+ NEXT_PASS (pass_machine_reorg);
+ NEXT_PASS (pass_cleanup_barriers);
+ NEXT_PASS (pass_delay_slots);
+ NEXT_PASS (pass_split_for_shorten_branches);
+ NEXT_PASS (pass_convert_to_eh_region_ranges);
+ NEXT_PASS (pass_shorten_branches);
+ NEXT_PASS (pass_set_nothrow_function_flags);
+ NEXT_PASS (pass_dwarf2_frame);
+ NEXT_PASS (pass_final);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_df_finish);
+ POP_INSERT_PASSES ()
+ NEXT_PASS (pass_clean_state);
+ TERMINATE_PASS_LIST ()
--
1.7.11.7
next prev parent reply other threads:[~2013-07-18 1:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 1:18 [PATCH 0/4] Move pass-creation logic into a " David Malcolm
2013-07-18 1:18 ` [PATCH 1/4] Introduce macros when constructing the tree of passes David Malcolm
2013-07-18 16:21 ` Jeff Law
2013-07-18 18:33 ` David Malcolm
2013-07-18 1:18 ` David Malcolm [this message]
2013-07-18 16:25 ` [PATCH 2/4] Move the construction of the pass hierarchy into a new passes.def file Jeff Law
2013-07-18 19:34 ` David Malcolm
2013-07-18 16:25 ` Jakub Jelinek
2013-07-18 1:18 ` [PATCH 4/4] Add contrib/check_passes.py script David Malcolm
2013-07-18 16:29 ` Jeff Law
2013-07-18 1:32 ` [PATCH 3/4] Introduce NEXT_PASS_NUM macro David Malcolm
2013-07-18 7:10 ` Andrew Pinski
2013-07-18 11:40 ` David Malcolm
2013-07-18 14:58 ` Andrew Pinski
2013-07-29 16:06 ` David Malcolm
2013-07-18 16:03 ` Tom Tromey
2013-07-18 16:25 ` Jeff Law
2013-07-29 19:42 ` David Malcolm
2013-07-29 20:01 ` Jeff Law
2013-07-22 18:45 ` Martin Jambor
2013-07-22 19:36 ` David Malcolm
2013-07-23 15:28 ` Martin Jambor
2013-07-23 15:46 ` David Malcolm
2013-07-24 15:18 ` Martin Jambor
2013-07-18 7:26 ` [PATCH 0/4] Move pass-creation logic into a passes.def file Andrew Pinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374110303-9758-3-git-send-email-dmalcolm@redhat.com \
--to=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).