diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-18 14:05:20 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-18 14:05:20 +0000 |
commit | 8a12616d28a3ea9b930ca08c1d752c6f0191357b (patch) | |
tree | 4614614174c761f4e19c8775384b4781c2975702 /gcc/tree-flow-inline.h | |
parent | 45afb71e5e5add2dadf910225eae01fba6db4d6b (diff) | |
download | gcc-8a12616d28a3ea9b930ca08c1d752c6f0191357b.tar.gz |
2004-06-18 Daniel Berlin <dberlin@dberlin.org>
Diego Novillo <dnovillo@redhat.com>
* tree-dfa.c (create_var_ann): tree_ann -> tree_ann_t.
(create_stmt_ann): Ditto.
(create_tree_ann): New function.
(create_cst_ann): Remove.
(create_expr_ann): Ditto.
* tree-flow-inline.h (cst_ann): Remove.
(get_cst_ann): Ditto.
(get_expr_ann): Ditto.
(expr_ann): Ditto.
(get_tree_ann): New function.
(tree_ann): Ditto.
(ann_type): tree_ann -> tree_ann_t.
* tree-flow.h (tree_ann_type): CST_ANN, EXPR_ANN removed.
(struct cst_ann_d): Removed.
(struct expr_ann_d): Ditto.
(union tree_ann_d): Removed cst and expr.
(tree_ann): Renamed to tree_ann_t.
* tree-ssa-ccp.c (set_rhs): tree_ann -> tree_ann_t.
* tree-ssa-pre.c (get_value_handle): Rewrite for single common
annotation.
(set_value_handle): Ditto.
(phi_translate): Ditto.
* tree-tailcall.c (adjust_return_value): tree_ann -> tree_ann_t.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 69 |
1 files changed, 18 insertions, 51 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index fbca4082b76..722259d3970 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -50,56 +50,6 @@ get_var_ann (tree var) return (ann) ? ann : create_var_ann (var); } - -/* Return the constant annotation for T, which must be a _CST node. - Return NULL if the constant annotation doesn't already exist. */ -static inline cst_ann_t -cst_ann (tree t) -{ -#if defined ENABLE_CHECKING - if (TREE_CODE_CLASS (TREE_CODE (t)) != 'c' - || (t->common.ann - && t->common.ann->common.type != CST_ANN)) - abort (); -#endif - - return (cst_ann_t) t->common.ann; -} - -/* Return the constant annotation for T, which must be a _CST node. - Create the constant annotation if it doesn't exist. */ -static inline cst_ann_t -get_cst_ann (tree var) -{ - cst_ann_t ann = cst_ann (var); - return (ann) ? ann : create_cst_ann (var); -} - -/* Return the expression annotation for T, which must be an expression - node. Return NULL if the expression annotation doesn't already - exist. */ -static inline expr_ann_t -expr_ann (tree t) -{ -#if defined ENABLE_CHECKING - if (!EXPR_P (t) - || (t->common.ann - && t->common.ann->common.type != EXPR_ANN)) - abort (); -#endif - - return (expr_ann_t) t->common.ann; -} - -/* Return the expression annotation for T, which must be an expression - node. Create the expression annotation if it doesn't exist. */ -static inline expr_ann_t -get_expr_ann (tree t) -{ - expr_ann_t ann = expr_ann (t); - return (ann) ? ann : create_expr_ann (t); -} - /* Return the statement annotation for T, which must be a statement node. Return NULL if the statement annotation doesn't exist. */ static inline stmt_ann_t @@ -125,7 +75,7 @@ get_stmt_ann (tree stmt) /* Return the annotation type for annotation ANN. */ static inline enum tree_ann_type -ann_type (tree_ann ann) +ann_type (tree_ann_t ann) { return ann->common.type; } @@ -798,4 +748,21 @@ mark_non_addressable (tree var) TREE_ADDRESSABLE (var) = 0; } +/* Return the common annotation for T. Return NULL if the annotation + doesn't already exist. */ +static inline tree_ann_t +tree_ann (tree t) +{ + return t->common.ann; +} + +/* Return a common annotation for T. Create the constant annotation if it + doesn't exist. */ +static inline tree_ann_t +get_tree_ann (tree t) +{ + tree_ann_t ann = tree_ann (t); + return (ann) ? ann : create_tree_ann (t); +} + #endif /* _TREE_FLOW_INLINE_H */ |