* tree-pass.h (GCC_PASS_LISTS): Define.
(PASS_LIST_NO_all_lowering_passes): New enumeration value.
(PASS_LIST_NO_all_small_ipa_passes): Likewise.
(PASS_LIST_NO_all_regular_ipa_passes): Likewise.
(PASS_LIST_NO_all_lto_gen_passes): Likewise.
(PASS_LIST_NO_all_passes): Likewise.
(PASS_LIST_NUM): Likewise.
(gcc_pass_lists): Declare.
* passes.c (gcc_pass_lists): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155354
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-19 Joern Rennecke <amylaar@spamcop.net>
+
+ * Makefile.in (PLUGIN_HEADERS): Add more headers.
+
+ * tree-pass.h (GCC_PASS_LISTS): Define.
+ (PASS_LIST_NO_all_lowering_passes): New enumeration value.
+ (PASS_LIST_NO_all_small_ipa_passes): Likewise.
+ (PASS_LIST_NO_all_regular_ipa_passes): Likewise.
+ (PASS_LIST_NO_all_lto_gen_passes): Likewise.
+ (PASS_LIST_NO_all_passes): Likewise.
+ (PASS_LIST_NUM): Likewise.
+ (gcc_pass_lists): Declare.
+ * passes.c (gcc_pass_lists): Define.
+
2009-12-18 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (copy_nary): New function.
tree-iterator.h $(PLUGIN_H) $(TREE_FLOW_H) langhooks.h incpath.h \
tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \
$(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) \
- cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h
+ cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \
+ $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H)
# generate the 'build fragment' b-header-vars
s-header-vars: Makefile
struct opt_pass *all_passes, *all_small_ipa_passes, *all_lowering_passes,
*all_regular_ipa_passes, *all_lto_gen_passes;
+/* This is used by plugins, and should also be used in register_pass. */
+#define DEF_PASS_LIST(LIST) &LIST,
+struct opt_pass **gcc_pass_lists[] = { GCC_PASS_LISTS NULL };
+#undef DEF_PASS_LIST
+
/* A map from static pass id to optimization pass. */
struct opt_pass **passes_by_id;
int passes_by_id_size;
extern struct opt_pass *all_passes, *all_small_ipa_passes, *all_lowering_passes,
*all_regular_ipa_passes, *all_lto_gen_passes;
+/* Define a list of pass lists so that both passes.c and plugins can easily
+ find all the pass lists. */
+#define GCC_PASS_LISTS \
+ DEF_PASS_LIST (all_lowering_passes) \
+ DEF_PASS_LIST (all_small_ipa_passes) \
+ DEF_PASS_LIST (all_regular_ipa_passes) \
+ DEF_PASS_LIST (all_lto_gen_passes) \
+ DEF_PASS_LIST (all_passes)
+
+#define DEF_PASS_LIST(LIST) PASS_LIST_NO_##LIST,
+enum
+{
+ GCC_PASS_LISTS
+ PASS_LIST_NUM
+};
+#undef DEF_PASS_LIST
+
+/* This is used by plugins, and should also be used in
+ passes.c:register_pass. */
+extern struct opt_pass **gcc_pass_lists[];
+
/* Current optimization pass. */
extern struct opt_pass *current_pass;