Bug 1531731 - Register MWasmLoadRef and MWasmStoreRef with AliasAnalysis. r=bbouvier
authorLars T Hansen <lhansen@mozilla.com>
Fri, 01 Mar 2019 14:10:40 +0100
changeset 519977 74ab0e9aebf5cea683ca7c9b8fd77303e223c3b9
parent 519976 9453f4e1827d249f898b214f549c2fc08931d81c
child 519978 fad9ff877c1cbd2b06c03263ba9fc91d2f1fc405
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1531731
milestone67.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 1531731 - Register MWasmLoadRef and MWasmStoreRef with AliasAnalysis. r=bbouvier These new nodes participate in alias analysis and so must be made known to the alias analysis framework. Differential Revision: https://phabricator.services.mozilla.com/D21681
js/src/jit/AliasAnalysis.cpp
--- a/js/src/jit/AliasAnalysis.cpp
+++ b/js/src/jit/AliasAnalysis.cpp
@@ -99,18 +99,18 @@ static inline const MDefinition* MaybeUn
 
 // Get the object of any load/store. Returns nullptr if not tied to
 // an object.
 static inline const MDefinition* GetObject(const MDefinition* ins) {
   if (!ins->getAliasSet().isStore() && !ins->getAliasSet().isLoad()) {
     return nullptr;
   }
 
-  // Note: only return the object if that objects owns that property.
-  // I.e. the poperty isn't on the prototype chain.
+  // Note: only return the object if that object owns that property.
+  // I.e. the property isn't on the prototype chain.
   const MDefinition* object = nullptr;
   switch (ins->op()) {
     case MDefinition::Opcode::InitializedLength:
     case MDefinition::Opcode::LoadElement:
     case MDefinition::Opcode::LoadUnboxedScalar:
     case MDefinition::Opcode::LoadUnboxedObjectOrNull:
     case MDefinition::Opcode::LoadUnboxedString:
     case MDefinition::Opcode::StoreElement:
@@ -176,16 +176,18 @@ static inline const MDefinition* GetObje
     case MDefinition::Opcode::WasmStore:
     case MDefinition::Opcode::WasmCompareExchangeHeap:
     case MDefinition::Opcode::WasmAtomicBinopHeap:
     case MDefinition::Opcode::WasmAtomicExchangeHeap:
     case MDefinition::Opcode::WasmLoadGlobalVar:
     case MDefinition::Opcode::WasmLoadGlobalCell:
     case MDefinition::Opcode::WasmStoreGlobalVar:
     case MDefinition::Opcode::WasmStoreGlobalCell:
+    case MDefinition::Opcode::WasmLoadRef:
+    case MDefinition::Opcode::WasmStoreRef:
     case MDefinition::Opcode::ArrayJoin:
       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) {