Closed Bug 1650038 Opened 5 years ago Closed 4 years ago

Cranelift: do inline checks for table.get/set before resorting to a VM call for GC barriers

Categories

(Core :: JavaScript: WebAssembly, enhancement, P5)

enhancement

Tracking

()

RESOLVED INACTIVE

People

(Reporter: bbouvier, Unassigned)

References

Details

Now that the FuncEnvironment for translating wasm to clif for table.get/set contains a FunctionBuilder, we have access to primitives to create local control flow when lowering these operands, making it possible to add some inline checks before the VM call (for the GC barrier). This would result in the VM call being executed fewer times, so it could be a nice speedup for code using reftypes.

Priority: -- → P3
Priority: P3 → P5

Julian, can you upstream this to the alliance and then close this one? Thanks.

Flags: needinfo?(jseward)

(In reply to Lars T Hansen [:lth] from comment #1)

(From consultation with Benjamin) this is something that has to happen on the SM
side, not on the CL side. Specifically, fn translate_custom_global_set in
js/src/wasm/cranelift/src/wasm2clif.rs.

Flags: needinfo?(jseward)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.