diff options
author | Michael Matz <matz@gcc.gnu.org> | 2009-11-24 15:37:32 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2009-11-24 15:37:32 +0000 |
commit | a5883ba0de68efad36db145e75c86394d8bd44ea (patch) | |
tree | b906ae87996cd4f2fdf60f2a50c3cbf838d510f2 /gcc/tree-flow-inline.h | |
parent | 6e0b03f5855ae33c0e25d723c5cfc0f2dbc6698f (diff) | |
download | gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.zip gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.tar.gz gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.tar.bz2 |
tree.h (union tree_ann_d): Don't declare.
* tree.h (union tree_ann_d): Don't declare.
(tree_base): Remove ann field.
(struct var_ann_d): Declare forward.
(tree_result_decl, tree_parm_decl, tree_var_decl): Add ann field.
(DECL_VAR_ANN_PTR): New macro.
* tree-dfa.c (create_var_ann): Rewrite in terms of above macro,
accept only VAR, PARM or RESULT decls.
(create_tree_common_ann): Remove.
(remove_referenced_var): Use DECL_VAR_ANN_PTR.
* tree-eh.c (lookup_expr_eh_lp): Remove.
* tree-flow-inline.h (var_ann, get_var_ann): Rewrite in terms of
DECL_VAR_ANN_PTR.
(ann_type, tree_common_ann, get_tree_common_ann): Remove.
* tree-flow.h (enum tree_ann_type): Remove.
(struct tree_ann_common_d): Remove.
(struct var_ann_d): Remove common field.
(union tree_ann_d): Remove.
(tree_ann_t, tree_ann_common_t): Remove typedefs.
(tree_common_ann, get_tree_common_ann, ann_type,
create_tree_common_ann, lookup_expr_eh_lp): Don't declare.
* tree-ssa.c (delete_tree_ssa): Use DECL_VAR_ANN_PTR.
* tree.c (copy_node_stat): Use DECL_VAR_ANN_PTR.
* builtins.c (expand_builtin_memcpy): Use
currently_expanding_gimple_stmt instead of tree annotation.
(expand_builtin_memset_args): Ditto.
* cfgexpand.c (currently_expanding_gimple_stmt): Add global variable.
(expand_call_stmt): Don't set tree annotation.
(expand_gimple_basic_block): Set currently_expanding_gimple_stmt.
* expr.c (expand_expr_real): Don't call lookup_expr_eh_lp.
* gimple.h (currently_expanding_gimple_stmt): Declare.
From-SVN: r154502
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r-- | gcc/tree-flow-inline.h | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index fdb3337..56dc9f0 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -152,15 +152,8 @@ fill_referenced_var_vec (VEC (tree, heap) **vec) static inline var_ann_t var_ann (const_tree t) { - var_ann_t ann; - - if (!t->base.ann) - return NULL; - ann = (var_ann_t) t->base.ann; - - gcc_assert (ann->common.type == VAR_ANN); - - return ann; + const var_ann_t *p = DECL_VAR_ANN_PTR (t); + return p ? *p : NULL; } /* Return the variable annotation for T, which must be a _DECL node. @@ -168,8 +161,9 @@ var_ann (const_tree t) static inline var_ann_t get_var_ann (tree var) { - var_ann_t ann = var_ann (var); - return (ann) ? ann : create_var_ann (var); + var_ann_t *p = DECL_VAR_ANN_PTR (var); + gcc_assert (p); + return *p ? *p : create_var_ann (var); } /* Get the number of the next statement uid to be allocated. */ @@ -193,13 +187,6 @@ inc_gimple_stmt_max_uid (struct function *fn) return fn->last_stmt_uid++; } -/* Return the annotation type for annotation ANN. */ -static inline enum tree_ann_type -ann_type (tree_ann_t ann) -{ - return ann->common.type; -} - /* Return the line number for EXPR, or return -1 if we have no line number information for it. */ static inline int @@ -678,26 +665,6 @@ is_call_used (const_tree var) && pt_solution_includes (&cfun->gimple_df->callused, var))); } -/* Return the common annotation for T. Return NULL if the annotation - doesn't already exist. */ -static inline tree_ann_common_t -tree_common_ann (const_tree t) -{ - /* Watch out static variables with unshared annotations. */ - if (DECL_P (t) && TREE_CODE (t) == VAR_DECL) - return &var_ann (t)->common; - return &t->base.ann->common; -} - -/* Return a common annotation for T. Create the constant annotation if it - doesn't exist. */ -static inline tree_ann_common_t -get_tree_common_ann (tree t) -{ - tree_ann_common_t ann = tree_common_ann (t); - return (ann) ? ann : create_tree_common_ann (t); -} - /* ----------------------------------------------------------------------- */ /* The following set of routines are used to iterator over various type of |