Commit 49982682 by John Wehle Committed by John Wehle

alias.c (true_dependence, [...]): A read involving a label_ref or the constant…

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
parent 889e5964
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'.
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment