summaryrefslogtreecommitdiff
path: root/gcc/df-scan.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-08-30 15:28:18 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-08-30 15:28:18 +0000
commit33845ca96bdaa9510cfb041540a45c3e8be6c477 (patch)
treebc69488d125557e352f5d02d91a2fdac5505faa3 /gcc/df-scan.c
parentbd4288c02b487cc8a9afcfa9c21bfe594a78e26d (diff)
Drop df_ from df_read_modify_subreg_p
...it's really a general RTL predicate, rather than something that depends on the DF state. Thanks to Segher for the suggestion. 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * df.h (df_read_modify_subreg_p): Remove in favor of... * rtl.h (read_modify_subreg_p): ...this new function. Take a const_rtx instead of an rtx. * cprop.c (local_cprop_find_used_regs): Update accordingly. * df-problems.c (df_word_lr_mark_ref): Likewise. * ira-lives.c (mark_pseudo_reg_live): Likewise. (mark_pseudo_reg_dead): Likewise. (mark_ref_dead): Likewise. * reginfo.c (init_subregs_of_mode): Likewise. * sched-deps.c (sched_analyze_1): Likewise. * df-scan.c (df_def_record_1): Likewise. (df_uses_record): Likewise. (df_read_modify_subreg_p): Remove in favor of... * rtlanal.c (read_modify_subreg_p): ...this new function. Take a const_rtx instead of an rtx. From-SVN: r251537
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r--gcc/df-scan.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index dde6d15d07b..8ab3d716ea2 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -2623,24 +2623,6 @@ df_ref_record (enum df_ref_class cl,
}
-/* A set to a non-paradoxical SUBREG for which the number of word_mode units
- covered by the outer mode is smaller than that covered by the inner mode,
- is a read-modify-write operation.
- This function returns true iff the SUBREG X is such a SUBREG. */
-
-bool
-df_read_modify_subreg_p (rtx x)
-{
- unsigned int isize, osize;
- if (GET_CODE (x) != SUBREG)
- return false;
- isize = GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)));
- osize = GET_MODE_SIZE (GET_MODE (x));
- return isize > osize
- && isize > REGMODE_NATURAL_SIZE (GET_MODE (SUBREG_REG (x)));
-}
-
-
/* Process all the registers defined in the rtx pointed by LOC.
Autoincrement/decrement definitions will be picked up by df_uses_record.
Any change here has to be matched in df_find_hard_reg_defs_1. */
@@ -2696,7 +2678,7 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
}
else if (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst)))
{
- if (df_read_modify_subreg_p (dst))
+ if (read_modify_subreg_p (dst))
flags |= DF_REF_READ_WRITE | DF_REF_PARTIAL;
flags |= DF_REF_SUBREG;
@@ -2910,7 +2892,7 @@ df_uses_record (struct df_collection_rec *collection_rec,
switch (GET_CODE (dst))
{
case SUBREG:
- if (df_read_modify_subreg_p (dst))
+ if (read_modify_subreg_p (dst))
{
df_uses_record (collection_rec, &SUBREG_REG (dst),
DF_REF_REG_USE, bb, insn_info,