diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-08 11:20:23 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-08 11:20:23 +0000 |
commit | c7bf7428b6105a3dda2c5a6bb77ebf6d97eb342a (patch) | |
tree | 72953eb3d0de3ae4394f101ee93b8dd54f346543 /gcc/alias.c | |
parent | 1a91686825c95e78b96ace314f8f56591c80ad34 (diff) | |
download | gcc-c7bf7428b6105a3dda2c5a6bb77ebf6d97eb342a.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61038 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 960475be0c5..ffd4991a2c6 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -119,6 +119,7 @@ static int nonlocal_referenced_p_1 PARAMS ((rtx *, void *)); static int nonlocal_referenced_p PARAMS ((rtx)); static int nonlocal_set_p_1 PARAMS ((rtx *, void *)); static int nonlocal_set_p PARAMS ((rtx)); +static void memory_modified_1 PARAMS ((rtx, rtx, void *)); /* Set up all info needed to perform alias analysis on memory references. */ @@ -2703,6 +2704,35 @@ init_alias_once () alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0); } +/* Set MEMORY_MODIFIED when X modifies DATA (that is assumed + to be memory reference. */ +static bool memory_modified; +static void +memory_modified_1 (x, pat, data) + rtx x, pat ATTRIBUTE_UNUSED; + void *data; +{ + if (GET_CODE (x) == MEM) + { + if (anti_dependence (x, (rtx)data) || output_dependence (x, (rtx)data)) + memory_modified = true; + } +} + + +/* Return true when INSN possibly modify memory contents of MEM + (ie address can be modified). */ +bool +memory_modified_in_insn_p (mem, insn) + rtx mem, insn; +{ + if (!INSN_P (insn)) + return false; + memory_modified = false; + note_stores (PATTERN (insn), memory_modified_1, mem); + return memory_modified; +} + /* Initialize the aliasing machinery. Initialize the REG_KNOWN_VALUE array. */ |