RESOLVED FIXED229223
Build an unlinked baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=229223
Summary Build an unlinked baseline JIT
Saam Barati
Reported 2021-08-17 19:35:45 PDT
...
Attachments
WIP (14.56 KB, patch)
2021-08-18 19:39 PDT, Saam Barati
no flags
WIP (29.74 KB, patch)
2021-08-19 15:59 PDT, Saam Barati
no flags
WIP (33.30 KB, patch)
2021-08-20 13:10 PDT, Saam Barati
no flags
WIP (48.60 KB, patch)
2021-08-20 19:21 PDT, Saam Barati
no flags
WIP (80.97 KB, patch)
2021-08-23 19:36 PDT, Saam Barati
no flags
WIP (86.97 KB, patch)
2021-08-25 12:09 PDT, Saam Barati
no flags
WIP (132.15 KB, patch)
2021-08-25 17:56 PDT, Saam Barati
no flags
WIP (138.66 KB, patch)
2021-08-25 19:00 PDT, Saam Barati
no flags
WIP (148.02 KB, patch)
2021-08-25 22:02 PDT, Saam Barati
no flags
WIP (147.48 KB, patch)
2021-08-26 11:33 PDT, Saam Barati
no flags
WIP (176.12 KB, patch)
2021-08-26 17:22 PDT, Saam Barati
no flags
WIP (176.12 KB, patch)
2021-08-26 20:49 PDT, Saam Barati
no flags
WIP (186.76 KB, patch)
2021-08-27 16:58 PDT, Saam Barati
no flags
WIP (221.96 KB, patch)
2021-08-29 13:11 PDT, Saam Barati
no flags
WIP (289.73 KB, patch)
2021-08-30 17:17 PDT, Saam Barati
no flags
WIP (302.38 KB, patch)
2021-08-30 18:30 PDT, Saam Barati
no flags
WIP (305.72 KB, patch)
2021-08-30 18:49 PDT, Saam Barati
no flags
patch (320.92 KB, patch)
2021-08-31 16:22 PDT, Saam Barati
no flags
patch (353.71 KB, patch)
2021-08-31 18:52 PDT, Saam Barati
no flags
WIP (359.04 KB, patch)
2021-08-31 18:59 PDT, Saam Barati
no flags
WIP (359.53 KB, patch)
2021-08-31 19:02 PDT, Saam Barati
no flags
WIP (368.88 KB, patch)
2021-09-01 12:01 PDT, Saam Barati
no flags
WIP (374.00 KB, patch)
2021-09-01 12:30 PDT, Saam Barati
no flags
WIP (376.79 KB, patch)
2021-09-01 12:50 PDT, Saam Barati
no flags
WIP (376.79 KB, patch)
2021-09-01 13:11 PDT, Saam Barati
no flags
WIP (376.79 KB, patch)
2021-09-01 13:15 PDT, Saam Barati
no flags
WIP (390.15 KB, patch)
2021-09-01 16:29 PDT, Saam Barati
no flags
WIP (393.09 KB, patch)
2021-09-01 18:13 PDT, Saam Barati
no flags
WIP (395.77 KB, patch)
2021-09-01 19:26 PDT, Saam Barati
no flags
WIP (397.15 KB, patch)
2021-09-01 19:50 PDT, Saam Barati
no flags
WIP (407.12 KB, patch)
2021-09-02 17:31 PDT, Saam Barati
no flags
WIP (412.06 KB, patch)
2021-09-02 18:51 PDT, Saam Barati
no flags
WIP (412.78 KB, patch)
2021-09-03 11:00 PDT, Saam Barati
no flags
WIP (413.39 KB, patch)
2021-09-03 11:47 PDT, Saam Barati
no flags
WIP (413.86 KB, patch)
2021-09-03 12:03 PDT, Saam Barati
no flags
WIP (412.30 KB, patch)
2021-09-03 13:48 PDT, Saam Barati
no flags
WIP (417.46 KB, patch)
2021-09-03 16:20 PDT, Saam Barati
no flags
WIP (423.01 KB, patch)
2021-09-03 18:09 PDT, Saam Barati
no flags
WIP (437.64 KB, patch)
2021-09-07 14:54 PDT, Saam Barati
no flags
WIP (451.80 KB, patch)
2021-09-07 20:00 PDT, Saam Barati
no flags
WIP (453.91 KB, patch)
2021-09-07 20:25 PDT, Saam Barati
no flags
WIP (456.74 KB, patch)
2021-09-07 22:05 PDT, Saam Barati
no flags
WIP (456.74 KB, patch)
2021-09-07 22:11 PDT, Saam Barati
no flags
WIP (458.59 KB, patch)
2021-09-08 11:55 PDT, Saam Barati
no flags
WIP (444.60 KB, patch)
2021-09-16 19:10 PDT, Saam Barati
no flags
WIP (444.69 KB, patch)
2021-09-16 19:18 PDT, Saam Barati
no flags
WIP (444.78 KB, patch)
2021-09-16 19:29 PDT, Saam Barati
no flags
WIP (444.56 KB, patch)
2021-09-17 19:16 PDT, Saam Barati
no flags
WIP (468.11 KB, patch)
2021-09-19 19:22 PDT, Saam Barati
no flags
WIP (472.06 KB, patch)
2021-09-19 19:31 PDT, Saam Barati
no flags
WIP (484.57 KB, patch)
2021-09-20 15:00 PDT, Saam Barati
no flags
WIP (490.02 KB, patch)
2021-09-20 16:08 PDT, Saam Barati
no flags
WIP (489.42 KB, patch)
2021-09-20 17:11 PDT, Saam Barati
no flags
WIP (492.87 KB, patch)
2021-09-20 21:31 PDT, Saam Barati
no flags
WIP (492.88 KB, patch)
2021-09-20 22:40 PDT, Saam Barati
no flags
WIP (498.69 KB, patch)
2021-09-21 13:48 PDT, Saam Barati
no flags
WIP (516.38 KB, patch)
2021-09-21 15:44 PDT, Saam Barati
no flags
WIP (522.33 KB, patch)
2021-09-21 19:02 PDT, Saam Barati
no flags
WIP (522.47 KB, patch)
2021-09-21 19:39 PDT, Saam Barati
no flags
WIP (522.47 KB, patch)
2021-09-23 10:12 PDT, Saam Barati
no flags
WIP (537.29 KB, patch)
2021-09-23 17:44 PDT, Saam Barati
no flags
WIP (537.22 KB, patch)
2021-09-23 17:56 PDT, Saam Barati
no flags
WIP (537.22 KB, patch)
2021-09-23 18:09 PDT, Saam Barati
ews-feeder: commit-queue-
WIP (604.40 KB, patch)
2021-09-24 10:16 PDT, Saam Barati
ews-feeder: commit-queue-
WIP (599.64 KB, patch)
2021-09-24 11:18 PDT, Saam Barati
ews-feeder: commit-queue-
WIP (599.64 KB, patch)
2021-09-24 12:16 PDT, Saam Barati
ews-feeder: commit-queue-
patch (630.35 KB, patch)
2021-09-24 12:58 PDT, Saam Barati
ews-feeder: commit-queue-
patch (631.06 KB, patch)
2021-09-24 13:32 PDT, Saam Barati
ews-feeder: commit-queue-
patch (631.11 KB, patch)
2021-09-24 13:41 PDT, Saam Barati
ews-feeder: commit-queue-
patch (631.16 KB, patch)
2021-09-24 13:57 PDT, Saam Barati
ysuzuki: review+
ews-feeder: commit-queue-
patch (631.75 KB, patch)
2021-09-24 15:59 PDT, Saam Barati
ews-feeder: commit-queue-
patch (631.78 KB, patch)
2021-09-24 16:14 PDT, Saam Barati
ews-feeder: commit-queue-
patch (632.03 KB, patch)
2021-09-24 16:22 PDT, Saam Barati
ews-feeder: commit-queue-
patch (632.67 KB, patch)
2021-09-24 16:37 PDT, Saam Barati
ews-feeder: commit-queue-
patch (632.71 KB, patch)
2021-09-24 16:52 PDT, Saam Barati
ews-feeder: commit-queue-
patch for landing (634.01 KB, patch)
2021-09-24 19:40 PDT, Saam Barati
ews-feeder: commit-queue-
patch for landing (636.91 KB, patch)
2021-09-24 23:02 PDT, Saam Barati
ews-feeder: commit-queue-
patch for landing (636.92 KB, patch)
2021-09-24 23:29 PDT, Saam Barati
ews-feeder: commit-queue-
patch for landing (638.26 KB, patch)
2021-09-25 11:46 PDT, Saam Barati
no flags
test windows (638.65 KB, patch)
2021-09-26 21:29 PDT, Saam Barati
ews-feeder: commit-queue-
[fast-cq] patch for landing (639.14 KB, patch)
2021-09-27 00:44 PDT, Saam Barati
no flags
[fast-cq] patch for landing (641.10 KB, patch)
2021-09-27 13:24 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2021-08-18 19:39:43 PDT
Saam Barati
Comment 2 2021-08-19 15:59:48 PDT
Saam Barati
Comment 3 2021-08-20 13:10:14 PDT
Saam Barati
Comment 4 2021-08-20 19:21:43 PDT
Saam Barati
Comment 5 2021-08-23 19:36:49 PDT
Created attachment 436257 [details] WIP I've audited/edited 107/186 opcodes. However, lot of the hard ones left to do, like the ICs.
Radar WebKit Bug Importer
Comment 6 2021-08-24 19:36:55 PDT
Saam Barati
Comment 7 2021-08-25 12:09:01 PDT
Saam Barati
Comment 8 2021-08-25 17:56:47 PDT
Created attachment 436449 [details] WIP Did scope operations, probably the biggest change of any bytecodes so far.
Saam Barati
Comment 9 2021-08-25 18:14:11 PDT
Main things left before I can start compiling code are likely the two hardest parts: - Call ICs - SSI based ICs
Saam Barati
Comment 10 2021-08-25 19:00:12 PDT
Saam Barati
Comment 11 2021-08-25 22:02:03 PDT
Saam Barati
Comment 12 2021-08-26 11:33:09 PDT
Created attachment 436537 [details] WIP rebased
Saam Barati
Comment 13 2021-08-26 17:22:31 PDT
Created attachment 436591 [details] WIP Implemented call ICs. Now time to do SSI based ICs.
Saam Barati
Comment 14 2021-08-26 20:49:20 PDT
Saam Barati
Comment 15 2021-08-27 16:58:07 PDT
Saam Barati
Comment 16 2021-08-29 13:11:07 PDT
Saam Barati
Comment 17 2021-08-30 17:17:34 PDT
Saam Barati
Comment 18 2021-08-30 18:30:33 PDT
Created attachment 436839 [details] WIP Inline caching opcodes are done. Just a few more left to do.
Saam Barati
Comment 19 2021-08-30 18:49:06 PDT
Created attachment 436840 [details] WIP Only 7 opcodes left to write.
Saam Barati
Comment 20 2021-08-31 16:22:52 PDT
Created attachment 436962 [details] patch All opcodes are done (for 64-bit). Time to start trying to actually compile it.
Saam Barati
Comment 21 2021-08-31 18:52:05 PDT
Saam Barati
Comment 22 2021-08-31 18:59:24 PDT
Saam Barati
Comment 23 2021-08-31 19:02:58 PDT
Saam Barati
Comment 24 2021-09-01 12:01:10 PDT
Saam Barati
Comment 25 2021-09-01 12:30:52 PDT
Saam Barati
Comment 26 2021-09-01 12:50:53 PDT
Saam Barati
Comment 27 2021-09-01 13:11:51 PDT
Saam Barati
Comment 28 2021-09-01 13:15:56 PDT
Created attachment 437060 [details] WIP Rebased. Time to start trying to compile this thing.
Saam Barati
Comment 29 2021-09-01 16:29:10 PDT
Created attachment 437080 [details] WIP Parts of it are starting to compile
Saam Barati
Comment 30 2021-09-01 18:13:15 PDT
Saam Barati
Comment 31 2021-09-01 19:26:31 PDT
Saam Barati
Comment 32 2021-09-01 19:50:27 PDT
Created attachment 437108 [details] WIP debug now builds!
Saam Barati
Comment 33 2021-09-02 17:31:09 PDT
Saam Barati
Comment 34 2021-09-02 18:51:59 PDT
Saam Barati
Comment 35 2021-09-03 11:00:53 PDT
Created attachment 437285 [details] WIP Many tests pass now!
Saam Barati
Comment 36 2021-09-03 11:47:05 PDT
Saam Barati
Comment 37 2021-09-03 12:03:10 PDT
Saam Barati
Comment 38 2021-09-03 13:48:23 PDT
Saam Barati
Comment 39 2021-09-03 16:20:30 PDT
Created attachment 437324 [details] WIP An initial version of sharing appears to work, but slows down things. Time for the fun part, I guess.
Saam Barati
Comment 40 2021-09-03 18:09:55 PDT
Saam Barati
Comment 41 2021-09-07 14:54:49 PDT
Saam Barati
Comment 42 2021-09-07 20:00:18 PDT
Saam Barati
Comment 43 2021-09-07 20:25:02 PDT
Saam Barati
Comment 44 2021-09-07 22:05:22 PDT
Saam Barati
Comment 45 2021-09-07 22:11:43 PDT
Saam Barati
Comment 46 2021-09-08 11:55:09 PDT
Created attachment 437652 [details] WIP Moved ValueProfiles to UnlinkedCodeBlock
Saam Barati
Comment 47 2021-09-16 19:10:43 PDT
Created attachment 438430 [details] WIP rebased
Saam Barati
Comment 48 2021-09-16 19:18:57 PDT
Saam Barati
Comment 49 2021-09-16 19:29:37 PDT
Saam Barati
Comment 50 2021-09-17 19:16:03 PDT
Created attachment 438541 [details] WIP Resolved some perf issues.
Saam Barati
Comment 51 2021-09-19 19:22:44 PDT
Saam Barati
Comment 52 2021-09-19 19:31:02 PDT
Saam Barati
Comment 53 2021-09-20 15:00:46 PDT
Saam Barati
Comment 54 2021-09-20 16:08:46 PDT
Saam Barati
Comment 55 2021-09-20 17:11:38 PDT
Saam Barati
Comment 56 2021-09-20 21:31:25 PDT
Saam Barati
Comment 57 2021-09-20 22:40:23 PDT
Saam Barati
Comment 58 2021-09-21 13:48:59 PDT
Created attachment 438851 [details] WIP Release tests are passing on arm64
Saam Barati
Comment 59 2021-09-21 15:44:53 PDT
Saam Barati
Comment 60 2021-09-21 19:02:24 PDT
Saam Barati
Comment 61 2021-09-21 19:39:36 PDT
Saam Barati
Comment 62 2021-09-23 10:12:57 PDT
Saam Barati
Comment 63 2021-09-23 17:44:06 PDT
Saam Barati
Comment 64 2021-09-23 17:56:15 PDT
Saam Barati
Comment 65 2021-09-23 18:09:42 PDT
Created attachment 439113 [details] WIP rebased Things seem to now be working both on arm64 and x86_64
Saam Barati
Comment 66 2021-09-24 10:16:19 PDT
Saam Barati
Comment 67 2021-09-24 11:18:38 PDT
Saam Barati
Comment 68 2021-09-24 12:16:27 PDT
Saam Barati
Comment 69 2021-09-24 12:58:00 PDT
Saam Barati
Comment 70 2021-09-24 13:32:15 PDT
Created attachment 439189 [details] patch Still tryna make some 32-bit code compile.
Saam Barati
Comment 71 2021-09-24 13:41:57 PDT
Saam Barati
Comment 72 2021-09-24 13:57:45 PDT
Yusuke Suzuki
Comment 73 2021-09-24 14:42:19 PDT
Comment on attachment 439194 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=439194&action=review r=me Saam and I discussed about ArithProfile changes. And we agree that we will revert these changes unless that gets a performance improvement because that change increases memory use. And please fix GTK and WPE builders since they are x64. (And WinCairo and Win). > Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp:606 > + if (!canBeShared && ASSERT_ENABLED) { > + jit.addPtr(CCallHelpers::TrustedImm32(codeBlock->stackPointerOffset() * sizeof(Register)), GPRInfo::callFrameRegister, jit.scratchRegister()); > + auto ok = jit.branchPtr(CCallHelpers::Equal, CCallHelpers::stackPointerRegister, jit.scratchRegister()); > + jit.breakpoint(); > + ok.link(&jit); Nice.
Saam Barati
Comment 74 2021-09-24 15:59:11 PDT
Created attachment 439203 [details] patch Try to fix some of the builds.
Saam Barati
Comment 75 2021-09-24 16:14:03 PDT
Saam Barati
Comment 76 2021-09-24 16:22:44 PDT
Saam Barati
Comment 77 2021-09-24 16:37:19 PDT
Saam Barati
Comment 78 2021-09-24 16:52:20 PDT
Saam Barati
Comment 79 2021-09-24 19:40:23 PDT
Created attachment 439230 [details] patch for landing
Saam Barati
Comment 80 2021-09-24 23:02:11 PDT
Created attachment 439237 [details] patch for landing Hopefully this fixes the Windows bug.
Saam Barati
Comment 81 2021-09-24 23:29:39 PDT
Created attachment 439240 [details] patch for landing Hopefully windows is actually fixed now.
Saam Barati
Comment 82 2021-09-25 11:46:46 PDT
Created attachment 439266 [details] patch for landing
EWS
Comment 83 2021-09-25 14:55:49 PDT
Committed r283083 (242141@main): <https://commits.webkit.org/242141@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439266 [details].
Ross Kirsling
Comment 84 2021-09-26 11:14:16 PDT
This change broke ENABLE_JIT=OFF in general, because these get added to LLIntDesiredOffsets.h: OFFLINE_ASM_OFFSETOF(CodeBlock, m_jitData) OFFLINE_ASM_OFFSETOF(CodeBlock::JITData, m_jitConstantPool)
Fujii Hironori
Comment 85 2021-09-26 13:59:48 PDT
Winodws ports are crashing. the backtrace is broken. This change has to be reverted. https://ews-build.webkit.org/#/builders/10/builds/107549 https://build.webkit.org/#/builders/60/builds/2759
WebKit Commit Bot
Comment 86 2021-09-26 14:17:52 PDT
Re-opened since this is blocked by bug 230806
Saam Barati
Comment 87 2021-09-26 21:29:05 PDT
Created attachment 439312 [details] test windows
Saam Barati
Comment 88 2021-09-27 00:33:14 PDT
So the windows bug turns out to be even worse than imagined. My patch is calling loadPtr(regT0, xyz). MSVC is coercing the RegisterID of regT0 to nullptr instead of passing it to ImplicitAddress. So instead of calling loadPtr(ImplicitAddress) we're calling loadPtr(void*) with nullptr. Causing us to emit a constant load of nullptr.
Saam Barati
Comment 89 2021-09-27 00:44:00 PDT
Created attachment 439326 [details] [fast-cq] patch for landing
EWS
Comment 90 2021-09-27 00:52:57 PDT
Committed r283102 (242160@main): <https://commits.webkit.org/242160@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439326 [details].
Yusuke Suzuki
Comment 91 2021-09-27 01:55:14 PDT
Yusuke Suzuki
Comment 92 2021-09-27 02:07:24 PDT
WebKit Commit Bot
Comment 93 2021-09-27 12:30:30 PDT
Re-opened since this is blocked by bug 230854
Saam Barati
Comment 94 2021-09-27 13:24:02 PDT
Created attachment 439386 [details] [fast-cq] patch for landing
EWS
Comment 95 2021-09-27 14:53:51 PDT
Committed r283139 (242196@main): <https://commits.webkit.org/242196@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439386 [details].
Note You need to log in before you can comment on or make changes to this bug.