diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 17:38:36 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-24 17:38:36 +0000 |
commit | e4f42b5b00b47222a1653b2ca1edb35ec40aa53d (patch) | |
tree | afed02e6556ed84602920335fcca293f65ff6255 /gcc/tree-ssa-copyrename.c | |
parent | 5dad28f1aa5236c87acd9baa5fed055743addf04 (diff) | |
download | gcc-e4f42b5b00b47222a1653b2ca1edb35ec40aa53d.tar.gz |
2004-09-24 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/16954
* tree-ssa-copyrename.c (copy_rename_partition_coalesce):
Prevent renaming if the aliasing sets of the type which the
pointer points to are different.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 49225d09b20..4ef5b3dbd1c 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -261,6 +261,18 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) return; } + /* Don't coalesce if the aliasing sets of the types are different. */ + if (POINTER_TYPE_P (TREE_TYPE (root1)) + && POINTER_TYPE_P (TREE_TYPE (root2)) + && get_alias_set (TREE_TYPE (TREE_TYPE (root1))) + != get_alias_set (TREE_TYPE (TREE_TYPE (root2)))) + { + if (debug) + fprintf (debug, " : 2 different alasing sets. No coalesce.\n"); + return; + } + + /* Merge the two partitions. */ p3 = partition_union (map->var_partition, p1, p2); |