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]

Re: [PATCH]: Add annotations for expression and constants


On Sun, 2004-06-06 at 12:46, Daniel Berlin wrote:

> 	* tree-flow.h (tree_ann_type): Add CST_ANN, EXPR_ANN.
> 	(struct cst_ann_d): New.
> 	(struct expr_ann_d): New.
> 	(union tree_ann_d): Add cst_ann, expr_ann.
> 	* tree-dfa.c (create_cst_ann): New function.
> 	(create_expr_ann): Ditto.
> 	* tree-flow-inline.h (cst_ann): New function.
> 	(expr_ann): Ditto.
> 	(get_cst_ann): Ditto.
> 	(get_expr_ann): Ditto..
> 
The annotations are empty.  What are you going to store in there?  Just
a single hash value?  Perhaps we could make this faster and hijack
tree_common.ann to store them directly there.  After all, the hash
values will end up in a field of SSA_NAME nodes, right?

If that's the case, perhaps we would be better off just overloading
tree_common.ann while GVN-PRE runs and then move that value into the
corresponding SSA_NAME.  If there's more state that you want to keep,
let's use this approach.


Diego.


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