[Bug rtl-optimization/16967] Iterating gcse.c CPROP and PRE does not reach a fixed point
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Apr 20 20:53:00 GMT 2006
------- Comment #7 from steven at gcc dot gnu dot org 2006-04-20 20:53 -------
I have tested this test case again with lcm.c patched with the patch below to
check for insertions on edges where an expression is already available. The
abort does not trigger.
The version of GCC that I patched and tested was extracted from SVN with the
following commands: svn co -r {"2004-08-10 15:10"} (etc.)
Index: lcm.c
===================================================================
--- lcm.c (revision 85749)
+++ lcm.c (working copy)
@@ -426,10 +426,6 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
dump_sbitmap_vector (file, "earliest", "", earliest, num_edges);
#endif
- sbitmap_vector_free (antout);
- sbitmap_vector_free (antin);
- sbitmap_vector_free (avout);
-
later = sbitmap_vector_alloc (num_edges, n_exprs);
/* Allocate an extra element for the exit block in the laterin vector. */
@@ -462,6 +458,32 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
}
#endif
+#if 1
+ {
+ sbitmap *avout_check;
+ sbitmap *insert_ = *insert;
+ int x;
+
+ avout_check = sbitmap_vector_alloc (num_edges, n_exprs);
+ sbitmap_vector_zero (avout_check, num_edges);
+
+ for (x = 0; x < num_edges; x++)
+ {
+ basic_block bb = INDEX_EDGE_PRED_BB (edge_list, x);
+ if (bb->index < 0)
+ continue;
+ sbitmap_copy (avout_check[x], avout[bb->index]);
+ sbitmap_a_and_b (avout_check[x], avout_check[x], insert_[x]);
+ if (sbitmap_first_set_bit (avout_check[x]) >= 0)
+ abort ();
+ }
+ }
+#endif
+
+ sbitmap_vector_free (antout);
+ sbitmap_vector_free (antin);
+ sbitmap_vector_free (avout);
+
return edge_list;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16967
More information about the Gcc-bugs
mailing list