aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@act-europe.fr>2004-06-01 21:08:01 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-06-01 19:08:01 +0000
commit95c73b23dc40a6ba5a6f130d3f981aa36a7de1e5 (patch)
tree95f4ccfed08bc2c997acea68171ca1e546a8d4cc /gcc
parentc1d34f9050f4a44b52ae4b95a10a1a8d3b42061a (diff)
downloadgcc-95c73b23dc40a6ba5a6f130d3f981aa36a7de1e5.zip
gcc-95c73b23dc40a6ba5a6f130d3f981aa36a7de1e5.tar.gz
gcc-95c73b23dc40a6ba5a6f130d3f981aa36a7de1e5.tar.bz2
function.c (walk_fixup_memory_subreg): New parameter 'var'.
* function.c (walk_fixup_memory_subreg): New parameter 'var'. Call fixup_memory_subreg only if the MEM is equal to 'var'. Adjust recursive calls to self. (fixup_var_refs_insn): Pass 'var' to walk_fixup_memory_subreg. From-SVN: r82555
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/function.c22
2 files changed, 18 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4ee2ec2..372c12d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-01 Eric Botcazou <ebotcazou@act-europe.fr>
+
+ * function.c (walk_fixup_memory_subreg): New parameter 'var'.
+ Call fixup_memory_subreg only if the MEM is equal to 'var'.
+ Adjust recursive calls to self.
+ (fixup_var_refs_insn): Pass 'var' to walk_fixup_memory_subreg.
+
2004-06-01 Richard Henderson <rth@redhat.com>
Andrew Pinski <pinskia@physics.uc.edu>
diff --git a/gcc/function.c b/gcc/function.c
index c34c191..3744bf5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -241,7 +241,7 @@ static void fixup_var_refs_insn (rtx, rtx, enum machine_mode, int, int, rtx);
static void fixup_var_refs_1 (rtx, enum machine_mode, rtx *, rtx,
struct fixup_replacement **, rtx);
static rtx fixup_memory_subreg (rtx, rtx, enum machine_mode, int);
-static rtx walk_fixup_memory_subreg (rtx, rtx, enum machine_mode, int);
+static rtx walk_fixup_memory_subreg (rtx, rtx, rtx, enum machine_mode, int);
static rtx fixup_stack_1 (rtx, rtx);
static void optimize_bit_field (rtx, rtx, rtx *);
static void instantiate_decls (tree, int);
@@ -1914,7 +1914,7 @@ fixup_var_refs_insn (rtx insn, rtx var, enum machine_mode promoted_mode,
{
if (GET_CODE (note) != INSN_LIST)
XEXP (note, 0)
- = walk_fixup_memory_subreg (XEXP (note, 0), insn,
+ = walk_fixup_memory_subreg (XEXP (note, 0), insn, var,
promoted_mode, 1);
note = XEXP (note, 1);
}
@@ -2601,17 +2601,17 @@ fixup_memory_subreg (rtx x, rtx insn, enum machine_mode promoted_mode, int uncri
return result;
}
-/* Do fixup_memory_subreg on all (SUBREG (MEM ...) ...) contained in X.
+/* Do fixup_memory_subreg on all (SUBREG (VAR) ...) contained in X.
+ VAR is a MEM that used to be a pseudo register with mode PROMOTED_MODE.
Replace subexpressions of X in place.
- If X itself is a (SUBREG (MEM ...) ...), return the replacement expression.
+ If X itself is a (SUBREG (VAR) ...), return the replacement expression.
Otherwise return X, with its contents possibly altered.
- INSN, PROMOTED_MODE and UNCRITICAL are as for
- fixup_memory_subreg. */
+ INSN and UNCRITICAL are as for fixup_memory_subreg. */
static rtx
-walk_fixup_memory_subreg (rtx x, rtx insn, enum machine_mode promoted_mode,
- int uncritical)
+walk_fixup_memory_subreg (rtx x, rtx insn, rtx var,
+ enum machine_mode promoted_mode, int uncritical)
{
enum rtx_code code;
const char *fmt;
@@ -2622,7 +2622,7 @@ walk_fixup_memory_subreg (rtx x, rtx insn, enum machine_mode promoted_mode,
code = GET_CODE (x);
- if (code == SUBREG && GET_CODE (SUBREG_REG (x)) == MEM)
+ if (code == SUBREG && SUBREG_REG (x) == var)
return fixup_memory_subreg (x, insn, promoted_mode, uncritical);
/* Nothing special about this RTX; fix its operands. */
@@ -2631,14 +2631,14 @@ walk_fixup_memory_subreg (rtx x, rtx insn, enum machine_mode promoted_mode,
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
- XEXP (x, i) = walk_fixup_memory_subreg (XEXP (x, i), insn,
+ XEXP (x, i) = walk_fixup_memory_subreg (XEXP (x, i), insn, var,
promoted_mode, uncritical);
else if (fmt[i] == 'E')
{
int j;
for (j = 0; j < XVECLEN (x, i); j++)
XVECEXP (x, i, j)
- = walk_fixup_memory_subreg (XVECEXP (x, i, j), insn,
+ = walk_fixup_memory_subreg (XVECEXP (x, i, j), insn, var,
promoted_mode, uncritical);
}
}