Skip to content

Conversation

@FromLiQg
Copy link
Contributor

refine wasm_type_equal for call_indirect for intel internal #402
To Wenyong for code review, there is a bug in code and it cannot pass the case of spec (call_indirect.wast) while using these parameters:
Build iwasm with compile flags with
-DWAMR_BUILD_TARGET=X86_64
-DWAMR_BUILD_INTERP=0
-DWAMR_BUILD_FAST_INTERP=0
-DWAMR_BUILD_JIT=1
-DWAMR_BUILD_AOT=1
-DWAMR_BUILD_SPEC_TEST=1
-DWAMR_BUILD_BULK_MEMORY=1
-DWAMR_BUILD_MULTI_MODULE=0
-DWAMR_BUILD_REF_TYPES=1
-DWAMR_BUILD_SIMD=0 for spec test
Namespace(aot_flag=False, cases=[], clean_up_flag=True, gc_flag=False, multi_module_flag=False, multi_thread_flag=False, parl_flag=False, sgx_flag=False, simd_flag=False, target='X86_64', verbose_flag=True, xip_flag=False)
`

Copy link
Contributor

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little confused.

Use pointer comparison instead of struct memory comparison.
When using call_indirect, type comparison is required.
I optimized the speed of type comparison,
and changed type structure memory comparison to pointer comparison.
return node->str;
}


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also apply same changes to wasm_mini_loader.c, which can be compiled with 'cmake -DWAMR_BUILD_MINI_LOADER=1`.

Copy link
Collaborator

@xujuntwt95329 xujuntwt95329 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenyongh wenyongh merged commit 88bb4f3 into bytecodealliance:main Aug 18, 2022
loganek pushed a commit to loganek/wasm-micro-runtime that referenced this pull request Aug 31, 2022
Normalize wasm types, for the two wasm types, if their parameter types
and result types are the same, we only save one copy, so as to reduce
the footprint and simplify the type comparison in opcode CALL_INDIRECT.

And fix issue in interpreter globals_instantiate, and remove used codes.
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Normalize wasm types, for the two wasm types, if their parameter types
and result types are the same, we only save one copy, so as to reduce
the footprint and simplify the type comparison in opcode CALL_INDIRECT.

And fix issue in interpreter globals_instantiate, and remove used codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants