aot compiler: Propagate const-ness by ourselves (#3567)
aot_load_const_from_table() hides the const-ness of the value and prevents optimizations like https://github.com/bytecodealliance/wasm-micro-runtime/pull/3552. This commit makes the aot compiler tracks the const-ness of the value directly in the AOTValue and enables the above mentioned optimization for XIP.
This commit is contained in:
@ -75,10 +75,12 @@ typedef struct AOTValue {
|
||||
struct AOTValue *next;
|
||||
struct AOTValue *prev;
|
||||
LLVMValueRef value;
|
||||
uint64 const_value; /* valid if is_const is true */
|
||||
uint32 local_idx;
|
||||
/* VALUE_TYPE_I32/I64/F32/F64/VOID */
|
||||
uint8 type;
|
||||
bool is_local;
|
||||
uint32 local_idx;
|
||||
bool is_const;
|
||||
} AOTValue;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user