This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 17558, make may_propagate_copy consistent with merge_alias_info

As usually when I commit something which improves the compiler,
I cause more problems than fixing them.  Well this patch
makes may_propagate_copy consistent with merge_alias_info which
fixes the ICE.  Note copyrename does some renaming it should not
if we should reject the propagation.  We also miss some
optimizations opportunities also if we reject the propagation,
just as in the IMA case too.

The patch here <> causes us to do the opposite and makes
merge_alias_info consistent with the current may_propagate_copy
which seems like a better fix as it does not prevent the
optimizations to happen and it also fixes another ICE with
IMA and aliasing sets.

OK? Bootstrapped and tested on powerpc-darwin.

Andrew Pinski

struct xobject {
       char type;
struct xobject *t1_Xform ( struct xobject *obj);
struct xobject * t1_Xform(struct xobject *obj)
  register struct font *F = (struct font *) obj;
  return((struct xobject*)F);

ChangeLog: * tree-ssa-copy.c (may_propagate_copy): Only allow if the aliasing sets are the same rather than just conflicting.

Index: tree-ssa-copy.c
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-copy.c,v
retrieving revision 2.15
diff -u -p -r2.15 tree-ssa-copy.c
--- tree-ssa-copy.c 15 Sep 2004 01:17:55 -0000 2.15
+++ tree-ssa-copy.c 19 Sep 2004 19:57:35 -0000
@@ -112,8 +112,8 @@ may_propagate_copy (tree dest, tree orig
return false;
else if (!lang_hooks.types_compatible_p (type_d, type_o))
return false;
- else if (!alias_sets_conflict_p (get_alias_set (TREE_TYPE (type_d)),
- get_alias_set (TREE_TYPE (type_o))))
+ else if (get_alias_set (TREE_TYPE (type_d)) !=
+ get_alias_set (TREE_TYPE (type_o)))
return false;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]