Closed
Bug 809485
Opened 13 years ago
Closed 13 years ago
IonMonkey: don't stop at resumepoints in edgecase analysis
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: h4writer, Assigned: h4writer)
References
Details
Attachments
(1 file, 1 obsolete file)
In edgecase analysis we know if a value is only consumed as truncated integer. In that case it doesn't make sense to have bailout checks for that function. Now we stop when the result is used in a resumepoint, because we want after bailing to have the right values.
Now we can actually remove this check, because the value will indeed be incorrect, but there is no observable difference in output with this value or the truncated value. Also when we run in the interpreter.
| Assignee | ||
Comment 1•13 years ago
|
||
Assignee: general → hv1989
| Assignee | ||
Comment 2•13 years ago
|
||
gkw, could you please use your fuzzer on this patch? I want to be sure I don't introduce any bugs! All tests succeeded for me, but it doesn't give me enough comfort to just push this. There could be some special internals preventing this.
Comment 3•13 years ago
|
||
Comment on attachment 679190 [details] [diff] [review]
Patch
Setting some review/feedback flags to get them on the fuzzing radar (I wasn't able to find a second feedback? flag to set though).
Attachment #679190 -
Flags: review?(choller)
Attachment #679190 -
Flags: feedback?(gary)
Comment 4•13 years ago
|
||
Hannes, is it possible for you to rebase it to tip? I tried applying it to 1437578c371f (tip at time of writing) but I seemed to get a patch failed error.
| Assignee | ||
Comment 5•13 years ago
|
||
Really sorry. But somehow I added a patch for another bug. This should work. Thanks
Attachment #679190 -
Attachment is obsolete: true
Attachment #679190 -
Flags: review?(choller)
Attachment #679190 -
Flags: feedback?(gary)
Attachment #679724 -
Flags: feedback?(gary)
| Assignee | ||
Updated•13 years ago
|
Attachment #679724 -
Flags: feedback?(choller)
Comment 6•13 years ago
|
||
Comment on attachment 679724 [details] [diff] [review]
Patch
+'ing because I did not hit anything immediately wrong after a few hours' of fuzzing.
Attachment #679724 -
Flags: feedback?(gary) → feedback+
Comment 7•13 years ago
|
||
Comment on attachment 679724 [details] [diff] [review]
Patch
No issues found so far, feedback+ :)
Attachment #679724 -
Flags: feedback?(choller) → feedback+
| Assignee | ||
Comment 8•13 years ago
|
||
Comment on attachment 679724 [details] [diff] [review]
Patch
We discussed this on IRC. The value could leak into the interpreter, but in normal execution the truncated value won't be visible and the computations are still correct. We win 1% on SS and would also win in v8-crypto (to hard to determine how much). On ARM it would be even bigger, because we lose the bailouts on MUL (mjrosenb told me it was really a pain on ARM).
Attachment #679724 -
Flags: review?(dvander)
| Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Christian Holler (:decoder) from comment #7)
> No issues found so far, feedback+ :)
(In reply to Gary Kwong [:gkw, :nth10sd] from comment #6)
> +'ing because I did not hit anything immediately wrong after a few hours' of
> fuzzing.
Also thanks both!
| Assignee | ||
Comment 10•13 years ago
|
||
I noticed I didn't put any numbers in here
Not patched:
Crypto: 8349
Patched:
Crypto: 8746
So an 5% increase on Crypto
Comment on attachment 679724 [details] [diff] [review]
Patch
So if I understand, let's say you have some operation like:
var z = (x + y);
...
var t = (x + y) | 0;
...
We could compile this as:
1: add(x, y)
2: resumepoint z=1
3: add(x, y)
4: or(3, #0)
5: resumepoint t=4
GVN+EdgecaseAnalysis could fold this as:
1: add(x, y)
2: resumepoint z=1
3: resumepoint t=1
Now, |z| *could* be the wrong value, but it doesn't actually matter since if anything had observed it, the edgecase analysis would have failed. Sounds right to me, as long as phis as treated as observable uses.
Attachment #679724 -
Flags: review?(dvander) → review+
| Assignee | ||
Comment 12•13 years ago
|
||
| Assignee | ||
Comment 13•13 years ago
|
||
(In reply to David Anderson [:dvander] from comment #11)
> ...
That is correct.
Comment 14•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•