Closed Bug 1074102 Opened 10 years ago Closed 4 years ago

[meta] SIMD backend: implement SIMD operations for ARM

Categories

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

ARM
All
task

Tracking

()

RESOLVED WONTFIX
Tracking Status
fennec + ---

People

(Reporter: dougc, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: meta)

Attachments

(3 files, 4 obsolete files)

This bug should serve as a meta-bug for referencing all patches implementing SIMD operations for the ARM 32-bit.
* We will need a solution to the current 64 bit limitation on the float register SetType. This is blocking real progress. Might be able to make some progress on the implementation of the SIMD operations without this by using some hacks and very restrictive tests.

* Early codegen results suggest we are going to need access to all 32 double float and all 16 128-bit SIMD registers for useful performance. Even the simple mandelbrot demo is full of SIMD registers spilled to the stack in the hot loop. With only 16 double float and thus 8 128-bit SIMD registers, and with one SIMD register dedicated as a scratch, there remain only 7 SIMD registers and each takes 2 double float or 4 float32 registers. Not blocking progress, but probably performance.
Depends on: 1052384, 891211
Blocks: 947711
Attached patch Hack patch to get started. (obsolete) — Splinter Review
With this hack patch it is possible to run the mandelbrot asm.js demo on the ARM simulator. The SIMD codegen is not implemented so not yet emitted, but there is some plausible lowering implemented and the register allocation looks plausible. Even with this incredible hack the mandelbrot demo still runs in the browser and the non-simd code path works.

Here are the unimplemented operations needed for the mandelbrot demo:
emitFloat32X4Move
emitInt32X4Move
visitFloat32x4
visitInt32x4
visitSimdBinaryArithFx4 Add
visitSimdBinaryArithFx4 Mul
visitSimdBinaryArithFx4 Sub
visitSimdBinaryArithIx4 Add
visitSimdBinaryCompFx4 lessThanOrEqual
visitSimdExtractElementI
visitSimdSignMaskX4
visitSimdSplatX4 MIRType_Float32x4
visitSimdValueFloat32x4
Flags: needinfo?(benj)
Attached patch Hack patch to get started. (obsolete) — Splinter Review
Rebase. Update for the shift operation, and add stubs for the select operation.
Attachment #8497536 - Attachment is obsolete: true
Moved from bug 1074867. Carrying forward r+.
Attachment #8499627 - Flags: review+
Moved from bug 1074867. Carrying forward r+.
Attachment #8499630 - Flags: review-
My hope is to get some time later to carry on this hack, to see the mandelbrot demo alive on the ARM simulator on a browser, if anybody else doesn't do it before. Having the mandelbrot demo working with this hack would be very helpful for generalizing regalloc / typeregistersets.
Flags: needinfo?(benj)
Rebase. Carry forward r+.
Attachment #8499627 - Attachment is obsolete: true
Attachment #8510844 - Flags: review+
Attachment #8510844 - Attachment description: Move the insert-element lowering into the backends. → 1. Move the insert-element lowering into the backends.
Rebase. Carry forward r+.
Attachment #8499630 - Attachment is obsolete: true
Attachment #8510846 - Flags: review+
Rebased. Still works with the mandelbrot demo again - it compiles and generates plausible lower and register allocation but many of the SIMD code generation methods still need to be implemented.
Attachment #8498840 - Attachment is obsolete: true
Attachment #8510850 - Attachment description: 3. Hack patch to start implementikng SIMD operations for ARM → 3. Hack patch to start implementing SIMD operations for ARM
tracking-fennec: --- → ?
We're interested in getting this into Fennec. We're tracking for 36, but understand that maybe that won't happen.
tracking-fennec: ? → 36+
tracking-fennec: 36+ → ?
tracking-fennec: ? → +
Priority: -- → P5
Type: defect → enhancement
No longer blocks: 1478632
Blocks: wasm-simd
Severity: normal → N/A
Type: enhancement → task
Component: JavaScript Engine: JIT → Javascript: WebAssembly

We have no plans as of yet to support wasm SIMD on ARM; the future (for SpiderMonkey) is ARM64.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: