diff options
author | Richard Henderson <rth@redhat.com> | 2012-09-04 11:16:24 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-09-04 11:16:24 -0700 |
commit | 96672a3e826a879876daf3391fbc79daede9fa82 (patch) | |
tree | c26952d4fe2c91ddbb7b057e700a75ec0c0fc84b /gcc | |
parent | 1a044f416a3866369842e0be23d317ca31151736 (diff) | |
download | gcc-96672a3e826a879876daf3391fbc79daede9fa82.zip gcc-96672a3e826a879876daf3391fbc79daede9fa82.tar.gz gcc-96672a3e826a879876daf3391fbc79daede9fa82.tar.bz2 |
* alias.c (read_dependence): Return true for ALIAS_SET_MEMORY_BARRIER.
From-SVN: r190941
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/alias.c | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc3a2ed..11bbf7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2012-09-04 Richard Henderson <rth@redhat.com> + + * alias.c (read_dependence): Return true for ALIAS_SET_MEMORY_BARRIER. + 2012-09-04 Richard Guenther <rguenther@suse.de> * tree-ssa-pre.c (value_expressions): Make it a vector of diff --git a/gcc/alias.c b/gcc/alias.c index c1d5c8a..b718207 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2177,12 +2177,18 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) storeqi_unaligned pattern. */ /* Read dependence: X is read after read in MEM takes place. There can - only be a dependence here if both reads are volatile. */ + only be a dependence here if both reads are volatile, or if either is + an explicit barrier. */ int read_dependence (const_rtx mem, const_rtx x) { - return MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem); + if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) + return true; + if (MEM_ALIAS_SET (x) == ALIAS_SET_MEMORY_BARRIER + || MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER) + return true; + return false; } /* Return true if we can determine that the fields referenced cannot |