diff options
author | John Wehle <john@feith.com> | 2000-08-18 02:41:58 +0000 |
---|---|---|
committer | John Wehle <wehle@gcc.gnu.org> | 2000-08-18 02:41:58 +0000 |
commit | 4998268292c6b27cdd51e180ac0780f1dfaa0b08 (patch) | |
tree | af730819a32f206d6a1042985debacae42c99c19 /gcc | |
parent | 889e5964f263e0aa95663bebb10c176ee79d9402 (diff) | |
download | gcc-4998268292c6b27cdd51e180ac0780f1dfaa0b08.zip gcc-4998268292c6b27cdd51e180ac0780f1dfaa0b08.tar.gz gcc-4998268292c6b27cdd51e180ac0780f1dfaa0b08.tar.bz2 |
alias.c (true_dependence, [...]): A read involving a label_ref or the constant pool doesn't create a dependency.
* alias.c (true_dependence, write_dependence_p): A read
involving a label_ref or the constant pool doesn't create
a dependency.
* rtl.h (unchanging): Improve documentation.
From-SVN: r35771
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/alias.c | 22 | ||||
-rw-r--r-- | gcc/rtl.h | 7 |
3 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6639d1..e7705dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +Thu Aug 17 22:40:05 EDT 2000 John Wehle (john@feith.com) + + * alias.c (true_dependence, write_dependence_p): A read + involving a label_ref or the constant pool doesn't create + a dependency. + + * rtl.h (unchanging): Improve documentation. + 2000-08-17 Rodney Brown <RodneyBrown@mynd.com> * cse.c (insert_regs): Remove unused `regno'. diff --git a/gcc/alias.c b/gcc/alias.c index f879da3..ae86638 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1566,6 +1566,7 @@ true_dependence (mem, mem_mode, x, varies) int (*varies) PARAMS ((rtx)); { register rtx x_addr, mem_addr; + rtx base; if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) return 1; @@ -1583,6 +1584,12 @@ true_dependence (mem, mem_mode, x, varies) if (RTX_UNCHANGING_P (x) && ! RTX_UNCHANGING_P (mem)) return 0; + base = find_base_term (x); + if (base && (GET_CODE (base) == LABEL_REF + || (GET_CODE (base) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (base)))) + return 0; + if (mem_mode == VOIDmode) mem_mode = GET_MODE (mem); @@ -1627,6 +1634,7 @@ write_dependence_p (mem, x, writep) { rtx x_addr, mem_addr; rtx fixed_scalar; + rtx base; if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) return 1; @@ -1637,8 +1645,18 @@ write_dependence_p (mem, x, writep) /* If MEM is an unchanging read, then it can't possibly conflict with the store to X, because there is at most one store to MEM, and it must have occurred somewhere before MEM. */ - if (!writep && RTX_UNCHANGING_P (mem)) - return 0; + if (! writep) + { + if (RTX_UNCHANGING_P (mem)) + return 0; + + base = find_base_term (mem); + if (base && (GET_CODE (base) == LABEL_REF + || (GET_CODE (base) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (base)))) + return 0; + } + x_addr = get_addr (XEXP (x, 0)); mem_addr = get_addr (XEXP (mem, 0)); @@ -116,9 +116,10 @@ typedef struct rtx_def /* 1 in an INSN if it can call another function. LINK_COST_FREE in an INSN_LIST. */ unsigned int call : 1; - /* 1 in a MEM or REG if value of this expression will never change - during the current function, even though it is not - manifestly constant. + /* 1 in a REG if value of this expression will never change during + the current function, even though it is not manifestly constant. + 1 in a MEM if contents of memory are constant. This does not + necessarily mean that the value of this expression is constant. 1 in a SUBREG if it is from a promoted variable that is unsigned. 1 in a SYMBOL_REF if it addresses something in the per-function constants pool. |