diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 13:10:52 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-31 13:10:52 +0000 |
commit | 777d46780c3e30ecc800f0a613d65562caea9abf (patch) | |
tree | effc283a6f03409b0c3e0e3e20c70c5ab627776d /gcc/dse.c | |
parent | 4c65aab8b90fdd8ef4e2b77e33c7a821297f60e6 (diff) | |
download | gcc-777d46780c3e30ecc800f0a613d65562caea9abf.tar.gz |
2008-07-31 Basile Starynkevitch <basile@starynkevitch.net>
the yesterday's version failed to compile any simple C file. Fixed!
MELT branch merged with trunk r138355
* gcc/passes.c: better order for basilys related passes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@138403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/gcc/dse.c b/gcc/dse.c index 4d5120160fa..99233266377 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -783,10 +783,9 @@ replace_inc_dec (rtx *r, void *d) { rtx r1 = XEXP (x, 0); rtx c = gen_int_mode (Pmode, data->size); - add_insn_before (data->insn, - gen_rtx_SET (Pmode, r1, - gen_rtx_PLUS (Pmode, r1, c)), - NULL); + emit_insn_before (gen_rtx_SET (Pmode, r1, + gen_rtx_PLUS (Pmode, r1, c)), + data->insn); return -1; } @@ -795,10 +794,9 @@ replace_inc_dec (rtx *r, void *d) { rtx r1 = XEXP (x, 0); rtx c = gen_int_mode (Pmode, -data->size); - add_insn_before (data->insn, - gen_rtx_SET (Pmode, r1, - gen_rtx_PLUS (Pmode, r1, c)), - NULL); + emit_insn_before (gen_rtx_SET (Pmode, r1, + gen_rtx_PLUS (Pmode, r1, c)), + data->insn); return -1; } @@ -809,8 +807,7 @@ replace_inc_dec (rtx *r, void *d) insn that contained it. */ rtx add = XEXP (x, 0); rtx r1 = XEXP (add, 0); - add_insn_before (data->insn, - gen_rtx_SET (Pmode, r1, add), NULL); + emit_insn_before (gen_rtx_SET (Pmode, r1, add), data->insn); return -1; } @@ -827,12 +824,12 @@ static int replace_inc_dec_mem (rtx *r, void *d) { rtx x = *r; - if (GET_CODE (x) == MEM) + if (x != NULL_RTX && MEM_P (x)) { struct insn_size data; data.size = GET_MODE_SIZE (GET_MODE (x)); - data.insn = (rtx)d; + data.insn = (rtx) d; for_each_rtx (&XEXP (x, 0), replace_inc_dec, &data); |