Open Bug 1949849 Opened 26 days ago Updated 19 days ago

Add a dedicated cast MIR node

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

People

(Reporter: rhunt, Assigned: rhunt)

References

(Depends on 2 open bugs, Blocks 4 open bugs)

Details

Attachments

(3 files)

For a ref.cast instruction we generate a control flow graph like:

MTest (MWasmRefTest)
|                     \
|                      \
MWasmTrap        Fallthrough...

This seems to give our register allocator a difficult time and results in a lot of spilling across what should just be a side exit. We shoould just fold this all into a dedicated MIR node.

Blocks: wasm-gc-perf

Copy the RefIsSubtypeOf nodes and create dedicated cast nodes.
The cast nodes return the value so that casted values have the
proper dependency relationship and can't get re-ordered past
the cast.

Blocks: wasm-ref-mir
No longer blocks: wasm-gc-perf
Depends on: 1949860
Blocks: 1949860
No longer depends on: 1949860
Depends on: 1892721
Blocks: 1825104
Attachment #9467763 - Attachment description: Bug 1949849 - Add MWasmRefCast(Abstract, Concrete) nodes. r?bvisness → WIP: Bug 1949849: Add MWasmRefCast(Abstract, Concrete) nodes. r=rhunt
Attachment #9467764 - Attachment description: Bug 1949849 - wasm: Rename 'RefIsSubtypeOf' to 'RefTest' in MIR for symmetry. r?bvisness → WIP: Bug 1949849: wasm: Rename 'RefIsSubtypeOf' to 'RefTest' in MIR for symmetry. r=rhunt
Blocks: 1934692
Attachment #9467763 - Attachment description: WIP: Bug 1949849: Add MWasmRefCast(Abstract, Concrete) nodes. r=rhunt → Bug 1949849: wasm: Add MWasmRefCast(Abstract, Concrete) nodes. r=rhunt
Attachment #9467764 - Attachment description: WIP: Bug 1949849: wasm: Rename 'RefIsSubtypeOf' to 'RefTest' in MIR for symmetry. r=rhunt → Bug 1949849: wasm: Rename 'RefIsSubtypeOf' to 'RefTest' in MIR for symmetry. r=rhunt
Attachment #9468704 - Attachment description: WIP: Bug 1949849: Convert MWasmTrapIfNull to MWasmRefAsNonNull → Bug 1949849: wasm: Convert MWasmTrapIfNull to MWasmRefAsNonNull. r=rhunt
Depends on: 1951158
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: