summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-22 10:29:13 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-22 10:29:13 +0000
commit971ba038cb2a1622217c016dc0203452f9bc5dcd (patch)
tree11fcb232ab948e07b794c4b08b2ffbb2030069f7 /gcc/alias.c
parentfee20f444f6e1bf1f5372adff13d497c9322464f (diff)
downloadgcc-971ba038cb2a1622217c016dc0203452f9bc5dcd.tar.gz
2009-06-22 Shujing Zhao <pearly.zhao@oracle.com>
* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and JUMP_TABLE_DATA_P predicates where applicable. * auto-inc-dec.c: Ditto. * builtins.c: Ditto. * caller-save.c: Ditto. * calls.c: Ditto. * cfgcleanup.c: Ditto. * cfglayout.c: Ditto. * cfgrtl.c: Ditto. * combine.c: Ditto. * combine-stack-adj.c: Ditto. * cse.c: Ditto. * cselib.c: Ditto. * dbxout.c: Ditto. * df-scan.c: Ditto. * dse.c: Ditto. * dwarf2asm.c: Ditto. * dwarf2out.c: Ditto. * emit-rtl.c: Ditto. * except.c: Ditto. * explow.c: Ditto. * expmed.c: Ditto. * expr.c: Ditto. * final.c: Ditto. * function.c: Ditto. * fwprop.c: Ditto. * gcse.c: Ditto. * genpreds.c: Ditto. * genrecog.c: Ditto. * ifcvt.c: Ditto. * ira-costs.c: Ditto. * ira-lives.c: Ditto. * jump.c: Ditto. * loop-iv.c: Ditto. * lower-subreg.c: Ditto. * modulo-sched.c: Ditto. * optabs.c: Ditto. * postreload.c: Ditto. * print-rtl.c: Ditto. * recog.c: Ditto. * reginfo.c: Ditto. * regmove.c: Ditto. * reload1.c: Ditto. * reload.c: Ditto. * reorg.c: Ditto. * rtlanal.c: Ditto. * rtl.c: Ditto. * sched-vis.c: Ditto. * sdbout.c: Ditto. * sel-sched-ir.c: Ditto. * simplify-rtx.c: Ditto. * targhooks.c: Ditto. * var-tracking.c: Ditto. * vmsdbgout.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 3488382df6c..7d9faf2c920 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1018,9 +1018,9 @@ find_base_value (rtx src)
/* Guess which operand is the base address:
If either operand is a symbol, then it is the base. If
either operand is a CONST_INT, then the other is the base. */
- if (GET_CODE (src_1) == CONST_INT || CONSTANT_P (src_0))
+ if (CONST_INT_P (src_1) || CONSTANT_P (src_0))
return find_base_value (src_0);
- else if (GET_CODE (src_0) == CONST_INT || CONSTANT_P (src_1))
+ else if (CONST_INT_P (src_0) || CONSTANT_P (src_1))
return find_base_value (src_1);
return 0;
@@ -1034,7 +1034,7 @@ find_base_value (rtx src)
case AND:
/* If the second operand is constant set the base
address to the first operand. */
- if (GET_CODE (XEXP (src, 1)) == CONST_INT && INTVAL (XEXP (src, 1)) != 0)
+ if (CONST_INT_P (XEXP (src, 1)) && INTVAL (XEXP (src, 1)) != 0)
return find_base_value (XEXP (src, 0));
return 0;
@@ -1176,7 +1176,7 @@ record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
break;
}
case AND:
- if (XEXP (src, 0) != dest || GET_CODE (XEXP (src, 1)) != CONST_INT)
+ if (XEXP (src, 0) != dest || !CONST_INT_P (XEXP (src, 1)))
new_reg_base_value[regno] = 0;
break;
default:
@@ -1269,9 +1269,9 @@ canon_rtx (rtx x)
if (x0 != XEXP (x, 0) || x1 != XEXP (x, 1))
{
- if (GET_CODE (x0) == CONST_INT)
+ if (CONST_INT_P (x0))
return plus_constant (x1, INTVAL (x0));
- else if (GET_CODE (x1) == CONST_INT)
+ else if (CONST_INT_P (x1))
return plus_constant (x0, INTVAL (x1));
return gen_rtx_PLUS (GET_MODE (x), x0, x1);
}
@@ -1553,7 +1553,7 @@ find_base_term (rtx x)
}
case AND:
- if (GET_CODE (XEXP (x, 1)) == CONST_INT && INTVAL (XEXP (x, 1)) != 0)
+ if (CONST_INT_P (XEXP (x, 1)) && INTVAL (XEXP (x, 1)) != 0)
return find_base_term (XEXP (x, 0));
return 0;
@@ -1616,11 +1616,11 @@ base_alias_check (rtx x, rtx y, enum machine_mode x_mode,
if (GET_CODE (x) == AND && GET_CODE (y) == AND)
return 1;
if (GET_CODE (x) == AND
- && (GET_CODE (XEXP (x, 1)) != CONST_INT
+ && (!CONST_INT_P (XEXP (x, 1))
|| (int) GET_MODE_UNIT_SIZE (y_mode) < -INTVAL (XEXP (x, 1))))
return 1;
if (GET_CODE (y) == AND
- && (GET_CODE (XEXP (y, 1)) != CONST_INT
+ && (!CONST_INT_P (XEXP (y, 1))
|| (int) GET_MODE_UNIT_SIZE (x_mode) < -INTVAL (XEXP (y, 1))))
return 1;
@@ -1781,21 +1781,21 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
return memrefs_conflict_p (xsize, x0, ysize, y0, c);
if (rtx_equal_for_memref_p (x0, y0))
return memrefs_conflict_p (xsize, x1, ysize, y1, c);
- if (GET_CODE (x1) == CONST_INT)
+ if (CONST_INT_P (x1))
{
- if (GET_CODE (y1) == CONST_INT)
+ if (CONST_INT_P (y1))
return memrefs_conflict_p (xsize, x0, ysize, y0,
c - INTVAL (x1) + INTVAL (y1));
else
return memrefs_conflict_p (xsize, x0, ysize, y,
c - INTVAL (x1));
}
- else if (GET_CODE (y1) == CONST_INT)
+ else if (CONST_INT_P (y1))
return memrefs_conflict_p (xsize, x, ysize, y0, c + INTVAL (y1));
return 1;
}
- else if (GET_CODE (x1) == CONST_INT)
+ else if (CONST_INT_P (x1))
return memrefs_conflict_p (xsize, x0, ysize, y, c - INTVAL (x1));
}
else if (GET_CODE (y) == PLUS)
@@ -1805,7 +1805,7 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
rtx y0 = XEXP (y, 0);
rtx y1 = XEXP (y, 1);
- if (GET_CODE (y1) == CONST_INT)
+ if (CONST_INT_P (y1))
return memrefs_conflict_p (xsize, x, ysize, y0, c + INTVAL (y1));
else
return 1;
@@ -1831,7 +1831,7 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
|| (c >= 0 && xsize > c) || (c < 0 && ysize+c > 0));
/* Can't properly adjust our sizes. */
- if (GET_CODE (x1) != CONST_INT)
+ if (!CONST_INT_P (x1))
return 1;
xsize /= INTVAL (x1);
ysize /= INTVAL (x1);
@@ -1847,13 +1847,13 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
as an access with indeterminate size. Assume that references
besides AND are aligned, so if the size of the other reference is
at least as large as the alignment, assume no other overlap. */
- if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT)
+ if (GET_CODE (x) == AND && CONST_INT_P (XEXP (x, 1)))
{
if (GET_CODE (y) == AND || ysize < -INTVAL (XEXP (x, 1)))
xsize = -1;
return memrefs_conflict_p (xsize, canon_rtx (XEXP (x, 0)), ysize, y, c);
}
- if (GET_CODE (y) == AND && GET_CODE (XEXP (y, 1)) == CONST_INT)
+ if (GET_CODE (y) == AND && CONST_INT_P (XEXP (y, 1)))
{
/* ??? If we are indexing far enough into the array/structure, we
may yet be able to determine that we can not overlap. But we
@@ -1866,7 +1866,7 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
if (CONSTANT_P (x))
{
- if (GET_CODE (x) == CONST_INT && GET_CODE (y) == CONST_INT)
+ if (CONST_INT_P (x) && CONST_INT_P (y))
{
c += (INTVAL (y) - INTVAL (x));
return (xsize <= 0 || ysize <= 0
@@ -2169,11 +2169,11 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y)
we can avoid overlap is if we can deduce that they are nonoverlapping
pieces of that decl, which is very rare. */
basex = MEM_P (rtlx) ? XEXP (rtlx, 0) : rtlx;
- if (GET_CODE (basex) == PLUS && GET_CODE (XEXP (basex, 1)) == CONST_INT)
+ if (GET_CODE (basex) == PLUS && CONST_INT_P (XEXP (basex, 1)))
offsetx = INTVAL (XEXP (basex, 1)), basex = XEXP (basex, 0);
basey = MEM_P (rtly) ? XEXP (rtly, 0) : rtly;
- if (GET_CODE (basey) == PLUS && GET_CODE (XEXP (basey, 1)) == CONST_INT)
+ if (GET_CODE (basey) == PLUS && CONST_INT_P (XEXP (basey, 1)))
offsety = INTVAL (XEXP (basey, 1)), basey = XEXP (basey, 0);
/* If the bases are different, we know they do not overlap if both
@@ -2627,7 +2627,7 @@ init_alias_analysis (void)
&& GET_CODE (src) == PLUS
&& REG_P (XEXP (src, 0))
&& (t = get_reg_known_value (REGNO (XEXP (src, 0))))
- && GET_CODE (XEXP (src, 1)) == CONST_INT)
+ && CONST_INT_P (XEXP (src, 1)))
{
t = plus_constant (t, INTVAL (XEXP (src, 1)));
set_reg_known_value (regno, t);