summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-copy.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-05-03 19:55:55 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-05-03 19:55:55 +0000
commit16c337707b0c71829fcad74fdc82d85b1f103eaf (patch)
treec994ca1477a25fea22b8bbec8ca9896c6a292728 /gcc/tree-ssa-copy.c
parent62a67c94b776e5d07acd247e8a68f60f2a824024 (diff)
downloadgcc-16c337707b0c71829fcad74fdc82d85b1f103eaf.tar.gz
re PR tree-optimization/23329 (hack in may_propagate_copy should be able to removed)
2009-05-03 Richard Guenther <rguenther@suse.de> PR middle-end/23329 * tree-ssa.c (useless_type_conversion_p_1): Use get_deref_alias_set. Do not lose casts from array types with unknown extent to array types with known extent. * tree-ssa-copy.c (may_propagate_copy): Remove hack checking for alias set compatibility. From-SVN: r147082
Diffstat (limited to 'gcc/tree-ssa-copy.c')
-rw-r--r--gcc/tree-ssa-copy.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index f582ed0f996..9dad1cdc940 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -78,55 +78,6 @@ may_propagate_copy (tree dest, tree orig)
if (!useless_type_conversion_p (type_d, type_o))
return false;
- /* FIXME. GIMPLE is allowing pointer assignments and comparisons of
- pointers that have different alias sets. This means that these
- pointers will have different memory tags associated to them.
-
- If we allow copy propagation in these cases, statements de-referencing
- the new pointer will now have a reference to a different memory tag
- with potentially incorrect SSA information.
-
- This was showing up in libjava/java/util/zip/ZipFile.java with code
- like:
-
- struct java.io.BufferedInputStream *T.660;
- struct java.io.BufferedInputStream *T.647;
- struct java.io.InputStream *is;
- struct java.io.InputStream *is.662;
- [ ... ]
- T.660 = T.647;
- is = T.660; <-- This ought to be type-casted
- is.662 = is;
-
- Also, f/name.c exposed a similar problem with a COND_EXPR predicate
- that was causing DOM to generate and equivalence with two pointers of
- alias-incompatible types:
-
- struct _ffename_space *n;
- struct _ffename *ns;
- [ ... ]
- if (n == ns)
- goto lab;
- ...
- lab:
- return n;
-
- I think that GIMPLE should emit the appropriate type-casts. For the
- time being, blocking copy-propagation in these cases is the safe thing
- to do. */
- if (TREE_CODE (dest) == SSA_NAME
- && TREE_CODE (orig) == SSA_NAME
- && POINTER_TYPE_P (type_d)
- && POINTER_TYPE_P (type_o))
- {
- if (get_alias_set (TREE_TYPE (type_d))
- != get_alias_set (TREE_TYPE (type_o)))
- return false;
- else if (DECL_NO_TBAA_P (SSA_NAME_VAR (dest))
- != DECL_NO_TBAA_P (SSA_NAME_VAR (orig)))
- return false;
- }
-
/* Propagating virtual operands is always ok. */
if (TREE_CODE (dest) == SSA_NAME && !is_gimple_reg (dest))
{