This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][dataflow,commited] Fix merge issue, and commit gcse fix
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Kenneth Zadeck <zadeck at naturalbridge dot com>, Daniel Berlin <dberlin at dberlin dot org>
- Date: Wed, 11 Apr 2007 22:01:59 +0200
- Subject: [PATCH][dataflow,commited] Fix merge issue, and commit gcse fix
Hi,
I've commited this patch to the dataflow branch.
Gr.
Steven
* gcse.c (hash_scan_set): Make sure that INSN has only one
SET in its PATTERN before making SRC anticipatable.
* cfglayout.c (fixup_reorder_chain): Fix merge error, don't
call compact_blocks here.
Index: gcse.c
===================================================================
--- gcse.c (revision 123721)
+++ gcse.c (working copy)
@@ -1733,8 +1733,11 @@ hash_scan_set (rtx pat, rtx insn, struct
{
/* An expression is not anticipatable if its operands are
modified before this insn or if this is not the only SET in
- this insn. */
- int antic_p = oprs_anticipatable_p (src, insn) && single_set (insn);
+ this insn. The latter condition does not have to mean that
+ SRC itself is not anticipatable, but we just will not be
+ able to handle code motion of insns with multiple sets. */
+ int antic_p = oprs_anticipatable_p (src, insn)
+ && !multiple_sets (insn);
/* An expression is not available if its operands are
subsequently modified, including this insn. It's also not
available if this is a branch, because we can't insert
@@ -4918,7 +4921,7 @@ hoist_code (void)
if (! found)
{
free (domby);
- continue;
+ continue;
}
/* Loop over all the hoistable expressions. */
Index: cfglayout.c
===================================================================
--- cfglayout.c (revision 123721)
+++ cfglayout.c (working copy)
@@ -906,11 +906,6 @@ fixup_reorder_chain (void)
relink_block_chain (/*stay_in_cfglayout_mode=*/false);
- /* Now that the prev and next ptrs are in place, let compact_blocks
- deal with the array and the indexes. It knows how to keep the
- dataflow up to date. */
- compact_blocks ();
-
/* Annoying special case - jump around dead jumptables left in the code. */
FOR_EACH_BB (bb)
{