Commit 17e7ab87 by Tom de Vries Committed by Tom de Vries

Add pass parameter to TERMINATE_PASS_LIST

2016-04-17  Tom de Vries  <tom@codesourcery.com>

	PR other/68875
	* pass_manager.h (TERMINATE_PASS_LIST): Add pass argument.
	* passes.c (pass_manager::pass_manager): Declare and init p_start in
	INSERT_PASSES_AFTER.  Add pass parameter to TERMINATE_PASS_LIST, and
	check if it's equal to p_start.
	* passes.def: Add arguments to TERMINATE_PASS_LISTs.

From-SVN: r235071
parent 767f8bb1
2016-04-17 Tom de Vries <tom@codesourcery.com>
PR other/68875
* pass_manager.h (TERMINATE_PASS_LIST): Add pass argument.
* passes.c (pass_manager::pass_manager): Declare and init p_start in
INSERT_PASSES_AFTER. Add pass parameter to TERMINATE_PASS_LIST, and
check if it's equal to p_start.
* passes.def: Add arguments to TERMINATE_PASS_LISTs.
2016-04-15 Jan Hubicka <jh@suse.cz>
PR ipa/70018
......
......@@ -121,7 +121,7 @@ private:
#define POP_INSERT_PASSES()
#define NEXT_PASS(PASS, NUM) opt_pass *PASS ## _ ## NUM
#define NEXT_PASS_WITH_ARG(PASS, NUM, ARG) NEXT_PASS (PASS, NUM)
#define TERMINATE_PASS_LIST()
#define TERMINATE_PASS_LIST(PASS)
#include "pass-instances.def"
......
......@@ -1555,8 +1555,15 @@ pass_manager::pass_manager (context *ctxt)
/* Build the tree of passes. */
#define INSERT_PASSES_AFTER(PASS) \
p = &(PASS);
#define INSERT_PASSES_AFTER(PASS) \
{ \
opt_pass **p_start; \
p_start = p = &(PASS);
#define TERMINATE_PASS_LIST(PASS) \
gcc_assert (p_start == &PASS); \
*p = NULL; \
}
#define PUSH_INSERT_PASSES_WITHIN(PASS) \
{ \
......@@ -1584,9 +1591,6 @@ pass_manager::pass_manager (context *ctxt)
PASS ## _ ## NUM->set_pass_param (0, ARG); \
} while (0)
#define TERMINATE_PASS_LIST() \
*p = NULL;
#include "pass-instances.def"
#undef INSERT_PASSES_AFTER
......
......@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
PUSH_INSERT_PASSES_WITHIN (PASS)
POP_INSERT_PASSES ()
NEXT_PASS (PASS)
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (PASS)
*/
/* All passes needed to lower the function into shape optimizers can
......@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_warn_function_return);
NEXT_PASS (pass_expand_omp);
NEXT_PASS (pass_build_cgraph_edges);
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (all_lowering_passes)
/* Interprocedural optimization passes. */
INSERT_PASSES_AFTER (all_small_ipa_passes)
......@@ -142,7 +142,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_ipa_increase_alignment);
NEXT_PASS (pass_ipa_tm);
NEXT_PASS (pass_ipa_lower_emutls);
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (all_small_ipa_passes)
INSERT_PASSES_AFTER (all_regular_ipa_passes)
NEXT_PASS (pass_ipa_whole_program_visibility);
......@@ -162,7 +162,7 @@ along with GCC; see the file COPYING3. If not see
symbols are not allowed outside of the comdat group. Privatizing early
would result in missed optimizations due to this restriction. */
NEXT_PASS (pass_ipa_comdats);
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (all_regular_ipa_passes)
/* Simple IPA passes executed after the regular passes. In WHOPR mode the
passes are executed after partitioning and thus see just parts of the
......@@ -171,7 +171,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_ipa_pta);
NEXT_PASS (pass_dispatcher_calls);
NEXT_PASS (pass_omp_simd_clone);
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (all_late_ipa_passes)
/* These passes are run after IPA passes on every function that is being
output to the assembler file. */
......@@ -487,4 +487,4 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_df_finish);
POP_INSERT_PASSES ()
NEXT_PASS (pass_clean_state);
TERMINATE_PASS_LIST ()
TERMINATE_PASS_LIST (all_passes)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment