Commit d9a6979d by Jakub Jelinek Committed by Jakub Jelinek

var-tracking.c (vt_initialize): Scan insns in ebb chunks instead of bb.

	* var-tracking.c (vt_initialize): Scan insns in ebb chunks instead
	of bb.

Co-Authored-By: Steven Bosscher <steven@gcc.gnu.org>

From-SVN: r157164
parent 2542496c
2010-03-02 Jakub Jelinek <jakub@redhat.com>
Steven Bosscher <steven@gcc.gnu.org>
* var-tracking.c (vt_initialize): Scan insns in ebb chunks instead
of bb.
2010-03-02 Reza Yazdani <reza.yazdani@amd.com>
PR middle-end/42640
......
......@@ -7399,9 +7399,9 @@ vt_initialize (void)
{
rtx insn;
HOST_WIDE_INT pre, post = 0;
int count;
unsigned int next_uid_before = cselib_get_next_uid ();
unsigned int next_uid_after = next_uid_before;
basic_block first_bb, last_bb;
if (MAY_HAVE_DEBUG_INSNS)
{
......@@ -7411,7 +7411,23 @@ vt_initialize (void)
cselib_get_next_uid ());
}
first_bb = bb;
for (;;)
{
edge e;
if (bb->next_bb == EXIT_BLOCK_PTR
|| ! single_pred_p (bb->next_bb))
break;
e = find_edge (bb, bb->next_bb);
if (! e || (e->flags & EDGE_FALLTHRU) == 0)
break;
bb = bb->next_bb;
}
last_bb = bb;
/* Count the number of micro operations. */
FOR_BB_BETWEEN (bb, first_bb, last_bb->next_bb, next_bb)
{
VTI (bb)->n_mos = 0;
for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb));
insn = NEXT_INSN (insn))
......@@ -7457,8 +7473,7 @@ vt_initialize (void)
}
}
}
count = VTI (bb)->n_mos;
}
if (MAY_HAVE_DEBUG_INSNS)
{
......@@ -7472,7 +7487,10 @@ vt_initialize (void)
}
/* Add the micro-operations to the array. */
VTI (bb)->mos = XNEWVEC (micro_operation, VTI (bb)->n_mos);
FOR_BB_BETWEEN (bb, first_bb, last_bb->next_bb, next_bb)
{
int count = VTI (bb)->n_mos;
VTI (bb)->mos = XNEWVEC (micro_operation, count);
VTI (bb)->n_mos = 0;
for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb));
insn = NEXT_INSN (insn))
......@@ -7484,7 +7502,8 @@ vt_initialize (void)
insn_stack_adjust_offset_pre_post (insn, &pre, &post);
if (pre)
{
micro_operation *mo = VTI (bb)->mos + VTI (bb)->n_mos++;
micro_operation *mo
= VTI (bb)->mos + VTI (bb)->n_mos++;
mo->type = MO_ADJUST;
mo->u.adjust = pre;
......@@ -7524,6 +7543,10 @@ vt_initialize (void)
}
}
gcc_assert (count == VTI (bb)->n_mos);
}
bb = last_bb;
if (MAY_HAVE_DEBUG_INSNS)
{
cselib_preserve_only_values (true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment