Skip to content

Commit e87a554

Browse files
authored
Refactor LLVM JIT (#1613)
Refactor LLVM JIT for some purposes: - To simplify the source code of JIT compilation - To simplify the JIT modes - To align with LLVM latest changes - To prepare for the Multi-tier JIT compilation, refer to #1302 The changes mainly include: - Remove the MCJIT mode, replace it with ORC JIT eager mode - Remove the LLVM legacy pass manager (only keep the LLVM new pass manager) - Change the lazy mode's LLVM module/function binding: change each function in an individual LLVM module into all functions in a single LLVM module - Upgraded ORC JIT to ORCv2 JIT to enable lazy compilation Refer to #1468
1 parent 84b1a6c commit e87a554

22 files changed

+1049
-1095
lines changed

.github/workflows/compilation_on_android_ubuntu.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ env:
3434
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3535
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3636
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
37-
LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
38-
MC_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
37+
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
38+
LLVM_LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
3939
# LLVM
4040
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
4141
# For Spec Test
@@ -184,8 +184,8 @@ jobs:
184184
$AOT_BUILD_OPTIONS,
185185
$CLASSIC_INTERP_BUILD_OPTIONS,
186186
$FAST_INTERP_BUILD_OPTIONS,
187-
$LAZY_JIT_BUILD_OPTIONS,
188-
$MC_JIT_BUILD_OPTIONS,
187+
$LLVM_EAGER_JIT_BUILD_OPTIONS,
188+
$LLVM_LAZY_JIT_BUILD_OPTIONS,
189189
]
190190
make_options_feature: [
191191
# Features
@@ -210,11 +210,11 @@ jobs:
210210
# uncompatiable feature and platform
211211
# uncompatiable mode and feature
212212
# MULTI_MODULE only on INTERP mode
213-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
213+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
214214
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
215-
- make_options_run_mode: $AOT_BUILD_OPTIONS
215+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
216216
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
217-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
217+
- make_options_run_mode: $AOT_BUILD_OPTIONS
218218
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
219219
# SIMD only on JIT/AOT mode
220220
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
@@ -224,9 +224,9 @@ jobs:
224224
# DEBUG_INTERP only on CLASSIC INTERP mode
225225
- make_options_run_mode: $AOT_BUILD_OPTIONS
226226
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
227-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
227+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
228228
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
229-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
229+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
230230
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
231231
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
232232
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
@@ -236,16 +236,16 @@ jobs:
236236
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
237237
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
238238
# TODO: DEBUG_AOT on JIT
239-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
239+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
240240
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
241-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
241+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
242242
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
243243
# MINI_LOADER only on INTERP mode
244244
- make_options_run_mode: $AOT_BUILD_OPTIONS
245245
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
246-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
246+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
247247
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
248-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
248+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
249249
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
250250
include:
251251
- os: ubuntu-20.04
@@ -293,11 +293,11 @@ jobs:
293293
matrix:
294294
make_options: [
295295
# Running mode
296+
$AOT_BUILD_OPTIONS,
296297
$CLASSIC_INTERP_BUILD_OPTIONS,
297298
$FAST_INTERP_BUILD_OPTIONS,
298-
$LAZY_JIT_BUILD_OPTIONS,
299-
$MC_JIT_BUILD_OPTIONS,
300-
$AOT_BUILD_OPTIONS,
299+
$LLVM_EAGER_JIT_BUILD_OPTIONS,
300+
$LLVM_LAZY_JIT_BUILD_OPTIONS,
301301
]
302302
os: [ubuntu-20.04, ubuntu-22.04]
303303
include:

.github/workflows/compilation_on_macos.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
env:
33+
# For BUILD
3334
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3435
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3536
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
36-
LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
37-
MC_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
37+
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
38+
LLVM_LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
39+
# LLVM
3840
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
3941

4042
jobs:
@@ -160,8 +162,8 @@ jobs:
160162
$AOT_BUILD_OPTIONS,
161163
$CLASSIC_INTERP_BUILD_OPTIONS,
162164
$FAST_INTERP_BUILD_OPTIONS,
163-
$LAZY_JIT_BUILD_OPTIONS,
164-
$MC_JIT_BUILD_OPTIONS,
165+
$LLVM_EAGER_JIT_BUILD_OPTIONS,
166+
$LLVM_LAZY_JIT_BUILD_OPTIONS,
165167
]
166168
make_options_feature: [
167169
# Features
@@ -187,11 +189,11 @@ jobs:
187189
# uncompatiable feature and platform
188190
# uncompatiable mode and feature
189191
# MULTI_MODULE only on INTERP mode
190-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
192+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
191193
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
192-
- make_options_run_mode: $AOT_BUILD_OPTIONS
194+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
193195
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
194-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
196+
- make_options_run_mode: $AOT_BUILD_OPTIONS
195197
make_options_feature: "-DWAMR_BUILD_MULTI_MODULE=1"
196198
# SIMD only on JIT/AOT mode
197199
- make_options_run_mode: $CLASSIC_INTERP_BUILD_OPTIONS
@@ -201,9 +203,9 @@ jobs:
201203
# DEBUG_INTERP only on CLASSIC INTERP mode
202204
- make_options_run_mode: $AOT_BUILD_OPTIONS
203205
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
204-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
206+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
205207
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
206-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
208+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
207209
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
208210
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
209211
make_options_feature: "-DWAMR_BUILD_DEBUG_INTERP=1"
@@ -213,16 +215,16 @@ jobs:
213215
- make_options_run_mode: $FAST_INTERP_BUILD_OPTIONS
214216
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
215217
# TODO: DEBUG_AOT on JIT
216-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
218+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
217219
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
218-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
220+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
219221
make_options_feature: "-DWAMR_BUILD_DEBUG_AOT=1"
220222
# MINI_LOADER only on INTERP mode
221223
- make_options_run_mode: $AOT_BUILD_OPTIONS
222224
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
223-
- make_options_run_mode: $LAZY_JIT_BUILD_OPTIONS
225+
- make_options_run_mode: $LLVM_EAGER_JIT_BUILD_OPTIONS
224226
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
225-
- make_options_run_mode: $MC_JIT_BUILD_OPTIONS
227+
- make_options_run_mode: $LLVM_LAZY_JIT_BUILD_OPTIONS
226228
make_options_feature: "-DWAMR_BUILD_MINI_LOADER=1"
227229
include:
228230
- os: macos-latest
@@ -271,9 +273,9 @@ jobs:
271273
$CLASSIC_INTERP_BUILD_OPTIONS,
272274
$FAST_INTERP_BUILD_OPTIONS,
273275
# doesn't support
274-
#$LAZY_JIT_BUILD_OPTIONS,
275-
#$MC_JIT_BUILD_OPTIONS,
276276
#$AOT_BUILD_OPTIONS,
277+
#$LLVM_EAGER_JIT_BUILD_OPTIONS,
278+
#$LLVM_LAZY_JIT_BUILD_OPTIONS,
277279
]
278280
os: [macos-latest]
279281
include:

.github/workflows/compilation_on_sgx.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
env:
33+
# For BUILD
3334
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3435
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
3536
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
36-
LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
37-
MC_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
37+
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
38+
LLVM_LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
39+
# LLVM
3840
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
3941

4042
jobs:
@@ -119,8 +121,8 @@ jobs:
119121
$CLASSIC_INTERP_BUILD_OPTIONS,
120122
$FAST_INTERP_BUILD_OPTIONS,
121123
# doesn't support
122-
# $LAZY_JIT_BUILD_OPTIONS,
123-
# $MC_JIT_BUILD_OPTIONS,
124+
#$LLVM_EAGER_JIT_BUILD_OPTIONS,
125+
#$LLVM_LAZY_JIT_BUILD_OPTIONS,
124126
]
125127
make_options_feature: [
126128
# Features
@@ -251,9 +253,9 @@ jobs:
251253
$CLASSIC_INTERP_BUILD_OPTIONS,
252254
$FAST_INTERP_BUILD_OPTIONS,
253255
# doesn't support
254-
#$LAZY_JIT_BUILD_OPTIONS,
255-
#$MC_JIT_BUILD_OPTIONS,
256256
#$AOT_BUILD_OPTIONS,
257+
#$LLVM_EAGER_JIT_BUILD_OPTIONS,
258+
#$LLVM_LAZY_JIT_BUILD_OPTIONS,
257259
]
258260
os: [ubuntu-20.04]
259261
include:

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ samples/socket-api/wasm-src/inc/pthread.h
3030

3131
**/__pycache__
3232

33-
# ignore benchmarks generated
3433
tests/benchmarks/coremark/coremark*

build-scripts/config_common.cmake

+5-5
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,9 @@ endif ()
8484
endif ()
8585

8686
if (WAMR_BUILD_JIT EQUAL 1)
87-
add_definitions("-DWASM_ENABLE_JIT=1")
8887
if (NOT WAMR_BUILD_LAZY_JIT EQUAL 0)
8988
# Enable Lazy JIT by default
9089
set (WAMR_BUILD_LAZY_JIT 1)
91-
add_definitions("-DWASM_ENABLE_LAZY_JIT=1")
9290
endif ()
9391
if (NOT DEFINED LLVM_DIR)
9492
set (LLVM_SRC_ROOT "${WAMR_ROOT_DIR}/core/deps/llvm")
@@ -148,13 +146,15 @@ else ()
148146
message (" WAMR Fast JIT disabled")
149147
endif ()
150148
if (WAMR_BUILD_JIT EQUAL 1)
149+
add_definitions("-DWASM_ENABLE_JIT=1")
151150
if (WAMR_BUILD_LAZY_JIT EQUAL 1)
152-
message (" WAMR LLVM Orc Lazy JIT enabled")
151+
add_definitions("-DWASM_ENABLE_LAZY_JIT=1")
152+
message (" WAMR LLVM ORC JIT enabled with Lazy Compilation")
153153
else ()
154-
message (" WAMR LLVM MC JIT enabled")
154+
message (" WAMR LLVM ORC JIT enabled with Eager Compilation")
155155
endif ()
156156
else ()
157-
message (" WAMR LLVM JIT disabled")
157+
message (" WAMR LLVM ORC JIT disabled")
158158
endif ()
159159
if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
160160
message (" Libc builtin enabled")

core/config.h

+17-11
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,26 @@
8181
#define WASM_ENABLE_LAZY_JIT 0
8282
#endif
8383

84-
#ifndef WASM_LAZY_JIT_COMPILE_THREAD_NUM
85-
#define WASM_LAZY_JIT_COMPILE_THREAD_NUM 4
84+
#ifndef WASM_ORC_JIT_BACKEND_THREAD_NUM
85+
/* The number of backend threads created by runtime */
86+
#define WASM_ORC_JIT_BACKEND_THREAD_NUM 4
87+
#endif
88+
89+
#if WASM_ORC_JIT_BACKEND_THREAD_NUM < 1
90+
#error "WASM_ORC_JIT_BACKEND_THREAD_NUM must be greater than 0"
91+
#endif
92+
93+
#ifndef WASM_ORC_JIT_COMPILE_THREAD_NUM
94+
/* The number of compilation threads created by LLVM JIT */
95+
#define WASM_ORC_JIT_COMPILE_THREAD_NUM 4
96+
#endif
97+
98+
#if WASM_ORC_JIT_COMPILE_THREAD_NUM < 1
99+
#error "WASM_ORC_JIT_COMPILE_THREAD_NUM must be greater than 0"
86100
#endif
87101

88102
#if (WASM_ENABLE_AOT == 0) && (WASM_ENABLE_JIT != 0)
89-
/* LazyJIT or MCJIT can only be enabled when AOT is enabled */
103+
/* LLVM JIT can only be enabled when AOT is enabled */
90104
#undef WASM_ENABLE_JIT
91105
#define WASM_ENABLE_JIT 0
92106

@@ -110,14 +124,6 @@
110124
#define WASM_ENABLE_WAMR_COMPILER 0
111125
#endif
112126

113-
#if WASM_ENABLE_WAMR_COMPILER != 0
114-
#ifndef WASM_ENABLE_LLVM_LEGACY_PM
115-
/* Whether to use LLVM legacy pass manager when building wamrc,
116-
by default it is disabled and LLVM new pass manager is used */
117-
#define WASM_ENABLE_LLVM_LEGACY_PM 0
118-
#endif
119-
#endif
120-
121127
#ifndef WASM_ENABLE_LIBC_BUILTIN
122128
#define WASM_ENABLE_LIBC_BUILTIN 0
123129
#endif

core/iwasm/aot/aot_runtime.c

+8
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,9 @@ aot_call_function(WASMExecEnv *exec_env, AOTFunctionInstance *function,
13211321
}
13221322
argc = func_type->param_cell_num;
13231323

1324+
/* func pointer was looked up previously */
1325+
bh_assert(function->u.func.func_ptr != NULL);
1326+
13241327
/* set thread handle and stack boundary */
13251328
wasm_exec_env_set_thread_info(exec_env);
13261329

@@ -1828,6 +1831,11 @@ aot_call_indirect(WASMExecEnv *exec_env, uint32 tbl_idx, uint32 table_elem_idx,
18281831
func_type_idx = func_type_indexes[func_idx];
18291832
func_type = aot_module->func_types[func_type_idx];
18301833

1834+
if (func_idx >= aot_module->import_func_count) {
1835+
/* func pointer was looked up previously */
1836+
bh_assert(func_ptrs[func_idx] != NULL);
1837+
}
1838+
18311839
if (!(func_ptr = func_ptrs[func_idx])) {
18321840
bh_assert(func_idx < aot_module->import_func_count);
18331841
import_func = aot_module->import_funcs + func_idx;

core/iwasm/aot/aot_runtime.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ typedef struct AOTModule {
148148

149149
/* function info */
150150
uint32 func_count;
151-
/* point to AOTed functions */
151+
/* func pointers of AOTed (un-imported) functions */
152152
void **func_ptrs;
153-
/* function type indexes */
153+
/* func type indexes of AOTed (un-imported) functions */
154154
uint32 *func_type_indexes;
155155

156156
/* export info */

0 commit comments

Comments
 (0)