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

NEW
Unassigned

Status

()

enhancement
P3
normal
2 years ago
4 months ago

People

(Reporter: lth, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

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
You need to log in before you can comment on or make changes to this bug.