aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-09-17 15:33:30 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-09-17 11:33:30 -0400
commitec56965643d368ba8eae4ce34af4439aa9dd7b31 (patch)
treea088015564b8aca06f881097758706390ad3463f /gcc/alias.c
parent23cb1766e03f75f32a723f63c7c68287d6822fff (diff)
downloadgcc-ec56965643d368ba8eae4ce34af4439aa9dd7b31.zip
gcc-ec56965643d368ba8eae4ce34af4439aa9dd7b31.tar.gz
gcc-ec56965643d368ba8eae4ce34af4439aa9dd7b31.tar.bz2
alias.c (true_dependence): Allow non-unchanging read to conflict with unchanging write.
* alias.c (true_dependence): Allow non-unchanging read to conflict with unchanging write. From-SVN: r36476
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index be46281..65b053f 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1600,10 +1600,13 @@ true_dependence (mem, mem_mode, x, varies)
A non-unchanging read can conflict with a non-unchanging write.
An unchanging read can conflict with an unchanging write since
there may be a single store to this address to initialize it.
+ Note that an unchanging store can conflict with a non-unchanging read
+ since we have to make conservative assumptions when we have a
+ record with readonly fields and we are copying the whole thing.
Just fall through to the code below to resolve potential conflicts.
This won't handle all cases optimally, but the possible performance
loss should be negligible. */
- if (RTX_UNCHANGING_P (x) != RTX_UNCHANGING_P (mem))
+ if (RTX_UNCHANGING_P (x) && ! RTX_UNCHANGING_P (mem))
return 0;
if (mem_mode == VOIDmode)