Bug 237863 - [JSC] Use constants buffer in DFG
Summary: [JSC] Use constants buffer in DFG
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-14 18:48 PDT by Yusuke Suzuki
Modified: 2022-04-19 10:21 PDT (History)
9 users (show)

See Also:


Attachments
Patch (242.27 KB, patch)
2022-03-14 18:49 PDT, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (246.28 KB, patch)
2022-03-14 19:15 PDT, Yusuke Suzuki
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (246.34 KB, patch)
2022-03-14 19:25 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (229.90 KB, patch)
2022-03-15 22:56 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (259.25 KB, patch)
2022-03-17 16:51 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (283.74 KB, patch)
2022-03-18 00:22 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (287.45 KB, patch)
2022-03-18 01:31 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (267.85 KB, patch)
2022-04-05 00:30 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (274.69 KB, patch)
2022-04-11 16:36 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 2022-03-14 18:48:38 PDT
[JSC] Use constants buffer in DFG
Comment 1 Yusuke Suzuki 2022-03-14 18:49:23 PDT
Created attachment 454645 [details]
Patch
Comment 2 Yusuke Suzuki 2022-03-14 19:15:37 PDT
Created attachment 454648 [details]
Patch
Comment 3 Yusuke Suzuki 2022-03-14 19:25:13 PDT
Created attachment 454649 [details]
Patch
Comment 4 Yusuke Suzuki 2022-03-15 22:56:35 PDT
Created attachment 454802 [details]
Patch
Comment 5 Yusuke Suzuki 2022-03-17 16:51:21 PDT
Created attachment 455044 [details]
Patch
Comment 6 Yusuke Suzuki 2022-03-18 00:22:53 PDT
Created attachment 455072 [details]
Patch
Comment 7 Yusuke Suzuki 2022-03-18 01:31:53 PDT
Created attachment 455076 [details]
Patch
Comment 8 Radar WebKit Bug Importer 2022-03-21 18:49:17 PDT
<rdar://problem/90606538>
Comment 9 Aakash Jain 2022-03-23 06:33:58 PDT
I cancelled jsc builds https://ews-build.webkit.org/#/builders/46/builds/21500 and https://ews-build.webkit.org/#/builders/45/builds/12635
There were various segmentation faults in https://ews-build.webkit.org/#/builders/45/builds/12635/steps/15/logs/stdio. Please have a look it's that's because of the patch or not.
Comment 10 Yusuke Suzuki 2022-04-05 00:30:45 PDT
Created attachment 456680 [details]
Patch
Comment 11 Yusuke Suzuki 2022-04-11 16:36:16 PDT
Created attachment 457299 [details]
Patch
Comment 12 Yusuke Suzuki 2022-04-11 17:12:57 PDT
Pull request: https://github.com/WebKit/WebKit/pull/274
Comment 13 Yusuke Suzuki 2022-04-12 20:02:45 PDT
Pull request: https://github.com/WebKit/WebKit/pull/279
Comment 14 EWS 2022-04-19 01:07:42 PDT
Committed r293009 (249748@main): <https://commits.webkit.org/249748@main>

Reviewed commits have been landed. Closing PR #279 and removing active labels.
Comment 15 Yusuke Suzuki 2022-04-19 10:20:05 PDT
Committed r293020 (249759@trunk): <https://commits.webkit.org/249759@trunk>
Comment 16 Yusuke Suzuki 2022-04-19 10:21:02 PDT
This is not directly related to uDFG, but it seems that TempRegisterSet, ScratchRegisterAllocator etc. is heavily relying on a wrong implementation of GPRInfo::numberOfRegisters. TempRegisterSet can only accept register which is considered as a temp register in GPRInfo. But this does not work if we remove constants-buffer register from DFG & GPRInfo while using it in FTL. But fundamental problem is that TempRegisterSet and ScratchRegisterAllocator are relying on GPRInfo::numberOfRegisters since it is DFG specific information (and if we use it in IC, which can be used in FTL too, then we hit this crash).
In ARM64, it does not have a problem since constants buffer register is not included anyway in GPRInfo::numberOfRegisters even before that