Closed Bug 1676624 Opened 2 months ago Closed 2 months ago

Enable Cranelift as a compiler for wasm on AArch64 targets

Categories

(Core :: Javascript: WebAssembly, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: jseward, Assigned: jseward)

References

Details

Attachments

(1 file)

This patch enables Cranelift as a compiler for wasm on AArch64 targets. It
also tracks some minor interface changes in Cranelift, since SM needs the
latest cranelift sources to fully support wasm SIMD. This patch will need to
land at the same time as a patch that bumps the vendored-in CL version.

As a ridealong fix, CraneliftContext::threads_enabled is now initialised in
CraneliftContext:: CraneliftContext. It appears to have been uninitialised
until now.

This patch enables Cranelift as a compiler for wasm on AArch64 targets. It
also tracks some minor interface changes in Cranelift, since SM needs the
latest Cranelift sources to fully support wasm SIMD. This patch will need to
land at the same time as a patch that bumps the vendored-in CL version.

  • class CraneliftStaticEnvironment: new field simd_enabled.

  • constructor for CraneliftStaticEnvironment: ridealong fix: initialise
    threads_enabled. This appears to have been missing.

  • struct BD_ConstantValue and global_constantValue: handle V128-typed
    constants.

  • js/src/wasm/WasmJS.cpp: changes to gating logic

  • js/src/wasm/cranelift/src/bindings/mod.rs: handle V128-typed constants.

  • js/src/wasm/cranelift/src/compile.rs: ridealong fix to make debug output
    less verbose and easier to navigate

  • js/src/wasm/cranelift/src/wasm2clif.rs: Track initial multi-memory changes
    on the CL side

Parts of this patch were written by Benjamin Bouvier.

Assignee: nobody → jseward
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P1
Depends on: 1677452
Attachment #9187143 - Attachment description: Bug 1676624 - Enable Cranelift as a compiler for wasm on AArch64 targets. r=lth. → Bug 1676624 - Enable Cranelift as a compiler for wasm on AArch64 targets. r=lth.
Pushed by jseward@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c58c2d69f619
Enable Cranelift as a compiler for wasm on AArch64 targets. r=lth.
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Blocks: 1669463
You need to log in before you can comment on or make changes to this bug.