Bug 237863

Summary: [JSC] Use constants buffer in DFG
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, angelos, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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