aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-10-03 08:43:45 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-10-03 08:43:45 +0000
commit0b494699b41f22f5392c7f2f5f4683e96b8fc0cd (patch)
tree12db18961c42def11ca08dfd5229612afd843c31 /gcc/tree.h
parent644cb69f803dc904c271885272e70f032ce56a97 (diff)
downloadgcc-0b494699b41f22f5392c7f2f5f4683e96b8fc0cd.zip
gcc-0b494699b41f22f5392c7f2f5f4683e96b8fc0cd.tar.gz
gcc-0b494699b41f22f5392c7f2f5f4683e96b8fc0cd.tar.bz2
gimplify.c (find_single_pointer_decl_1): New static function.
* gimplify.c (find_single_pointer_decl_1): New static function. (find_single_pointer_decl): New static function. (internal_get_tmp_var): For a formal variable, set restrict base information if appropriate. * alias.c (find_base_decl): If a VAR_DECL has a restrict base, return it. * tree.h (DECL_BASED_ON_RESTRICT_P): Define. (DECL_GET_RESTRICT_BASE): Define. (SET_DECL_RESTRICT_BASE): Define. (decl_restrict_base_lookup): Declare. (decl_restrict_base_insert): Declare. (struct tree_decl_with_vis): Add based_on_restrict_p field. * tree.c (restrict_base_for_decl): New static variable. (init_ttree): Initialize restrict_base_for_decl. (copy_node_stat): Copy restrict base information. (decl_restrict_base_lookup): New function. (decl_restrict_base_insert): New function. (print_restrict_base_statistics): New static function. (dump_tree_statistics): Call print_restrict_base_statistics. From-SVN: r104890
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 198c443..08f33fe 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2425,6 +2425,20 @@ struct tree_parm_decl GTY(())
an address constant. */
#define DECL_NON_ADDR_CONST_P(NODE) (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.non_addr_const_p)
+/* DECL_BASED_ON_RESTRICT_P records whether a VAR_DECL is a temporary
+ based on a variable with a restrict qualified type. If it is,
+ DECL_RESTRICT_BASE returns the restrict qualified variable on which
+ it is based. */
+
+#define DECL_BASED_ON_RESTRICT_P(NODE) \
+ (VAR_DECL_CHECK (NODE)->decl_with_vis.based_on_restrict_p)
+#define DECL_GET_RESTRICT_BASE(NODE) \
+ (decl_restrict_base_lookup (VAR_DECL_CHECK (NODE)))
+#define SET_DECL_RESTRICT_BASE(NODE, VAL) \
+ (decl_restrict_base_insert (VAR_DECL_CHECK (NODE), (VAL)))
+
+extern tree decl_restrict_base_lookup (tree);
+extern void decl_restrict_base_insert (tree, tree);
/* Used in a DECL to indicate that, even if it TREE_PUBLIC, it need
not be put out unless it is needed in this translation unit.
@@ -2500,7 +2514,8 @@ struct tree_decl_with_vis GTY(())
unsigned common_flag:1;
unsigned in_text_section : 1;
unsigned gimple_formal_temp : 1;
- unsigned non_addr_const_p : 1;
+ unsigned non_addr_const_p : 1;
+ unsigned based_on_restrict_p : 1;
/* Used by C++. Might become a generic decl flag. */
unsigned shadowed_for_var_p : 1;
@@ -2517,7 +2532,7 @@ struct tree_decl_with_vis GTY(())
/* Belongs to VAR_DECL exclusively. */
ENUM_BITFIELD(tls_model) tls_model : 3;
- /* 13 unused bits. */
+ /* 11 unused bits. */
};
/* In a VAR_DECL that's static,