summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-17 09:40:21 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-17 09:40:21 +0000
commited83aafbe676263a969a18161cf0abc8cfadf5f4 (patch)
tree25ac03515e469bad58b3fc6c46d4fa8bd7ea4ca0 /gcc
parent96216d3703989c1516d675651ef7c6a95dcc7cbe (diff)
downloadgcc-ed83aafbe676263a969a18161cf0abc8cfadf5f4.tar.gz
* Makefile.in (print-rtl.o): Depend on TREE_H.
* alias.c (get_alias_set): Make two passes over objects to first see if inner object is access via restricted pointer. Defer allocating alias set for restricted pointer until here. Call find_placeholder with second arg nonzero. Minor cleanups. * c-common.c (c_apply_type_quals_to_decl): Defer getting alias set for restricted pointer types. * emit-rtl.c (set_mem_attributes): Set more attributes. (set_mem_align, change_address, adjust_address_1): New functions. (change_address_1): Now static. (adjust_address, adjust_address_nv): Deleted. (replace_equiv_address): Call change_address_1. * expr.c (get_inner_reference): Handle PLACEHOLDER_EXPR. (find_placeholder): Get starting point from PLIST arg. (expand_expr, case PLACEHOLDER_EXPR): Initialize find_placeholder arg. * expr.h (set_mem_align, change_address, adjust_address_1): New decls. (adjust_address, adjust_address_nv): New macros. * print-rtl.c (tree.h): New include. (print_rtx, case MEM): Print all memory attributes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46314 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/c-common.c26
2 files changed, 6 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 751e583ae39..809c20879a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -6,6 +6,8 @@ Wed Oct 17 05:26:39 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
Defer allocating alias set for restricted pointer until here.
Call find_placeholder with second arg nonzero.
Minor cleanups.
+ * c-common.c (c_apply_type_quals_to_decl): Defer getting alias
+ set for restricted pointer types.
* emit-rtl.c (set_mem_attributes): Set more attributes.
(set_mem_align, change_address, adjust_address_1): New functions.
(change_address_1): Now static.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 67b6e1e6c16..6a4e1af48fc 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -2131,28 +2131,10 @@ c_apply_type_quals_to_decl (type_quals, decl)
|| !C_TYPE_OBJECT_OR_INCOMPLETE_P (TREE_TYPE (TREE_TYPE (decl))))
error ("invalid use of `restrict'");
else if (flag_strict_aliasing)
- {
- /* No two restricted pointers can point at the same thing.
- However, a restricted pointer can point at the same thing
- as an unrestricted pointer, if that unrestricted pointer
- is based on the restricted pointer. So, we make the
- alias set for the restricted pointer a subset of the
- alias set for the type pointed to by the type of the
- decl. */
-
- HOST_WIDE_INT pointed_to_alias_set
- = get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
-
- if (pointed_to_alias_set == 0)
- /* It's not legal to make a subset of alias set zero. */
- ;
- else
- {
- DECL_POINTER_ALIAS_SET (decl) = new_alias_set ();
- record_alias_subset (pointed_to_alias_set,
- DECL_POINTER_ALIAS_SET (decl));
- }
- }
+ /* Indicate we need to make a unique alias set for this pointer.
+ We can't do it here because it might be pointing to an
+ incomplete type. */
+ DECL_POINTER_ALIAS_SET (decl) = -2;
}
}