Bug 1607443 - Fix some alias sets. r=tcampbell, a=lizzard GECKOVIEW_71_RELBRANCH
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 01 Jan 1970 00:00:00 +0000
branchGECKOVIEW_71_RELBRANCH
changeset 570354 8a2adb09dd1028af83524adea36c5b2797a1c1bd
parent 563519 dc494ce47a03be6be99250b30248ddb8fc855cfb
push id2233
push userryanvm@gmail.com
push dateWed, 08 Jan 2020 00:31:05 +0000
treeherdermozilla-release@8a2adb09dd10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell, lizzard
bugs1607443
milestone71.0.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:
@@ -176,16 +174,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
@@ -7735,22 +7735,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,
@@ -7767,19 +7761,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 {