diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-28 15:41:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-28 15:41:40 +0000 |
commit | 75e2bd53c53c49b424592154a4b7878f44877db4 (patch) | |
tree | 32bd7ab15b48ee6c7209da64451293a7fcd591a9 /gcc/regmove.c | |
parent | ac0749c76369bd604187bb680268cc07995ba246 (diff) | |
download | gcc-75e2bd53c53c49b424592154a4b7878f44877db4.tar.gz |
* regmove.c (struct csa_memlist): Make mem field rtx *.
(record_one_stack_ref): Accept rtx * instead of rtx as parameter.
(try_apply_stack_adjustment): Replace whole MEM rtx.
(combine_stack_adjustments_for_block): Update calls
to record_one_stack_ref.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32782 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r-- | gcc/regmove.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c index 932e8503fce..3b4a7e660e0 100644 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -2088,7 +2088,7 @@ stable_and_no_regs_but_for_p (x, src, dst) struct csa_memlist { HOST_WIDE_INT sp_offset; - rtx insn, mem; + rtx insn, *mem; struct csa_memlist *next; }; @@ -2096,7 +2096,7 @@ static int stack_memref_p PARAMS ((rtx)); static rtx single_set_for_csa PARAMS ((rtx)); static void free_csa_memlist PARAMS ((struct csa_memlist *)); static struct csa_memlist *record_one_stack_memref - PARAMS ((rtx, rtx, struct csa_memlist *)); + PARAMS ((rtx, rtx *, struct csa_memlist *)); static int try_apply_stack_adjustment PARAMS ((rtx, struct csa_memlist *, HOST_WIDE_INT, HOST_WIDE_INT)); static void combine_stack_adjustments_for_block PARAMS ((basic_block)); @@ -2188,17 +2188,17 @@ free_csa_memlist (memlist) static struct csa_memlist * record_one_stack_memref (insn, mem, next_memlist) - rtx insn, mem; + rtx insn, *mem; struct csa_memlist *next_memlist; { struct csa_memlist *ml; ml = (struct csa_memlist *) xmalloc (sizeof (*ml)); - if (XEXP (mem, 0) == stack_pointer_rtx) + if (XEXP (*mem, 0) == stack_pointer_rtx) ml->sp_offset = 0; else - ml->sp_offset = INTVAL (XEXP (XEXP (mem, 0), 1)); + ml->sp_offset = INTVAL (XEXP (XEXP (*mem, 0), 1)); ml->insn = insn; ml->mem = mem; @@ -2241,8 +2241,9 @@ try_apply_stack_adjustment (insn, memlist, new_adjust, delta) return 0; } - validate_change (ml->insn, &XEXP (ml->mem, 0), - plus_constant (stack_pointer_rtx, c), 1); + validate_change (ml->insn, ml->mem, + gen_rtx_MEM (GET_MODE (*ml->mem), + plus_constant (stack_pointer_rtx, c)), 1); } if (apply_change_group ()) @@ -2340,7 +2341,7 @@ combine_stack_adjustments_for_block (bb) if (last_sp_set && stack_memref_p (src) && ! reg_mentioned_p (stack_pointer_rtx, dest)) { - memlist = record_one_stack_memref (insn, src, memlist); + memlist = record_one_stack_memref (insn, &SET_SRC (set), memlist); goto processed; } @@ -2348,7 +2349,8 @@ combine_stack_adjustments_for_block (bb) if (last_sp_set && stack_memref_p (dest) && ! reg_mentioned_p (stack_pointer_rtx, src)) { - memlist = record_one_stack_memref (insn, dest, memlist); + memlist = record_one_stack_memref (insn, &SET_DEST (set), + memlist); goto processed; } |