Summary: | Build an unlinked baseline JIT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Severity: | Normal | CC: | annulen, benjamin, cdumez, cmarcelo, commit-queue, ews-watchlist, gyuyoung.kim, Hironori.Fujii, keith_miller, mark.lam, msaboff, ross.kirsling, ryuan.choi, sergio, tzagallo, webkit-bug-importer, ysuzuki | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=230847 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Depends on: | 230806, 230854 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bug Blocks: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attachments: |
|
Description
Saam Barati
2021-08-17 19:35:45 PDT
Created attachment 435829 [details]
WIP
Created attachment 435912 [details]
WIP
Created attachment 436019 [details]
WIP
Created attachment 436054 [details]
WIP
Created attachment 436257 [details]
WIP
I've audited/edited 107/186 opcodes. However, lot of the hard ones left to do, like the ICs.
Created attachment 436408 [details]
WIP
Created attachment 436449 [details]
WIP
Did scope operations, probably the biggest change of any bytecodes so far.
Main things left before I can start compiling code are likely the two hardest parts: - Call ICs - SSI based ICs Created attachment 436452 [details]
WIP
Created attachment 436469 [details]
WIP
Created attachment 436537 [details]
WIP
rebased
Created attachment 436591 [details]
WIP
Implemented call ICs. Now time to do SSI based ICs.
Created attachment 436606 [details]
WIP
Created attachment 436692 [details]
WIP
Created attachment 436747 [details]
WIP
Created attachment 436831 [details]
WIP
Created attachment 436839 [details]
WIP
Inline caching opcodes are done. Just a few more left to do.
Created attachment 436840 [details]
WIP
Only 7 opcodes left to write.
Created attachment 436962 [details]
patch
All opcodes are done (for 64-bit).
Time to start trying to actually compile it.
Created attachment 436981 [details]
patch
Created attachment 436982 [details]
WIP
Created attachment 436983 [details]
WIP
Created attachment 437050 [details]
WIP
Created attachment 437053 [details]
WIP
Created attachment 437056 [details]
WIP
Created attachment 437059 [details]
WIP
Created attachment 437060 [details]
WIP
Rebased. Time to start trying to compile this thing.
Created attachment 437080 [details]
WIP
Parts of it are starting to compile
Created attachment 437099 [details]
WIP
Created attachment 437107 [details]
WIP
Created attachment 437108 [details]
WIP
debug now builds!
Created attachment 437224 [details]
WIP
Created attachment 437229 [details]
WIP
Created attachment 437285 [details]
WIP
Many tests pass now!
Created attachment 437290 [details]
WIP
Created attachment 437291 [details]
WIP
Created attachment 437307 [details]
WIP
Created attachment 437324 [details]
WIP
An initial version of sharing appears to work, but slows down things. Time for the fun part, I guess.
Created attachment 437331 [details]
WIP
Created attachment 437559 [details]
WIP
Created attachment 437583 [details]
WIP
Created attachment 437586 [details]
WIP
Created attachment 437591 [details]
WIP
Created attachment 437592 [details]
WIP
Created attachment 437652 [details]
WIP
Moved ValueProfiles to UnlinkedCodeBlock
Created attachment 438430 [details]
WIP
rebased
Created attachment 438431 [details]
WIP
Created attachment 438433 [details]
WIP
Created attachment 438541 [details]
WIP
Resolved some perf issues.
Created attachment 438629 [details]
WIP
Created attachment 438630 [details]
WIP
Created attachment 438736 [details]
WIP
Created attachment 438747 [details]
WIP
Created attachment 438757 [details]
WIP
Created attachment 438774 [details]
WIP
Created attachment 438777 [details]
WIP
Created attachment 438851 [details]
WIP
Release tests are passing on arm64
Created attachment 438872 [details]
WIP
Created attachment 438901 [details]
WIP
Created attachment 438907 [details]
WIP
Created attachment 439056 [details]
WIP
Created attachment 439110 [details]
WIP
Created attachment 439111 [details]
WIP
Created attachment 439113 [details]
WIP
rebased
Things seem to now be working both on arm64 and x86_64
Created attachment 439158 [details]
WIP
Created attachment 439173 [details]
WIP
Created attachment 439182 [details]
WIP
Created attachment 439185 [details]
patch
Created attachment 439189 [details]
patch
Still tryna make some 32-bit code compile.
Created attachment 439190 [details]
patch
Created attachment 439194 [details]
patch
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. Created attachment 439203 [details]
patch
Try to fix some of the builds.
Created attachment 439204 [details]
patch
Created attachment 439206 [details]
patch
Created attachment 439207 [details]
patch
Created attachment 439211 [details]
patch
Created attachment 439230 [details]
patch for landing
Created attachment 439237 [details]
patch for landing
Hopefully this fixes the Windows bug.
Created attachment 439240 [details]
patch for landing
Hopefully windows is actually fixed now.
Created attachment 439266 [details]
patch for landing
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]. 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) 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 Re-opened since this is blocked by bug 230806 Created attachment 439312 [details]
test windows
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. Created attachment 439326 [details]
[fast-cq] patch for landing
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]. Committed r283103 (242161@main): <https://commits.webkit.org/242161@main> Committed r283104 (242162@main): <https://commits.webkit.org/242162@main> Re-opened since this is blocked by bug 230854 Created attachment 439386 [details]
[fast-cq] patch for landing
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]. |