aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorOleg Endo <olegendo@gcc.gnu.org>2015-01-05 22:04:53 +0000
committerOleg Endo <olegendo@gcc.gnu.org>2015-01-05 22:04:53 +0000
commitc9bd6bcd5d3b6250f86f48b2bb475e41a420c512 (patch)
tree8e3fd9b95272e38722b8ccc0c1966d15de16b449 /gcc/rtlanal.c
parentfca4adf2095dfcd453ab32250984d85ff66bbd32 (diff)
downloadgcc-c9bd6bcd5d3b6250f86f48b2bb475e41a420c512.zip
gcc-c9bd6bcd5d3b6250f86f48b2bb475e41a420c512.tar.gz
gcc-c9bd6bcd5d3b6250f86f48b2bb475e41a420c512.tar.bz2
rtlanal.c (refers_to_regno_p): Change return value from int to bool.
gcc/ * rtlanal.c (refers_to_regno_p): Change return value from int to bool. * rtl.h (refers_to_regno_p): Add overload. * cse.c: Use it. * bt-load.c: Likewise. * combine.c: Likewise. * df-scan.c: Likewise. * sched-deps.c: Likewise. * config/s390/s390.c: Likewise. * config/m32r/m32r.c: Likewise. * config/rs6000/spe.md: Likewise. * config/rs6000/rs6000.c: Likewise. * config/pa/pa.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/cris/cris.c: Likewise. * config/arc/arc.md: Likewise. * config/arc/arc.c: Likewise. * config/sh/sh.md: Likewise. * config/sh/sh.c: Likewise. * config/frv/frv.c: Likewise. From-SVN: r219203
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 760a5d6..43ed2de 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1402,7 +1402,7 @@ noop_move_p (const_rtx insn)
References contained within the substructure at LOC do not count.
LOC may be zero, meaning don't ignore anything. */
-int
+bool
refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
rtx *loc)
{
@@ -1415,7 +1415,7 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
/* The contents of a REG_NONNEG note is always zero, so we must come here
upon repeat in case the last REG_NOTE is a REG_NONNEG note. */
if (x == 0)
- return 0;
+ return false;
code = GET_CODE (x);
@@ -1433,7 +1433,7 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
#endif
|| x_regno == FRAME_POINTER_REGNUM)
&& regno >= FIRST_VIRTUAL_REGISTER && regno <= LAST_VIRTUAL_REGISTER)
- return 1;
+ return true;
return endregno > x_regno && regno < END_REGNO (x);
@@ -1466,10 +1466,10 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
SUBREG_REG (SET_DEST (x)), loc))
|| (!REG_P (SET_DEST (x))
&& refers_to_regno_p (regno, endregno, SET_DEST (x), loc))))
- return 1;
+ return true;
if (code == CLOBBER || loc == &SET_SRC (x))
- return 0;
+ return false;
x = SET_SRC (x);
goto repeat;
@@ -1491,7 +1491,7 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
}
else
if (refers_to_regno_p (regno, endregno, XEXP (x, i), loc))
- return 1;
+ return true;
}
else if (fmt[i] == 'E')
{
@@ -1499,10 +1499,10 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, const_rtx x,
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
if (loc != &XVECEXP (x, i, j)
&& refers_to_regno_p (regno, endregno, XVECEXP (x, i, j), loc))
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
/* Nonzero if modifying X will affect IN. If X is a register or a SUBREG,