Commit 7bb3ae2f by Roman Zippel Committed by Roman Zippel

df-scan.c (df_read_modify_subreg_p): Use REGMODE_NATURAL_SIZE.

	* df-scan.c (df_read_modify_subreg_p): Use REGMODE_NATURAL_SIZE.
	(df_def_record_1): Set (DF_REF_READ_WRITE | DF_REF_PARTIAL) for
	partial register accesses.

From-SVN: r125940
parent aa7393d9
2007-06-22 Roman Zippel <zippel@linux-m68k.org>
* df-scan.c (df_read_modify_subreg_p): Use REGMODE_NATURAL_SIZE.
(df_def_record_1): Set (DF_REF_READ_WRITE | DF_REF_PARTIAL) for
partial register accesses.
2007-06-21 Adam Nemet <anemet@caviumnetworks.com> 2007-06-21 Adam Nemet <anemet@caviumnetworks.com>
* fold-const.c (debug_fold_checksum): Move it under * fold-const.c (debug_fold_checksum): Move it under
......
...@@ -2703,7 +2703,8 @@ df_read_modify_subreg_p (rtx x) ...@@ -2703,7 +2703,8 @@ df_read_modify_subreg_p (rtx x)
return false; return false;
isize = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))); isize = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)));
osize = GET_MODE_SIZE (GET_MODE (x)); osize = GET_MODE_SIZE (GET_MODE (x));
return (isize > osize && isize > UNITS_PER_WORD); return isize > osize
&& isize > REGMODE_NATURAL_SIZE (GET_MODE (SUBREG_REG (x)));
} }
...@@ -2718,7 +2719,6 @@ df_def_record_1 (struct df_collection_rec *collection_rec, ...@@ -2718,7 +2719,6 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
{ {
rtx *loc; rtx *loc;
rtx dst; rtx dst;
bool dst_in_strict_lowpart = false;
/* We may recursively call ourselves on EXPR_LIST when dealing with PARALLEL /* We may recursively call ourselves on EXPR_LIST when dealing with PARALLEL
construct. */ construct. */
...@@ -2749,33 +2749,16 @@ df_def_record_1 (struct df_collection_rec *collection_rec, ...@@ -2749,33 +2749,16 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
/* Maybe, we should flag the use of STRICT_LOW_PART somehow. It might /* Maybe, we should flag the use of STRICT_LOW_PART somehow. It might
be handy for the reg allocator. */ be handy for the reg allocator. */
while (GET_CODE (dst) == STRICT_LOW_PART while (GET_CODE (dst) == STRICT_LOW_PART
|| GET_CODE (dst) == ZERO_EXTRACT || GET_CODE (dst) == ZERO_EXTRACT)
|| df_read_modify_subreg_p (dst))
{ {
#if 0 flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL;
/* Strict low part always contains SUBREG, but we do not want to make
it appear outside, as whole register is always considered. */
if (GET_CODE (dst) == STRICT_LOW_PART)
{
loc = &XEXP (dst, 0);
dst = *loc;
}
#endif
loc = &XEXP (dst, 0); loc = &XEXP (dst, 0);
if (GET_CODE (dst) == STRICT_LOW_PART)
dst_in_strict_lowpart = true;
dst = *loc; dst = *loc;
flags |= DF_REF_READ_WRITE;
} }
/* Sets to a subreg of a single word register are partial sets if if (df_read_modify_subreg_p (dst))
they are wrapped in a strict lowpart, and not partial otherwise. flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL;
*/
if (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))
&& dst_in_strict_lowpart)
flags |= DF_REF_PARTIAL;
if (REG_P (dst) if (REG_P (dst)
|| (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst)))) || (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))))
df_ref_record (collection_rec, df_ref_record (collection_rec,
......
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