diff options
author | Jan Hubicka <jh@suse.cz> | 2003-01-08 12:20:23 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-01-08 11:20:23 +0000 |
commit | 7b52eedeedb2247bee0018a2d1a81f00ceb350c0 (patch) | |
tree | 72953eb3d0de3ae4394f101ee93b8dd54f346543 /gcc/rtlanal.c | |
parent | 67d96a1661226e6f32b9e7512fe7d01befd579ee (diff) | |
download | gcc-7b52eedeedb2247bee0018a2d1a81f00ceb350c0.zip gcc-7b52eedeedb2247bee0018a2d1a81f00ceb350c0.tar.gz gcc-7b52eedeedb2247bee0018a2d1a81f00ceb350c0.tar.bz2 |
i386.md (adddi3_carry_rex64, [...]): Name pattern.
* i386.md (adddi3_carry_rex64, subdi3_carry_rex64): Name pattern.
(addhi3_carry, addqi3_carry, subhi3_carry, subqi3_carry): New patterns.
(add??cc): New expanders.
* i386.c (expand_int_addcc): New function.
* i386-protos.h (expand_int_addcc): Declare.
* alias.c (memory_modified_1): New static function.
(memory_modified): New static varaible.
(memory_modified_in_insn_p): New global function.
* rtl.h (memory_modified_in_insn_p): Declare.
* rtlanal.c (modified_between_p, modified_in_p): Be smart about memory
references.
* expr.h (emit_conditional_add): Declare.
From-SVN: r61038
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 2aad022..63d7feb 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1037,7 +1037,7 @@ regs_set_between_p (x, start, end) /* Similar to reg_set_between_p, but check all registers in X. Return 0 only if none of them are modified between START and END. Return 1 if - X contains a MEM; this routine does not perform any memory aliasing. */ + X contains a MEM; this routine does usememory aliasing. */ int modified_between_p (x, start, end) @@ -1047,6 +1047,10 @@ modified_between_p (x, start, end) enum rtx_code code = GET_CODE (x); const char *fmt; int i, j; + rtx insn; + + if (start == end) + return 0; switch (code) { @@ -1063,10 +1067,14 @@ modified_between_p (x, start, end) return 1; case MEM: - /* If the memory is not constant, assume it is modified. If it is - constant, we still have to check the address. */ - if (! RTX_UNCHANGING_P (x)) + if (RTX_UNCHANGING_P (x)) + return 0; + if (modified_between_p (XEXP (x, 0), start, end)) return 1; + for (insn = NEXT_INSN (start); insn != end; insn = NEXT_INSN (insn)) + if (memory_modified_in_insn_p (x, insn)) + return 1; + return 0; break; case REG: @@ -1093,7 +1101,7 @@ modified_between_p (x, start, end) /* Similar to reg_set_p, but check all registers in X. Return 0 only if none of them are modified in INSN. Return 1 if X contains a MEM; this routine - does not perform any memory aliasing. */ + does use memory aliasing. */ int modified_in_p (x, insn) @@ -1119,10 +1127,13 @@ modified_in_p (x, insn) return 1; case MEM: - /* If the memory is not constant, assume it is modified. If it is - constant, we still have to check the address. */ - if (! RTX_UNCHANGING_P (x)) + if (RTX_UNCHANGING_P (x)) + return 0; + if (modified_in_p (XEXP (x, 0), insn)) return 1; + if (memory_modified_in_insn_p (x, insn)) + return 1; + return 0; break; case REG: |