alias.c (memory_modified_1): Deconstify.
* alias.c (memory_modified_1): Deconstify. (memory_modified_in_insn_p): Don't use const_note_stores. * rtl.h (const_note_stores): Delete. * rtlanal.c (const_note_stores): Likewise. From-SVN: r128596
This commit is contained in:
parent
19bfb9361e
commit
aa317c97cf
|
@ -1,3 +1,10 @@
|
|||
2007-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* alias.c (memory_modified_1): Deconstify.
|
||||
(memory_modified_in_insn_p): Don't use const_note_stores.
|
||||
* rtl.h (const_note_stores): Delete.
|
||||
* rtlanal.c (const_note_stores): Likewise.
|
||||
|
||||
2007-09-18 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||
|
||||
* dse.c (find_shift_sequence): Temporarily revert to forbidding
|
||||
|
|
|
@ -167,7 +167,7 @@ static rtx adjust_offset_for_component_ref (tree, rtx);
|
|||
static int nonoverlapping_memrefs_p (const_rtx, const_rtx);
|
||||
static int write_dependence_p (const_rtx, const_rtx, int);
|
||||
|
||||
static void memory_modified_1 (const_rtx, const_rtx, const void *);
|
||||
static void memory_modified_1 (rtx, const_rtx, void *);
|
||||
static void record_alias_subset (alias_set_type, alias_set_type);
|
||||
|
||||
/* Set up all info needed to perform alias analysis on memory references. */
|
||||
|
@ -2356,7 +2356,7 @@ init_alias_target (void)
|
|||
to be memory reference. */
|
||||
static bool memory_modified;
|
||||
static void
|
||||
memory_modified_1 (const_rtx x, const_rtx pat ATTRIBUTE_UNUSED, const void *data)
|
||||
memory_modified_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
|
||||
{
|
||||
if (MEM_P (x))
|
||||
{
|
||||
|
@ -2374,7 +2374,7 @@ memory_modified_in_insn_p (const_rtx mem, const_rtx insn)
|
|||
if (!INSN_P (insn))
|
||||
return false;
|
||||
memory_modified = false;
|
||||
const_note_stores (PATTERN (insn), memory_modified_1, mem);
|
||||
note_stores (PATTERN (insn), memory_modified_1, CONST_CAST_RTX(mem));
|
||||
return memory_modified;
|
||||
}
|
||||
|
||||
|
|
|
@ -1723,7 +1723,6 @@ extern int refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *);
|
|||
extern int reg_overlap_mentioned_p (const_rtx, const_rtx);
|
||||
extern const_rtx set_of (const_rtx, const_rtx);
|
||||
extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *);
|
||||
extern void const_note_stores (const_rtx, void (*) (const_rtx, const_rtx, const void *), const void *);
|
||||
extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
|
||||
extern int dead_or_set_p (const_rtx, const_rtx);
|
||||
extern int dead_or_set_regno_p (const_rtx, unsigned int);
|
||||
|
|
|
@ -1412,49 +1412,41 @@ reg_overlap_mentioned_p (const_rtx x, const_rtx in)
|
|||
If the item being stored in or clobbered is a SUBREG of a hard register,
|
||||
the SUBREG will be passed. */
|
||||
|
||||
#define NOTE_STORES_BODY(NOTE_STORES_FN) do { \
|
||||
int i; \
|
||||
if (GET_CODE (x) == COND_EXEC) \
|
||||
x = COND_EXEC_CODE (x); \
|
||||
if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER) \
|
||||
{ \
|
||||
rtx dest = SET_DEST (x); \
|
||||
while ((GET_CODE (dest) == SUBREG \
|
||||
&& (!REG_P (SUBREG_REG (dest)) \
|
||||
|| REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER)) \
|
||||
|| GET_CODE (dest) == ZERO_EXTRACT \
|
||||
|| GET_CODE (dest) == STRICT_LOW_PART) \
|
||||
dest = XEXP (dest, 0); \
|
||||
/* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions, \
|
||||
each of whose first operand is a register. */ \
|
||||
if (GET_CODE (dest) == PARALLEL) \
|
||||
{ \
|
||||
for (i = XVECLEN (dest, 0) - 1; i >= 0; i--) \
|
||||
if (XEXP (XVECEXP (dest, 0, i), 0) != 0) \
|
||||
(*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data); \
|
||||
} \
|
||||
else \
|
||||
(*fun) (dest, x, data); \
|
||||
} \
|
||||
else if (GET_CODE (x) == PARALLEL) \
|
||||
for (i = XVECLEN (x, 0) - 1; i >= 0; i--) \
|
||||
NOTE_STORES_FN (XVECEXP (x, 0, i), fun, data); \
|
||||
} while (0)
|
||||
|
||||
void
|
||||
note_stores (const_rtx x, void (*fun) (rtx, const_rtx, void *), void *data)
|
||||
{
|
||||
NOTE_STORES_BODY(note_stores);
|
||||
int i;
|
||||
|
||||
if (GET_CODE (x) == COND_EXEC)
|
||||
x = COND_EXEC_CODE (x);
|
||||
|
||||
if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
|
||||
{
|
||||
rtx dest = SET_DEST (x);
|
||||
|
||||
while ((GET_CODE (dest) == SUBREG
|
||||
&& (!REG_P (SUBREG_REG (dest))
|
||||
|| REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER))
|
||||
|| GET_CODE (dest) == ZERO_EXTRACT
|
||||
|| GET_CODE (dest) == STRICT_LOW_PART)
|
||||
dest = XEXP (dest, 0);
|
||||
|
||||
/* If we have a PARALLEL, SET_DEST is a list of EXPR_LIST expressions,
|
||||
each of whose first operand is a register. */
|
||||
if (GET_CODE (dest) == PARALLEL)
|
||||
{
|
||||
for (i = XVECLEN (dest, 0) - 1; i >= 0; i--)
|
||||
if (XEXP (XVECEXP (dest, 0, i), 0) != 0)
|
||||
(*fun) (XEXP (XVECEXP (dest, 0, i), 0), x, data);
|
||||
}
|
||||
else
|
||||
(*fun) (dest, x, data);
|
||||
}
|
||||
|
||||
else if (GET_CODE (x) == PARALLEL)
|
||||
for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
|
||||
note_stores (XVECEXP (x, 0, i), fun, data);
|
||||
}
|
||||
|
||||
void
|
||||
const_note_stores (const_rtx x, void (*fun) (const_rtx, const_rtx, const void *), const void *data)
|
||||
{
|
||||
NOTE_STORES_BODY(const_note_stores);
|
||||
}
|
||||
|
||||
#undef NOTE_STORES_BODY
|
||||
|
||||
|
||||
/* Like notes_stores, but call FUN for each expression that is being
|
||||
referenced in PBODY, a pointer to the PATTERN of an insn. We only call
|
||||
|
|
Loading…
Reference in New Issue