<!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>[287012] trunk/Source/JavaScriptCore</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/287012">287012</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2021-12-13 23:07:39 -0800 (Mon, 13 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>WasmB3IRGenerator should estimate static execution counts
https://bugs.webkit.org/show_bug.cgi?id=234284

Reviewed by Filip Pizlo.

This enables the register allocator to make better decisions.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* b3/B3BasicBlock.h:
(JSC::B3::BasicBlock::setFrequency):
* b3/B3EstimateStaticExecutionCounts.cpp: Added.
(JSC::B3::estimateStaticExecutionCounts):
* b3/B3EstimateStaticExecutionCounts.h: Added.
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::parseAndCompile):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreSourcestxt">trunk/Source/JavaScriptCore/Sources.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3BasicBlockh">trunk/Source/JavaScriptCore/b3/B3BasicBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Procedureh">trunk/Source/JavaScriptCore/b3/B3Procedure.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp">trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreb3B3EstimateStaticExecutionCountscpp">trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3EstimateStaticExecutionCountsh">trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/ChangeLog       2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2021-12-13  Saam Barati  <sbarati@apple.com>
+
+        WasmB3IRGenerator should estimate static execution counts
+        https://bugs.webkit.org/show_bug.cgi?id=234284
+
+        Reviewed by Filip Pizlo.
+
+        This enables the register allocator to make better decisions.
+
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * Sources.txt:
+        * b3/B3BasicBlock.h:
+        (JSC::B3::BasicBlock::setFrequency):
+        * b3/B3EstimateStaticExecutionCounts.cpp: Added.
+        (JSC::B3::estimateStaticExecutionCounts):
+        * b3/B3EstimateStaticExecutionCounts.h: Added.
+        * wasm/WasmB3IRGenerator.cpp:
+        (JSC::Wasm::parseAndCompile):
+
</ins><span class="cx"> 2021-12-13  Brady Eidson  <beidson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Teach webpushtool to register and "host" the daemon.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj     2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -906,6 +906,8 @@
</span><span class="cx">          52CD0F5E2242F569004A18A5 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
</span><span class="cx">          52CD0F682242F71C004A18A5 /* testdfg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52CD0F672242F71C004A18A5 /* testdfg.cpp */; };
</span><span class="cx">          52DD000826E039B90054E408 /* BaselineJITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 52DD000626E039B30054E408 /* BaselineJITCode.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+               52E65A1C27682760002B4C0A /* B3EstimateStaticExecutionCounts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 52E65A1A27682760002B4C0A /* B3EstimateStaticExecutionCounts.cpp */; };
+               52E65A1E27682771002B4C0A /* B3EstimateStaticExecutionCounts.h in Headers */ = {isa = PBXBuildFile; fileRef = 52E65A1B27682760002B4C0A /* B3EstimateStaticExecutionCounts.h */; };
</ins><span class="cx">           52EED7942492B870008F4C93 /* FunctionAllowlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 52EED7932492B868008F4C93 /* FunctionAllowlist.h */; };
</span><span class="cx">          52F6C35E1E71EB080081F4CC /* WebAssemblyWrapperFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 52F6C35C1E71EB080081F4CC /* WebAssemblyWrapperFunction.h */; };
</span><span class="cx">          530A66B91FA3E78B0026A545 /* UnifiedSource3-mm.mm in Sources */ = {isa = PBXBuildFile; fileRef = 530A66B11FA3E77A0026A545 /* UnifiedSource3-mm.mm */; };
</span><span class="lines">@@ -3717,6 +3719,8 @@
</span><span class="cx">          52D1308F221CE03A009C836C /* foo.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = foo.js; sourceTree = "<group>"; };
</span><span class="cx">          52DD000626E039B30054E408 /* BaselineJITCode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaselineJITCode.h; sourceTree = "<group>"; };
</span><span class="cx">          52DD000726E039B40054E408 /* BaselineJITCode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = BaselineJITCode.cpp; sourceTree = "<group>"; };
</span><ins>+               52E65A1A27682760002B4C0A /* B3EstimateStaticExecutionCounts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3EstimateStaticExecutionCounts.cpp; path = b3/B3EstimateStaticExecutionCounts.cpp; sourceTree = "<group>"; };
+               52E65A1B27682760002B4C0A /* B3EstimateStaticExecutionCounts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3EstimateStaticExecutionCounts.h; path = b3/B3EstimateStaticExecutionCounts.h; sourceTree = "<group>"; };
</ins><span class="cx">           52EED7922492B868008F4C93 /* FunctionAllowlist.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionAllowlist.cpp; sourceTree = "<group>"; };
</span><span class="cx">          52EED7932492B868008F4C93 /* FunctionAllowlist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FunctionAllowlist.h; sourceTree = "<group>"; };
</span><span class="cx">          52F6C35B1E71EB080081F4CC /* WebAssemblyWrapperFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebAssemblyWrapperFunction.cpp; path = js/WebAssemblyWrapperFunction.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -5978,6 +5982,8 @@
</span><span class="cx">                          3395C70522555F6D00BDBFAD /* B3EliminateDeadCode.h */,
</span><span class="cx">                          0F5BF16E1F23A5A10029D91D /* B3EnsureLoopPreHeaders.cpp */,
</span><span class="cx">                          0F5BF16F1F23A5A10029D91D /* B3EnsureLoopPreHeaders.h */,
</span><ins>+                               52E65A1A27682760002B4C0A /* B3EstimateStaticExecutionCounts.cpp */,
+                               52E65A1B27682760002B4C0A /* B3EstimateStaticExecutionCounts.h */,
</ins><span class="cx">                           5318045D22EAAF0F004A7342 /* B3ExtractValue.cpp */,
</span><span class="cx">                          5318045B22EAAC4B004A7342 /* B3ExtractValue.h */,
</span><span class="cx">                          0F6971E81D92F42100BA02A5 /* B3FenceValue.cpp */,
</span><span class="lines">@@ -9912,6 +9918,7 @@
</span><span class="cx">                          0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */,
</span><span class="cx">                          E322E5A31DA64439006E7709 /* DFGSnippetParams.h in Headers */,
</span><span class="cx">                          86EC9DD31328DF82002B2AD7 /* DFGSpeculativeJIT.h in Headers */,
</span><ins>+                               52E65A1E27682771002B4C0A /* B3EstimateStaticExecutionCounts.h in Headers */,
</ins><span class="cx">                           0F682FB319BCB36400FA3BAD /* DFGSSACalculator.h in Headers */,
</span><span class="cx">                          A7D89D0017A0B8CC00773AD8 /* DFGSSAConversionPhase.h in Headers */,
</span><span class="cx">                          0FC20CBA18556A3500C9E954 /* DFGSSALoweringPhase.h in Headers */,
</span><span class="lines">@@ -11783,6 +11790,7 @@
</span><span class="cx">                          5C3A77BA22F2480F003827FF /* testb3_2.cpp in Sources */,
</span><span class="cx">                          5C3A77B922F2480B003827FF /* testb3_3.cpp in Sources */,
</span><span class="cx">                          5C3A77B822F24809003827FF /* testb3_4.cpp in Sources */,
</span><ins>+                               52E65A1C27682760002B4C0A /* B3EstimateStaticExecutionCounts.cpp in Sources */,
</ins><span class="cx">                           5C3A77B722F24806003827FF /* testb3_5.cpp in Sources */,
</span><span class="cx">                          5C3A77B622F24803003827FF /* testb3_6.cpp in Sources */,
</span><span class="cx">                          5C3A77B522F24800003827FF /* testb3_7.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/Sources.txt (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/Sources.txt  2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/Sources.txt     2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx"> b3/B3EliminateCommonSubexpressions.cpp
</span><span class="cx"> b3/B3EliminateDeadCode.cpp
</span><span class="cx"> b3/B3EnsureLoopPreHeaders.cpp
</span><ins>+b3/B3EstimateStaticExecutionCounts.cpp
</ins><span class="cx"> b3/B3ExtractValue.cpp
</span><span class="cx"> b3/B3FenceValue.cpp
</span><span class="cx"> b3/B3FixSSA.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3BasicBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3BasicBlock.h (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3BasicBlock.h    2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/b3/B3BasicBlock.h       2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -144,6 +144,7 @@
</span><span class="cx">     // Update predecessors starting with the successors of this block.
</span><span class="cx">     void updatePredecessorsAfter();
</span><span class="cx"> 
</span><ins>+    void setFrequency(double frequency) { m_frequency = frequency; }
</ins><span class="cx">     double frequency() const { return m_frequency; }
</span><span class="cx"> 
</span><span class="cx">     void dump(PrintStream&) const;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3EstimateStaticExecutionCountscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.cpp (0 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.cpp                               (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.cpp  2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "B3EstimateStaticExecutionCounts.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3BasicBlock.h"
+#include "B3NaturalLoops.h"
+#include "B3Procedure.h"
+
+namespace JSC { namespace B3 {
+
+bool estimateStaticExecutionCounts(Procedure& procedure)
+{
+    auto& naturalLoops = procedure.naturalLoops();
+
+    for (BasicBlock* block : procedure) {
+        constexpr double base = 10.0;
+        block->setFrequency(pow(base, naturalLoops.loopDepth(block)));
+    }
+
+    return true;
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3EstimateStaticExecutionCountsh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.h (0 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.h                         (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.h    2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#pragma once
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+class Procedure;
+
+bool estimateStaticExecutionCounts(Procedure&);
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Procedureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Procedure.h (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Procedure.h     2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/b3/B3Procedure.h        2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx">     CFG& cfg() const { return *m_cfg; }
</span><span class="cx"> 
</span><span class="cx">     Dominators& dominators();
</span><del>-    NaturalLoops& naturalLoops();
</del><ins>+    JS_EXPORT_PRIVATE NaturalLoops& naturalLoops();
</ins><span class="cx">     BackwardsCFG& backwardsCFG();
</span><span class="cx">     BackwardsDominators& backwardsDominators();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp (287011 => 287012)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp   2021-12-14 04:55:38 UTC (rev 287011)
+++ trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp      2021-12-14 07:07:39 UTC (rev 287012)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "B3BasicBlockInlines.h"
</span><span class="cx"> #include "B3CCallValue.h"
</span><span class="cx"> #include "B3ConstPtrValue.h"
</span><ins>+#include "B3EstimateStaticExecutionCounts.h"
</ins><span class="cx"> #include "B3FixSSA.h"
</span><span class="cx"> #include "B3Generate.h"
</span><span class="cx"> #include "B3InsertionSet.h"
</span><span class="lines">@@ -3294,6 +3295,8 @@
</span><span class="cx">     if (ASSERT_ENABLED)
</span><span class="cx">         validate(procedure, "After parsing:\n");
</span><span class="cx"> 
</span><ins>+    estimateStaticExecutionCounts(procedure);
+
</ins><span class="cx">     dataLogIf(WasmB3IRGeneratorInternal::verbose, "Pre SSA: ", procedure);
</span><span class="cx">     fixSSA(procedure);
</span><span class="cx">     dataLogIf(WasmB3IRGeneratorInternal::verbose, "Post SSA: ", procedure);
</span></span></pre>
</div>
</div>

</body>
</html>