diff options
author | Ian Lance Taylor <ian@airs.com> | 2005-10-03 08:43:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2005-10-03 08:43:45 +0000 |
commit | 0b494699b41f22f5392c7f2f5f4683e96b8fc0cd (patch) | |
tree | 12db18961c42def11ca08dfd5229612afd843c31 /gcc/alias.c | |
parent | 644cb69f803dc904c271885272e70f032ce56a97 (diff) | |
download | gcc-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/alias.c')
-rw-r--r-- | gcc/alias.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 49f712e..4806019 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -395,9 +395,14 @@ find_base_decl (tree t) if (t == 0 || t == error_mark_node || ! POINTER_TYPE_P (TREE_TYPE (t))) return 0; - /* If this is a declaration, return it. */ + /* If this is a declaration, return it. If T is based on a restrict + qualified decl, return that decl. */ if (DECL_P (t)) - return t; + { + if (TREE_CODE (t) == VAR_DECL && DECL_BASED_ON_RESTRICT_P (t)) + t = DECL_GET_RESTRICT_BASE (t); + return t; + } /* Handle general expressions. It would be nice to deal with COMPONENT_REFs here. If we could tell that `a' and `b' were the |