Bug 1607443 - Fix some alias sets. r=tcampbell, a=lizzard FIREFOX_ESR_68_4_X_RELBRANCH FENNEC_68_4_1_BUILD1 FENNEC_68_4_1_RELEASE FIREFOX_68_4_1esr_BUILD1 FIREFOX_68_4_1esr_RELEASE
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 01 Jan 1970 00:00:00 +0000 (1970-01-01)
branchFIREFOX_ESR_68_4_X_RELBRANCH
changeset 524354 8b51bf38ddbb00131188d833c1441bb37128634b
parent 524341 b95acd0db42d5457d65b0a6847c7ae360729fed7
child 524359 5c3329fb2b7d52fa06d00b6b1b384b0ef7c4a279
child 524435 8fb71d4399777dcbe94f9a58ef061d87520a6ab5
push id728
push userryanvm@gmail.com
push dateTue, 07 Jan 2020 21:29:59 +0000 (2020-01-07)
treeherdermozilla-esr68@8b51bf38ddbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell, lizzard
bugs1607443
milestone68.4.1
Bug 1607443 - Fix some alias sets. r=tcampbell, a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D58956
js/src/jit/AliasAnalysis.cpp
js/src/jit/MIR.h
--- a/js/src/jit/AliasAnalysis.cpp
+++ b/js/src/jit/AliasAnalysis.cpp
@@ -115,18 +115,16 @@ static inline const MDefinition* GetObje
     case MDefinition::Opcode::LoadUnboxedString:
     case MDefinition::Opcode::StoreElement:
     case MDefinition::Opcode::StoreUnboxedObjectOrNull:
     case MDefinition::Opcode::StoreUnboxedString:
     case MDefinition::Opcode::StoreUnboxedScalar:
     case MDefinition::Opcode::SetInitializedLength:
     case MDefinition::Opcode::ArrayLength:
     case MDefinition::Opcode::SetArrayLength:
-    case MDefinition::Opcode::StoreElementHole:
-    case MDefinition::Opcode::FallibleStoreElement:
     case MDefinition::Opcode::TypedObjectDescr:
     case MDefinition::Opcode::Slots:
     case MDefinition::Opcode::Elements:
     case MDefinition::Opcode::MaybeCopyElementsForWrite:
     case MDefinition::Opcode::MaybeToDoubleElement:
     case MDefinition::Opcode::TypedArrayLength:
     case MDefinition::Opcode::TypedArrayByteOffset:
     case MDefinition::Opcode::SetTypedObjectOffset:
@@ -177,16 +175,18 @@ static inline const MDefinition* GetObje
     case MDefinition::Opcode::WasmAtomicExchangeHeap:
     case MDefinition::Opcode::WasmLoadGlobalVar:
     case MDefinition::Opcode::WasmLoadGlobalCell:
     case MDefinition::Opcode::WasmStoreGlobalVar:
     case MDefinition::Opcode::WasmStoreGlobalCell:
     case MDefinition::Opcode::WasmStoreRef:
     case MDefinition::Opcode::ArrayJoin:
     case MDefinition::Opcode::ArraySlice:
+    case MDefinition::Opcode::StoreElementHole:
+    case MDefinition::Opcode::FallibleStoreElement:
       return nullptr;
     default:
 #ifdef DEBUG
       // Crash when the default aliasSet is overriden, but when not added in the
       // list above.
       if (!ins->getAliasSet().isStore() ||
           ins->getAliasSet().flags() != AliasSet::Flag::Any) {
         MOZ_CRASH(
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -7787,22 +7787,16 @@ class MStoreElementHole
     MOZ_ASSERT(index->type() == MIRType::Int32);
   }
 
  public:
   INSTRUCTION_HEADER(StoreElementHole)
   TRIVIAL_NEW_WRAPPERS
   NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
 
-  AliasSet getAliasSet() const override {
-    // StoreElementHole can update the initialized length, the array length
-    // or reallocate obj->elements.
-    return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
-  }
-
   ALLOW_CLONE(MStoreElementHole)
 };
 
 // Try to store a value to a dense array slots vector. May fail due to the
 // object being non-extensible/sealed/frozen. Cannot be used on an object that
 // has extra indexed properties.
 class MFallibleStoreElement
     : public MQuaternaryInstruction,
@@ -7819,19 +7813,16 @@ class MFallibleStoreElement
     MOZ_ASSERT(index->type() == MIRType::Int32);
   }
 
  public:
   INSTRUCTION_HEADER(FallibleStoreElement)
   TRIVIAL_NEW_WRAPPERS
   NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
 
-  AliasSet getAliasSet() const override {
-    return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
-  }
   bool needsHoleCheck() const { return needsHoleCheck_; }
 
   ALLOW_CLONE(MFallibleStoreElement)
 };
 
 // Store an unboxed object or null pointer to an elements vector.
 class MStoreUnboxedObjectOrNull : public MQuaternaryInstruction,
                                   public StoreUnboxedObjectOrNullPolicy::Data {