Bug 1147810 - a barriered load has an effect. r=luke
authorLars T Hansen <lhansen@mozilla.com>
Fri, 27 Mar 2015 10:11:42 +0100
changeset 266402 776865752a675fbb707a9c8bb880af90fa27d029
parent 266401 ecac23a4d71331b943e636d1f668555b83294d22
child 266403 ae08455b713c0fa1dc2b91beb52fe2db99303e63
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1147810
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1147810 - a barriered load has an effect. r=luke
js/src/jit/MIR.h
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -12630,16 +12630,20 @@ class MAsmJSLoadHeap
 
     MDefinition *ptr() const { return getOperand(0); }
     void replacePtr(MDefinition *newPtr) { replaceOperand(0, newPtr); }
     MemoryBarrierBits barrierBefore() const { return barrierBefore_; }
     MemoryBarrierBits barrierAfter() const { return barrierAfter_; }
 
     bool congruentTo(const MDefinition *ins) const override;
     AliasSet getAliasSet() const override {
+        // When a barrier is needed make the instruction effectful by
+        // giving it a "store" effect.
+        if (barrierBefore_|barrierAfter_)
+            return AliasSet::Store(AliasSet::AsmJSHeap);
         return AliasSet::Load(AliasSet::AsmJSHeap);
     }
     bool mightAlias(const MDefinition *def) const override;
 };
 
 class MAsmJSStoreHeap
   : public MBinaryInstruction,
     public MAsmJSHeapAccess,