diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-19 02:33:03 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-19 02:33:03 +0000 |
commit | c34d15451ad4d9200cc3cdc456fdbb9d7d67b600 (patch) | |
tree | 64645446df1c6d17b691611d925a9573c34adf27 | |
parent | 995187476d802ee49088769a15b212e0d5c8e938 (diff) | |
download | gcc-c34d15451ad4d9200cc3cdc456fdbb9d7d67b600.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155354 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/Makefile.in | 3 | ||||
-rw-r--r-- | gcc/passes.c | 5 | ||||
-rw-r--r-- | gcc/tree-pass.h | 21 |
4 files changed, 42 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 34809207012..2c21b321a4b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +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. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 21be2daef98..10638ef70d4 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -4275,7 +4275,8 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ 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 diff --git a/gcc/passes.c b/gcc/passes.c index a373a004928..fde3379b7c2 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -337,6 +337,11 @@ struct rtl_opt_pass pass_postreload = 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; diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index b997eb126ec..40cfb0f6891 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -562,6 +562,27 @@ extern struct gimple_opt_pass pass_convert_switch; 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; |