Open Bug 1831773 Opened 2 years ago Updated 4 months ago

(Experimental) Enable GVNing of MWasmLoadFieldKA et al

Categories

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

enhancement

Tracking

()

ASSIGNED

People

(Reporter: jseward, Assigned: bvisness, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

It may or may not be useful to have a MWasmLoadFieldKA::congruentTo that can
sometimes return true. This would facilitate GVNing and possibly LICMing of
field reads, but only in the case where the object ref type is non-nullable,
so we know the reads can't trap. The same might be true for the non-KA
version, and also for array reads.

I'm less than convinced that this is actually useful, given that both GVN and
LICM of struct/array reads can easily enough be done by front end compilers.
It's also unclear to me whether our alias analysis system works well enough to
make this safe -- in particular, can we always guarantee that the
transformation is not done if there is an intervening write to the field
between two reads we might wish to common up?

Nevertheless filing this bug so it at least can be a parking place for
investigations and patches.

Does GVN for struct and array gets. Also tidies up the propagation of needs-trap info for struct and array gets and sets.

Attachment #9332047 - Attachment is obsolete: true

Did we ever get results to indicate if this would help? Marking as P5 under the assumption we didn't.

Severity: -- → N/A
Flags: needinfo?(jseward)
Priority: -- → P5
Assignee: jseward → bvisness
Status: NEW → ASSIGNED
Blocks: wasm-gc-perf
No longer blocks: wasm-gc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: