Bug 1607443 - Fix some alias sets. r=tcampbell, a=lizzard FIREFOX_72_0_1_BUILD1 FIREFOX_72_0_1_RELEASE
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 01 Jan 1970 00:00:00 +0000
changeset 570353 8260da04c9b13f7c0e9cc6984a75e689b5fcb8c8
parent 570352 c24bc91fe72be044c19673579232269badf3b499
child 570355 ab6a325429d274f57edbca17029c333c494c00ad
push id2232
push userryanvm@gmail.com
push dateTue, 07 Jan 2020 21:28:22 +0000
treeherdermozilla-release@8260da04c9b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell, lizzard
bugs1607443
milestone72.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::ArrayPopShift:
@@ -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
@@ -7864,22 +7864,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,
@@ -7896,19 +7890,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 {