(Experimental) Enable GVNing of MWasmLoadFieldKA et al
Categories
(Core :: JavaScript: WebAssembly, enhancement, P5)
Tracking
()
People
(Reporter: jseward, Assigned: bvisness, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
51.94 KB,
patch
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
Does GVN for struct and array gets. Also tidies up the propagation of needs-trap info for struct and array gets and sets.
Comment 3•2 years ago
|
||
Did we ever get results to indicate if this would help? Marking as P5 under the assumption we didn't.
Assignee | ||
Updated•1 year ago
|
Updated•4 months ago
|
Description
•