[Webkit-unassigned] [Bug 235581] Add support for WASM branch hinting proposal
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 25 09:48:49 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=235581
Yusuke Suzuki <ysuzuki at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ysuzuki at apple.com
--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 449921
--> https://bugs.webkit.org/attachment.cgi?id=449921
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=449921&action=review
Nice!
> Source/JavaScriptCore/b3/B3EstimateStaticExecutionCounts.cpp:45
> constexpr double base = 10.0;
> + if (block->isHinted())
> + continue;
> block->setFrequency(pow(base, naturalLoops.loopDepth(block)));
Should we treat the hint as a coefficient to this calculated count?
Let's consider that here is a block in the deep loop (4-depth). Then, the frequency becomes 10e4.
It is much higher than the hint's value (0 or 1.0). So, currently, if we use hint, it lowers the value compared to the value offered by static-execution-counts.
Background: In Wasm B3 IR generator, except for FrequencyClass::Rare, we are not attaching frequency and calculating it in this pass.
In JS, we are using execution counter to profile block's frequency and reflect it at runtime.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220125/fe596bf0/attachment.htm>
More information about the webkit-unassigned
mailing list