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] |
During the tuple decussion, I mentioned that PHIs' memory usage could be reduced by remove the type field. This patch implements this suggestion by using the work that was done for GIMPLE_MODIFY_STMT. A couple changes to the middle-end more than just changing the base object type was needed because some passes uses TREE_CHAIN of the phi node when they should have been using PHI_CHAIN. Also some of the front-ends needed to be changed for their definition of lang_tree_node for the chain_next GTY. This patch adds a new macro called GENERIC_NEXT as recommended by Deigo to simplify that code. OK? Bootstrapped and tested on powerpc64-linux-gnu with no regressions, also cross built to spu-elf and tested with no regressions. Thanks, Andrew Pinski ChangeLog: * tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs. (GENERIC_NEXT): New function macro. (PHI_CHAIN): Use phi_node's new chain variable. (tree_phi_node): Change tree_common to tree_base and add the chain field. * tree-phinodes.c (make_phi_node): Don't set TREE_TYPE on the new node. * c-decl.c (lang_tree_node): Use GENERIC_NEXT instead of checking GIMPLE_TUPLE_P in chain_next. * tree-vect-transform.c (get_initial_def_for_induction): Look at PHI_RESULT_TREE for the type of the phi node. (update_vuses_to_preheader): Use PHI_CHAIN instead of TREE_CHAIN on the phi node. * tree-ssa-structalias.c (compute_points_to_sets): Likewise. (ipa_pta_execute): Likewise. cp/ChangeLog: * cp-tree.h (lang_tree_node): Use GENERIC_NEXT instead of checking GIMPLE_STMT_P in chain_next. ada/ChangeLog: * ada-tree.h (lang_tree_node): Use GENERIC_NEXT instead of checking GIMPLE_STMT_P in chain_next. java/ChangeLog: * java-tree.h (lang_tree_node): Use GENERIC_NEXT instead of checking GIMPLE_STMT_P in chain_next. fortran/ChangeLog: * f95-lang.c (lang_tree_node): Use GENERIC_NEXT instead of checking GIMPLE_STMT_P in chain_next.
Attachment:
phinode.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |