Closed Bug 1439578 Opened 4 years ago Closed 2 months ago

Wasm baseline: Do not generate out-of-line code if it is not referenced

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: lth, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On ARM64 the saturating truncation ops have exactly the same semantics, so there is never a need to go out-of-line to handle special cases.  Yet the baseline compiler will generate out-of-line code because it does not know that.

However, since the out-of-line code is generated late, we should be able to avoid generating it if its entry label is never referenced, as it won't be for the saturating ops.

The alternative to sniffing at the entry label is to export some kind of predicate from MacroAssembler.h or to have ifdefs in the baseline compiler that "knows" this, but both of those cross the compiler/masm boundary in unpleasant ways.
Component: JavaScript Engine: JIT → Javascript: Web Assembly
Type: defect → enhancement
Assignee: nobody → rhunt

This commit implements the simple approach of not emitting an
OOL stub for baseline if it's entry label is not used.

Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/165bc67e941d
wasm: Don't emit OOL code if it's not used. r=lth
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.