-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSC] Add lock / unlock mechanism to LRU in new wasm BBQ for scratch #10624
[JSC] Add lock / unlock mechanism to LRU in new wasm BBQ for scratch #10624
Conversation
670996b
to
60c03f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
Locally test it as built. Landing (since this is new BBQ, not enabled and not tested yet). |
EWS run on previous version of this PR (hash 8d757cc) |
EWS run on previous version of this PR (hash 4917257) |
EWS run on previous version of this PR (hash 0e34172) |
EWS run on current version of this PR (hash 670996b) |
EWS run on previous version of this PR (hash 60c03f0)
|
https://bugs.webkit.org/show_bug.cgi?id=252869 rdar://105856151 Reviewed by Justin Michaud. When a register is used for scratch, then we must not evict it while it is used since (1) we would like to have a register, and (2) there is no way to save and restore scratches. However we have no mechanism to prevent it, and we crash when running tfjs-wasm in JetStream3. This patch integrates lock and unlock mechanism for registers allocated for scratches. This lock / unlock names are derived from DFG's reigster allocator & Baseline JIT's IC register allocators. We mark scratches as locked, and they are not used for register allocation targets. We would like to expand this mechanism for the non scratch registers when it is currently used and we would like to lock it down right now. But in this patch, let's first do it for scratches. * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::LRU::findMin): (JSC::Wasm::BBQJIT::LRU::lock): (JSC::Wasm::BBQJIT::LRU::unlock): (JSC::Wasm::BBQJIT::ScratchScope::gpr const): (JSC::Wasm::BBQJIT::ScratchScope::fpr const): (JSC::Wasm::BBQJIT::ScratchScope::bindGPRToScratch): (JSC::Wasm::BBQJIT::ScratchScope::bindFPRToScratch): (JSC::Wasm::BBQJIT::ScratchScope::unbindGPRFromScratch): (JSC::Wasm::BBQJIT::ScratchScope::unbindFPRFromScratch): Canonical link: https://commits.webkit.org/260771@main
60c03f0
to
ffae772
Compare
Committed 260771@main (ffae772): https://commits.webkit.org/260771@main Reviewed commits have been landed. Closing PR #10624 and removing active labels. |
ffae772
670996b
🧪 style🛠 ios🛠 gtk🧪 webkitperl🧪 gtk-wk2🧪 api-gtk