This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Add annotations for expression and constants
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 10 Jun 2004 09:24:28 -0400
- Subject: Re: [PATCH]: Add annotations for expression and constants
- Organization: Red Hat Canada
- References: <1C733CAA-B7D9-11D8-909E-000A95DA505C@dberlin.org>
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.