<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor MathIC compilation process in Baseline and DFG to turn temporary registers usage more flexible"
href="https://bugs.webkit.org/show_bug.cgi?id=160588#c43">Comment # 43</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Refactor MathIC compilation process in Baseline and DFG to turn temporary registers usage more flexible"
href="https://bugs.webkit.org/show_bug.cgi?id=160588">bug 160588</a>
from <span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=297820&action=diff" name="attach_297820" title="Patch">attachment 297820</a> <a href="attachment.cgi?id=297820&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=297820&action=review">https://bugs.webkit.org/attachment.cgi?id=297820&action=review</a>
<span class="quote">> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:3572
> + } else
> + scratchGPR[i] = InvalidGPRReg;</span >
Is this side of the branch ever taken? It seems like we should almost assert against it, and if a generator knows how to handle using the tags, it should just *always* do that and report that it needs fewer registers.
<span class="quote">> Source/JavaScriptCore/jit/JITAddGenerator.h:52
> + FPRReg leftFPR, FPRReg rightFPR, Vector<GPRReg, scratchGPRRegCount> scratchGPRs, Vector<FPRReg, scratchFPRRegCount> scratchFPRs)</span >
You shouldn't be copying these vectors for these constructors. I'd use "const Vector<...>&" as the type here.
<span class="quote">> Source/JavaScriptCore/jit/JITArithmetic.cpp:777
> + else
> + scratchGPR[i] = InvalidGPRReg;</span >
Ditto as the DFG code that does this.
<span class="quote">> Source/JavaScriptCore/jit/JITMulGenerator.cpp:41
> + // Maybe it was not possible allocate scratchGPR. In this case, we use result.tagGPR
> + if (m_scratchGPR == InvalidGPRReg)
> + m_scratchGPR = m_result.tagGPR();</span >
Ditto, we should just always use tag if we're 32-bit and we know we need a scratch and that the code is valid when using the tag as a scratch.
<span class="quote">> Source/JavaScriptCore/jit/JITMulGenerator.h:52
> + FPRReg leftFPR, FPRReg rightFPR, Vector<GPRReg, scratchGPRRegCount> scratchGPRs, Vector<FPRReg, scratchFPRRegCount> scratchFPRs)</span >
Ditto about copying the vectors.
<span class="quote">> Source/JavaScriptCore/jit/JITSubGenerator.h:51
> + FPRReg leftFPR, FPRReg rightFPR, Vector<GPRReg, scratchGPRRegCount> scratchGPRs, Vector<FPRReg, scratchFPRRegCount> scratchFPRs)</span >
Ditto about copying the vectors.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>