diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2007-09-19 02:58:24 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2007-09-19 02:58:24 +0000 |
commit | aa317c97cf2fc0170203d7667c8cd41798793e1c (patch) | |
tree | 3d0567ca053f25a45c1c2c4020d91f2c5cace55d /gcc/rtlanal.c | |
parent | 19bfb9361e2db9c9e4a57043d9bed3f0e7df2ccb (diff) | |
download | gcc-aa317c97cf2fc0170203d7667c8cd41798793e1c.tar.gz |
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
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 66 |
1 files changed, 29 insertions, 37 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index a47c36f0b09..da1ceb4adbd 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -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; -void -const_note_stores (const_rtx x, void (*fun) (const_rtx, const_rtx, const void *), const void *data) -{ - NOTE_STORES_BODY(const_note_stores); -} + if (GET_CODE (x) == COND_EXEC) + x = COND_EXEC_CODE (x); -#undef NOTE_STORES_BODY + 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); +} /* 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 |