Bug 198648 - [JSC] Use mergePrediction in ValuePow prediction propagation
Summary: [JSC] Use mergePrediction in ValuePow prediction propagation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-07 00:44 PDT by Yusuke Suzuki
Modified: 2019-06-09 00:09 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.13 KB, patch)
2019-06-07 00:47 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (3.20 KB, patch)
2019-06-08 21:42 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-06-07 00:44:01 PDT
Currently, we are accidentally using setPrediction. This is wrong since prediction propagation (not processInvariant) must extend the speculation types to ensure we eventually reach to the fixed point.
setPrediction can discard previously configured predictions, can lead to oscillation potentially.
Comment 1 Yusuke Suzuki 2019-06-07 00:47:14 PDT
Created attachment 371572 [details]
Patch
Comment 2 Yusuke Suzuki 2019-06-07 00:49:03 PDT
<rdar://problem/51472985>
Comment 3 Yusuke Suzuki 2019-06-07 01:00:08 PDT
Comment on attachment 371572 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371572&action=review

> Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:291
> +                    changed |= mergePrediction(SpecBytecodeDouble | SpecBigInt);

And this also does not propagate "change" :)
Comment 4 Caio Lima 2019-06-07 02:01:54 PDT
Comment on attachment 371572 [details]
Patch

Nice catch! Informal r+.
Comment 5 Yusuke Suzuki 2019-06-08 21:42:17 PDT
Created attachment 371701 [details]
Patch
Comment 6 Saam Barati 2019-06-08 23:35:47 PDT
Comment on attachment 371701 [details]
Patch

r=me
Comment 7 Yusuke Suzuki 2019-06-08 23:39:12 PDT
Comment on attachment 371701 [details]
Patch

Thanks! :)
Comment 8 WebKit Commit Bot 2019-06-09 00:09:53 PDT
Comment on attachment 371701 [details]
Patch

Clearing flags on attachment: 371701

Committed r246237: <https://trac.webkit.org/changeset/246237>
Comment 9 WebKit Commit Bot 2019-06-09 00:09:55 PDT
All reviewed patches have been landed.  Closing bug.