This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC]: Converting tree_opt_passes to use DEFPASS


Before i do the other 41 of these, i'd like to make sure nobody is going to complain about it :)

This patch adds a tree-opt-pass.def (and tree-opt-pass.h that uses it) to generate our tree_opt_pass all from one file.
Since none of the internal fields are in the macro, this lets the underlying tree_opt_pass structure be changed without having to modify 56 different files.


The only downside is that we have to make the gate and execute functions extern, rather than static.

I've not tried to do anything fancy with the macros (you could probably auto-generate time vars and dump names from the var name or something if we added a description field, for example) i just elided the internal-only fields from the macro.

Comments?
If nobody objects, i'll finish converting the other 41 tree_opt_pass structures to use this, and remove the extern structs from tree-pass.h


BTW, in case you want to see, the patch does bootstrap and regtest okay on powerpc-darwin, since it doesn't make it so you *can't* define tree_opt_pass structures outside of tree-opt-pass.def, it's just not going to be the preferred way anymore.
So I guess i could convert them incrementally if someone really wants.
--Dan


Attachment: treeoptpass.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]