diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-01-18 13:14:34 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-01-18 08:14:34 -0500 |
commit | 90d036a050b8443c93a32fc31480e7afefad088f (patch) | |
tree | a7cc3b76930fd2143f70721950dcf585e13f0528 /gcc/rtlanal.c | |
parent | 8eeb855e2b6b8cc1aea7df5dcd0e0856897668a2 (diff) | |
download | gcc-90d036a050b8443c93a32fc31480e7afefad088f.zip gcc-90d036a050b8443c93a32fc31480e7afefad088f.tar.gz gcc-90d036a050b8443c93a32fc31480e7afefad088f.tar.bz2 |
flow.c (mark_set_1, [...]): Now case; rework to allow entry to be EXPR_LIST.
* flow.c (mark_set_1, case PARALLEL): Now case; rework to allow
entry to be EXPR_LIST.
* rtlanal.c (reg_overlap_mentioned_p): Allow PARALLEL in SET to
be an EXPR_LIST (but not null, which other code doesn't allow).
(note_stores): Properly handle PARALLEL in SET.
Recursively call for top-level PARALLEL.
* sched-deps.c (sched_analyze_1): Handle EXPR_LIST in PARALLEL in SET.
* sched-rgn.c (check_live_1, update_live_1): Likewise.
From-SVN: r39118
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 84 |
1 files changed, 34 insertions, 50 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 8bdd23c..eec8b6a 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1182,20 +1182,21 @@ reg_overlap_mentioned_p (x, in) case PARALLEL: { - int i, n; - - /* Check for a NULL entry, used to indicate that the parameter goes - both on the stack and in registers. */ - if (XEXP (XVECEXP (x, 0, 0), 0)) - i = 0; - else - i = 1; + int i; /* If any register in here refers to it we return true. */ - for (n = XVECLEN (x, 0); i < n; ++i) - if (reg_overlap_mentioned_p (XEXP (XVECEXP (x, 0, i), 0), in)) - return 1; - return 0; + for (i = XVECLEN (x, 0); i >= 0; i--) + { + rtx reg = XVECEXP (x, 0, i); + + if (GET_CODE (reg) == EXPR_LIST) + reg = XEXP (reg, 0); + + if (reg_overlap_mentioned_p (reg, in)) + return 1; + return 0; + + } } default: @@ -1270,11 +1271,15 @@ note_stores (x, fun, data) void (*fun) PARAMS ((rtx, rtx, void *)); void *data; { + int i; + if (GET_CODE (x) == COND_EXEC) x = COND_EXEC_CODE (x); + if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER) { register rtx dest = SET_DEST (x); + while ((GET_CODE (dest) == SUBREG && (GET_CODE (SUBREG_REG (dest)) != REG || REGNO (SUBREG_REG (dest)) >= FIRST_PSEUDO_REGISTER)) @@ -1283,48 +1288,27 @@ note_stores (x, fun, data) || GET_CODE (dest) == STRICT_LOW_PART) dest = XEXP (dest, 0); - if (GET_CODE (dest) == PARALLEL - && GET_MODE (dest) == BLKmode) - { - register int i; - for (i = XVECLEN (dest, 0) - 1; i >= 0; i--) - (*fun) (SET_DEST (XVECEXP (dest, 0, i)), x, data); - } + /* If we have a PARALLEL, SET_DEST is a list of registers or + EXPR_LIST expressions, each of whose first operand is a register. + We can't know what precisely is being set in these cases, so + make up a CLOBBER to pass to the function. */ + if (GET_CODE (dest) == PARALLEL && GET_MODE (dest) == BLKmode) + for (i = XVECLEN (dest, 0) - 1; i >= 0; i--) + { + rtx reg = XVECEXP (dest, 0, i); + + if (GET_CODE (reg) == EXPR_LIST) + reg = XEXP (reg, 0); + + (*fun) (reg, gen_rtx_CLOBBER (VOIDmode, reg), data); + } else (*fun) (dest, x, data); } - else if (GET_CODE (x) == PARALLEL) - { - register int i; - for (i = XVECLEN (x, 0) - 1; i >= 0; i--) - { - register rtx y = XVECEXP (x, 0, i); - if (GET_CODE (y) == COND_EXEC) - y = COND_EXEC_CODE (y); - if (GET_CODE (y) == SET || GET_CODE (y) == CLOBBER) - { - register rtx dest = SET_DEST (y); - while ((GET_CODE (dest) == SUBREG - && (GET_CODE (SUBREG_REG (dest)) != REG - || (REGNO (SUBREG_REG (dest)) - >= FIRST_PSEUDO_REGISTER))) - || GET_CODE (dest) == ZERO_EXTRACT - || GET_CODE (dest) == SIGN_EXTRACT - || GET_CODE (dest) == STRICT_LOW_PART) - dest = XEXP (dest, 0); - if (GET_CODE (dest) == PARALLEL - && GET_MODE (dest) == BLKmode) - { - register int i; - for (i = XVECLEN (dest, 0) - 1; i >= 0; i--) - (*fun) (SET_DEST (XVECEXP (dest, 0, i)), y, data); - } - else - (*fun) (dest, y, data); - } - } - } + else if (GET_CODE (x) == PARALLEL) + for (i = XVECLEN (x, 0) - 1; i >= 0; i--) + note_stores (XVECEXP (x, 0, i), fun, data); } /* Return nonzero if X's old contents don't survive after INSN. |