<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[277117] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/277117">277117</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2021-05-06 13:54:16 -0700 (Thu, 06 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Reduce use of dmb ish on ARM64
https://bugs.webkit.org/show_bug.cgi?id=225465

Reviewed by Keith Miller.
Source/JavaScriptCore:

        
We use loadLoadFence a lot, often in situations like:
        
Foo* ptr = loadStuff;
loadLoadFence();
use ptr
        
On ARM64, we don't need a dmb ish here.  This introduces a dependentLoadLoadFence() for these
cases; it's just a compiler fence on ARM64 and Intel.

We also used loadLoadFence in some places where I couldn't think of any good reason for the
fence other than paranoia. I got rid of those.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::computeFromCallLinkInfo):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::jitType const):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfileBase::structure):
(JSC::ObjectAllocationProfileWithPrototype::prototype):
* bytecode/Watchpoint.h:
(JSC::WatchpointSet::state const):
(JSC::InlineWatchpointSet::state const):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::handlePutByVal):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
* runtime/GetterSetter.h:
* runtime/InferredValue.h:
(JSC::InferredValue::state const):
* runtime/Structure.h:
(JSC::Structure::tryRareData):
* runtime/StructureInlines.h:
(JSC::Structure::propertyReplacementWatchpointSet):

Source/WTF:


* wtf/Atomics.h:
(WTF::dependentLoadLoadFence):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCallLinkStatuscpp">trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockh">trunk/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeObjectAllocationProfileh">trunk/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeWatchpointh">trunk/Source/JavaScriptCore/bytecode/Watchpoint.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeGetterSetterh">trunk/Source/JavaScriptCore/runtime/GetterSetter.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeInferredValueh">trunk/Source/JavaScriptCore/runtime/InferredValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStructureh">trunk/Source/JavaScriptCore/runtime/Structure.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStructureInlinesh">trunk/Source/JavaScriptCore/runtime/StructureInlines.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfAtomicsh">trunk/Source/WTF/wtf/Atomics.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/ChangeLog       2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -1,5 +1,49 @@
</span><span class="cx"> 2021-05-06  Filip Pizlo  <fpizlo@apple.com>
</span><span class="cx"> 
</span><ins>+        Reduce use of dmb ish on ARM64
+        https://bugs.webkit.org/show_bug.cgi?id=225465
+
+        Reviewed by Keith Miller.
+        
+        We use loadLoadFence a lot, often in situations like:
+        
+        Foo* ptr = loadStuff;
+        loadLoadFence();
+        use ptr
+        
+        On ARM64, we don't need a dmb ish here.  This introduces a dependentLoadLoadFence() for these
+        cases; it's just a compiler fence on ARM64 and Intel.
+
+        We also used loadLoadFence in some places where I couldn't think of any good reason for the
+        fence other than paranoia. I got rid of those.
+
+        * bytecode/CallLinkStatus.cpp:
+        (JSC::CallLinkStatus::computeFromCallLinkInfo):
+        * bytecode/CodeBlock.h:
+        (JSC::CodeBlock::jitType const):
+        * bytecode/ObjectAllocationProfile.h:
+        (JSC::ObjectAllocationProfileBase::structure):
+        (JSC::ObjectAllocationProfileWithPrototype::prototype):
+        * bytecode/Watchpoint.h:
+        (JSC::WatchpointSet::state const):
+        (JSC::InlineWatchpointSet::state const):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+        (JSC::DFG::ByteCodeParser::handlePutByVal):
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
+        * runtime/GetterSetter.h:
+        * runtime/InferredValue.h:
+        (JSC::InferredValue::state const):
+        * runtime/Structure.h:
+        (JSC::Structure::tryRareData):
+        * runtime/StructureInlines.h:
+        (JSC::Structure::propertyReplacementWatchpointSet):
+
+2021-05-06  Filip Pizlo  <fpizlo@apple.com>
+
</ins><span class="cx">         It should be possible to --logJIT=true
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=225464
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCallLinkStatuscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp  2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp     2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx">     // never mutated after the PolymorphicCallStubRoutine is instantiated. We have some conservative
</span><span class="cx">     // fencing in place to make sure that we see the variants list after construction.
</span><span class="cx">     if (PolymorphicCallStubRoutine* stub = callLinkInfo.stub()) {
</span><del>-        WTF::loadLoadFence();
</del><ins>+        WTF::dependentLoadLoadFence();
</ins><span class="cx">         
</span><span class="cx">         if (!stub->hasEdges()) {
</span><span class="cx">             // This means we have an FTL profile, which has incomplete information.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.h 2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.h    2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -434,9 +434,7 @@
</span><span class="cx">     JITType jitType() const
</span><span class="cx">     {
</span><span class="cx">         JITCode* jitCode = m_jitCode.get();
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         JITType result = JITCode::jitTypeFor(jitCode);
</span><del>-        WTF::loadLoadFence(); // This probably isn't needed. Oh well, paranoia is good.
</del><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeObjectAllocationProfileh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h   2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h      2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     {
</span><span class="cx">         Structure* structure = m_structure.get();
</span><span class="cx">         // Ensure that if we see the structure, it has been properly created
</span><del>-        WTF::loadLoadFence();
</del><ins>+        WTF::dependentLoadLoadFence();
</ins><span class="cx">         return structure;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">     JSObject* prototype()
</span><span class="cx">     {
</span><span class="cx">         JSObject* prototype = m_prototype.get();
</span><del>-        WTF::loadLoadFence();
</del><ins>+        WTF::dependentLoadLoadFence();
</ins><span class="cx">         return prototype;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeWatchpointh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/Watchpoint.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/Watchpoint.h        2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/bytecode/Watchpoint.h   2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -208,9 +208,7 @@
</span><span class="cx">     // then also the watchpoint state() will change to IsInvalidated.
</span><span class="cx">     WatchpointState state() const
</span><span class="cx">     {
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         WatchpointState result = static_cast<WatchpointState>(m_state);
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -361,9 +359,7 @@
</span><span class="cx">     // state if you also add a watchpoint.
</span><span class="cx">     WatchpointState state() const
</span><span class="cx">     {
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         uintptr_t data = m_data;
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         if (isFat(data))
</span><span class="cx">             return fat(data)->state();
</span><span class="cx">         return decodeState(data);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp    2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp       2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -5655,9 +5655,8 @@
</span><span class="cx">             auto bytecode = currentInstruction->as<OpNewArrayBuffer>();
</span><span class="cx">             // Unfortunately, we can't allocate a new JSImmutableButterfly if the profile tells us new information because we
</span><span class="cx">             // cannot allocate from compilation threads.
</span><del>-            WTF::loadLoadFence();
</del><span class="cx">             FrozenValue* frozen = get(VirtualRegister(bytecode.m_immutableButterfly))->constant();
</span><del>-            WTF::loadLoadFence();
</del><ins>+            WTF::dependentLoadLoadFence();
</ins><span class="cx">             JSImmutableButterfly* immutableButterfly = frozen->cast<JSImmutableButterfly*>();
</span><span class="cx">             NewArrayBufferData data { };
</span><span class="cx">             data.indexingMode = immutableButterfly->indexingMode();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp    2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp       2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -2404,7 +2404,7 @@
</span><span class="cx">         JSGlobalObject* globalObject = m_jit.globalObjectFor(node->origin.semantic);
</span><span class="cx">         Structure* stringPrototypeStructure = globalObject->stringPrototype()->structure(vm);
</span><span class="cx">         Structure* objectPrototypeStructure = globalObject->objectPrototype()->structure(vm);
</span><del>-        WTF::loadLoadFence();
</del><ins>+        WTF::dependentLoadLoadFence();
</ins><span class="cx"> 
</span><span class="cx">         if (globalObject->stringPrototypeChainIsSane()) {
</span><span class="cx">             // FIXME: This could be captured using a Speculation mode that means "out-of-bounds
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp      2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp 2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -8493,7 +8493,7 @@
</span><span class="cx">             JSGlobalObject* globalObject = m_graph.globalObjectFor(m_origin.semantic);
</span><span class="cx">             Structure* stringPrototypeStructure = globalObject->stringPrototype()->structure(vm());
</span><span class="cx">             Structure* objectPrototypeStructure = globalObject->objectPrototype()->structure(vm());
</span><del>-            WTF::loadLoadFence();
</del><ins>+            WTF::dependentLoadLoadFence();
</ins><span class="cx"> 
</span><span class="cx">             if (globalObject->stringPrototypeChainIsSane()) {
</span><span class="cx">                 // FIXME: This could be captured using a Speculation mode that means
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeGetterSetterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/GetterSetter.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/GetterSetter.h       2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/runtime/GetterSetter.h  2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     JSObject* getterConcurrently() const
</span><span class="cx">     {
</span><span class="cx">         JSObject* result = getter();
</span><del>-        WTF::loadLoadFence();
</del><ins>+        WTF::dependentLoadLoadFence();
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeInferredValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/InferredValue.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/InferredValue.h      2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/runtime/InferredValue.h 2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -81,9 +81,7 @@
</span><span class="cx">     // state if you also add a watchpoint.
</span><span class="cx">     WatchpointState state() const
</span><span class="cx">     {
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         uintptr_t data = m_data;
</span><del>-        WTF::loadLoadFence();
</del><span class="cx">         if (isFat(data))
</span><span class="cx">             return fat(data)->state();
</span><span class="cx">         return decodeState(data);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStructureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Structure.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Structure.h  2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/runtime/Structure.h     2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include "TinyBloomFilter.h"
</span><span class="cx"> #include "Watchpoint.h"
</span><span class="cx"> #include "WriteBarrierInlines.h"
</span><ins>+#include <wtf/Atomics.h>
</ins><span class="cx"> #include <wtf/PrintStream.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="lines">@@ -338,6 +339,15 @@
</span><span class="cx">         return static_cast<StructureRareData*>(m_previousOrRareData.get());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    StructureRareData* tryRareData()
+    {
+        JSCell* value = m_previousOrRareData.get();
+        WTF::dependentLoadLoadFence();
+        if (isRareData(value))
+            return static_cast<StructureRareData*>(value);
+        return nullptr;
+    }
+
</ins><span class="cx">     const StructureRareData* rareData() const
</span><span class="cx">     {
</span><span class="cx">         ASSERT(hasRareData());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStructureInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StructureInlines.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StructureInlines.h   2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/JavaScriptCore/runtime/StructureInlines.h      2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -367,10 +367,10 @@
</span><span class="cx"> inline WatchpointSet* Structure::propertyReplacementWatchpointSet(PropertyOffset offset)
</span><span class="cx"> {
</span><span class="cx">     ConcurrentJSLocker locker(m_lock);
</span><del>-    if (!hasRareData())
</del><ins>+    StructureRareData* rareData = tryRareData();
+    if (!rareData)
</ins><span class="cx">         return nullptr;
</span><del>-    WTF::loadLoadFence();
-    StructureRareData::PropertyWatchpointMap* map = rareData()->m_replacementWatchpointSets.get();
</del><ins>+    StructureRareData::PropertyWatchpointMap* map = rareData->m_replacementWatchpointSets.get();
</ins><span class="cx">     if (!map)
</span><span class="cx">         return nullptr;
</span><span class="cx">     return map->get(offset);
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/WTF/ChangeLog  2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2021-05-06  Filip Pizlo  <fpizlo@apple.com>
+
+        Reduce use of dmb ish on ARM64
+        https://bugs.webkit.org/show_bug.cgi?id=225465
+
+        Reviewed by Keith Miller.
+
+        * wtf/Atomics.h:
+        (WTF::dependentLoadLoadFence):
+
</ins><span class="cx"> 2021-05-06  Per Arne Vollan  <pvollan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Add sandbox extension flag to specify that path contains no symlinks
</span></span></pre></div>
<a id="trunkSourceWTFwtfAtomicsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Atomics.h (277116 => 277117)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Atomics.h   2021-05-06 20:49:28 UTC (rev 277116)
+++ trunk/Source/WTF/wtf/Atomics.h      2021-05-06 20:54:16 UTC (rev 277117)
</span><span class="lines">@@ -328,6 +328,13 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if CPU(ARM64) || CPU(X86) || CPU(X86_64)
+// Use this fence if you want a fence between loads that are already depdendent.
+inline void dependentLoadLoadFence() { compilerFence(); }
+#else
+inline void dependentLoadLoadFence() { loadLoadFence(); }
+#endif
+
</ins><span class="cx"> typedef unsigned InternalDependencyType;
</span><span class="cx"> 
</span><span class="cx"> inline InternalDependencyType opaqueMixture()
</span></span></pre>
</div>
</div>

</body>
</html>