re PR rtl-optimization/55489 (insane PRE memory usage with PIE (translate.i))

2012-11-27  Paolo Bonzini  <pbonzini@redhat.com>

	PR rtl-optimization/55489
	* gcse.c (compute_transp): Precompute a canonical version
	of XEXP (x, 0), and pass it to canon_true_dependence.

From-SVN: r193867
This commit is contained in:
Paolo Bonzini 2012-11-27 20:26:57 +00:00 committed by Paolo Bonzini
parent 822cb0901e
commit ec2115167f
2 changed files with 29 additions and 19 deletions

View File

@ -1,3 +1,9 @@
2012-11-27 Paolo Bonzini <pbonzini@redhat.com>
PR rtl-optimization/55489
* gcse.c (compute_transp): Precompute a canonical version
of XEXP (x, 0), and pass it to canon_true_dependence.
2012-11-27 Richard Biener <rguenther@suse.de>
PR middle-end/55331

View File

@ -1658,6 +1658,10 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap)
{
bitmap_iterator bi;
unsigned bb_index;
rtx x_addr;
x_addr = get_addr (XEXP (x, 0));
x_addr = canon_rtx (x_addr);
/* First handle all the blocks with calls. We don't need to
do any list walking for them. */
@ -1666,27 +1670,27 @@ compute_transp (const_rtx x, int indx, sbitmap *bmap)
RESET_BIT (bmap[bb_index], indx);
}
/* Now iterate over the blocks which have memory modifications
but which do not have any calls. */
EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
blocks_with_calls,
0, bb_index, bi)
{
VEC (modify_pair,heap) *list
= canon_modify_mem_list[bb_index];
modify_pair *pair;
unsigned ix;
/* Now iterate over the blocks which have memory modifications
but which do not have any calls. */
EXECUTE_IF_AND_COMPL_IN_BITMAP (modify_mem_list_set,
blocks_with_calls,
0, bb_index, bi)
{
VEC (modify_pair,heap) *list
= canon_modify_mem_list[bb_index];
modify_pair *pair;
unsigned ix;
FOR_EACH_VEC_ELT_REVERSE (modify_pair, list, ix, pair)
{
rtx dest = pair->dest;
rtx dest_addr = pair->dest_addr;
FOR_EACH_VEC_ELT_REVERSE (modify_pair, list, ix, pair)
{
rtx dest = pair->dest;
rtx dest_addr = pair->dest_addr;
if (canon_true_dependence (dest, GET_MODE (dest),
dest_addr, x, NULL_RTX))
RESET_BIT (bmap[bb_index], indx);
}
}
if (canon_true_dependence (dest, GET_MODE (dest),
dest_addr, x, x_addr))
RESET_BIT (bmap[bb_index], indx);
}
}
}
x = XEXP (x, 0);