This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix to Zdenek's store motion patch installed
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rakdver at atrey dot karlin dot mff dot cuni dot cz
- Date: Wed, 30 Jul 2003 19:22:24 +0200
- Subject: Fix to Zdenek's store motion patch installed
Hi,
Zdenek's patch makes split_edge to be called on fake edges that dies
later horribly. I've bootstrapped/regtested the attached patch and
installed it as obvious.
Honza
Wed Jul 30 18:47:59 CEST 2003 Jan Hubicka <jh@suse.cz>
* gcse.c (insert_store): Ignore fake edges.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.263
diff -c -3 -p -r1.263 gcse.c
*** gcse.c 24 Jul 2003 20:59:29 -0000 1.263
--- gcse.c 30 Jul 2003 16:47:03 -0000
*************** insert_store (struct ls_expr * expr, edg
*** 7495,7500 ****
--- 7495,7503 ----
if (expr->reaching_reg == NULL_RTX)
return 0;
+ if (e->flags & EDGE_FAKE)
+ return 0;
+
reg = expr->reaching_reg;
insn = gen_move_insn (copy_rtx (expr->pattern), reg);
*************** insert_store (struct ls_expr * expr, edg
*** 7503,7515 ****
edges so we don't try to insert it on the other edges. */
bb = e->dest;
for (tmp = e->dest->pred; tmp ; tmp = tmp->pred_next)
! {
! int index = EDGE_INDEX (edge_list, tmp->src, tmp->dest);
! if (index == EDGE_INDEX_NO_EDGE)
! abort ();
! if (! TEST_BIT (pre_insert_map[index], expr->index))
! break;
! }
/* If tmp is NULL, we found an insertion on every edge, blank the
insertion vector for these edges, and insert at the start of the BB. */
--- 7506,7519 ----
edges so we don't try to insert it on the other edges. */
bb = e->dest;
for (tmp = e->dest->pred; tmp ; tmp = tmp->pred_next)
! if (!tmp->flags & EDGE_FAKE)
! {
! int index = EDGE_INDEX (edge_list, tmp->src, tmp->dest);
! if (index == EDGE_INDEX_NO_EDGE)
! abort ();
! if (! TEST_BIT (pre_insert_map[index], expr->index))
! break;
! }
/* If tmp is NULL, we found an insertion on every edge, blank the
insertion vector for these edges, and insert at the start of the BB. */