Optimization: Lower load
and store
operations by pruning types
#1302
Labels
optimization
An performance optimization issue.
Currently, the
wasmi_ir
crate supports theseload
operations among others:{I,F}{32,64}Load
{I,F}{32,64}LoadAt
{I,F}{32,64}LoadOffset16
As well as the following
store
operations among others:{F,I}{32,64}Store
I{32,64}StoreImm16
*{F,I}{32,64}StoreOffset16
I{32,64}StoreOffset16Imm16
*{F,I}{32,64}StoreAt
I{32,64}StoreAtImm16
*(*): The
Imm16
postfixed variants cannot be further generlized. The same applies to truncation-stores and extension-loads.Since Wasmi bytecode is executed without type safety or type checking we could easily lower all of these instructions down to
load
andstore
instructions that are just loading and storing a fixed number of bytes instead:Load{32,64}
Load{32,64}At
Load{32,64}Offset16
Store{32,64}
Store{32,64}Offset16
Store{32,64}At
Effects
The text was updated successfully, but these errors were encountered: