This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Fix problem in move_complex_constraints
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Dec 2006 12:31:32 -0500
- Subject: [PATCH]: Fix problem in move_complex_constraints
This simple bug causes some points-to sets to be empty when they
shouldn't, because we won't propagate the correct results.
Sadly, on some testcases I have, this increases the GC memory used by
3-5%, mainly because we now have more SMT's used (since most of these
variables point to anything).
I think i have a way to reduce the number of SMT's we mark as used
that i will post as a followup.
Bootstrapped and regtested on i686-darwin.
Committed to mainline.
--- ChangeLog (revision 838)
+++ ChangeLog (revision 839)
@@ -1,3 +1,8 @@
+2006-12-21 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-ssa-structalias.c (build_constraint_graph): Insert complex
+ offsetted constraints into rhsvar, not lhsvar.
+
2006-12-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/30262
--- tree-ssa-structalias.c (revision 838)
+++ tree-ssa-structalias.c (revision 839)
@@ -911,7 +911,7 @@ build_constraint_graph (void)
if (lhsvar != rhsvar || rhs.offset != 0 || lhs.offset != 0)
{
if (rhs.offset != 0 || lhs.offset != 0)
- insert_into_complex (lhsvar, c);
+ insert_into_complex (rhsvar, c);
else
add_graph_edge (graph, lhs.var, rhs.var);
}