Closed
Bug 1680621
Opened 5 years ago
Closed 5 years ago
Warp: Check wasm argument types in CacheIR
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
85 Branch
| Tracking | Status | |
|---|---|---|
| firefox85 | --- | fixed |
People
(Reporter: iain, Assigned: iain)
References
Details
Attachments
(1 file)
When generating fast calls from Warp to wasm, we emit conversions in the transpiler that check the argument types, but don't generate equivalent guards in the baseline IC. This can cause bailout loops.
This patch moves the argument checks into CacheIR.
| Assignee | ||
Comment 1•5 years ago
|
||
The transpiler emits fallible conversions for wasm arguments when generating an optimized call into Wasm, but the baseline IC does not emit equivalent guards, which can cause bailout loops.
To fix this, this patch moves the argument conversion into CacheIR with a new GuardWasmArg op. In the baseline IC, GuardWasmArg verifies that the argument has a valid type. In the transpiler, GuardWasmArg generates the appropriate conversion.
Notes:
- For missing arguments, it's a little silly that
emitCallWasmFunctioncreates a constant undefined node and feeds it into a conversion instead of generating the result of the conversion, but I didn't want to synthesize a BigInt in WarpBuilder. If the performance matters, we should fix it inMToInt64::foldsTo. CodeGenerator::visitValueToBigInt(used for wasm::ValType::I64) already has support for booleans, so I fixedtryAttachWasmCallto match.- Code sharing between wasm call ICs will now be limited to calls with the same signature.
Updated•5 years ago
|
Assignee: nobody → iireland
Status: NEW → ASSIGNED
Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/76ca4d5bab5c
Move Wasm argument conversions into CacheIR r=jandem
Comment 3•5 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox85:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•