alias.c (find_base_term, get_addr): Do not dereference NULL pointer when all VALUE's locations has been invalidated.
* alias.c (find_base_term, get_addr): Do not dereference NULL pointer when all VALUE's locations has been invalidated. (rtx_equal_for_memref_p): Simplify checking of VALUEs. From-SVN: r77201
This commit is contained in:
parent
1c02f6f2d2
commit
40e02b4a76
|
@ -1,3 +1,9 @@
|
||||||
|
2004-02-04 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
|
* alias.c (find_base_term, get_addr): Do not dereference NULL
|
||||||
|
pointer when all VALUE's locations has been invalidated.
|
||||||
|
(rtx_equal_for_memref_p): Simplify checking of VALUEs.
|
||||||
|
|
||||||
2004-02-03 Wolfgang Bangerth <bangerth@dealii.org>
|
2004-02-03 Wolfgang Bangerth <bangerth@dealii.org>
|
||||||
|
|
||||||
* doc/invoke.texi (x86 options): Fix spelling/wording.
|
* doc/invoke.texi (x86 options): Fix spelling/wording.
|
||||||
|
|
|
@ -1139,9 +1139,6 @@ rtx_equal_for_memref_p (rtx x, rtx y)
|
||||||
/* Some RTL can be compared without a recursive examination. */
|
/* Some RTL can be compared without a recursive examination. */
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case VALUE:
|
|
||||||
return CSELIB_VAL_PTR (x) == CSELIB_VAL_PTR (y);
|
|
||||||
|
|
||||||
case REG:
|
case REG:
|
||||||
return REGNO (x) == REGNO (y);
|
return REGNO (x) == REGNO (y);
|
||||||
|
|
||||||
|
@ -1151,6 +1148,7 @@ rtx_equal_for_memref_p (rtx x, rtx y)
|
||||||
case SYMBOL_REF:
|
case SYMBOL_REF:
|
||||||
return XSTR (x, 0) == XSTR (y, 0);
|
return XSTR (x, 0) == XSTR (y, 0);
|
||||||
|
|
||||||
|
case VALUE:
|
||||||
case CONST_INT:
|
case CONST_INT:
|
||||||
case CONST_DOUBLE:
|
case CONST_DOUBLE:
|
||||||
/* There's no need to compare the contents of CONST_DOUBLEs or
|
/* There's no need to compare the contents of CONST_DOUBLEs or
|
||||||
|
@ -1325,6 +1323,8 @@ find_base_term (rtx x)
|
||||||
|
|
||||||
case VALUE:
|
case VALUE:
|
||||||
val = CSELIB_VAL_PTR (x);
|
val = CSELIB_VAL_PTR (x);
|
||||||
|
if (!val)
|
||||||
|
return 0;
|
||||||
for (l = val->locs; l; l = l->next)
|
for (l = val->locs; l; l = l->next)
|
||||||
if ((x = find_base_term (l->loc)) != 0)
|
if ((x = find_base_term (l->loc)) != 0)
|
||||||
return x;
|
return x;
|
||||||
|
@ -1502,6 +1502,8 @@ get_addr (rtx x)
|
||||||
if (GET_CODE (x) != VALUE)
|
if (GET_CODE (x) != VALUE)
|
||||||
return x;
|
return x;
|
||||||
v = CSELIB_VAL_PTR (x);
|
v = CSELIB_VAL_PTR (x);
|
||||||
|
if (v)
|
||||||
|
{
|
||||||
for (l = v->locs; l; l = l->next)
|
for (l = v->locs; l; l = l->next)
|
||||||
if (CONSTANT_P (l->loc))
|
if (CONSTANT_P (l->loc))
|
||||||
return l->loc;
|
return l->loc;
|
||||||
|
@ -1510,6 +1512,7 @@ get_addr (rtx x)
|
||||||
return l->loc;
|
return l->loc;
|
||||||
if (v->locs)
|
if (v->locs)
|
||||||
return v->locs->loc;
|
return v->locs->loc;
|
||||||
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue