aot_llvm.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #ifndef _AOT_LLVM_H_
  6. #define _AOT_LLVM_H_
  7. #include "aot.h"
  8. #include "llvm/Config/llvm-config.h"
  9. #include "llvm-c/Types.h"
  10. #include "llvm-c/Target.h"
  11. #include "llvm-c/Core.h"
  12. #include "llvm-c/Object.h"
  13. #include "llvm-c/OrcEE.h"
  14. #include "llvm-c/ExecutionEngine.h"
  15. #include "llvm-c/Analysis.h"
  16. #include "llvm-c/BitWriter.h"
  17. #if LLVM_VERSION_MAJOR < 17
  18. #include "llvm-c/Transforms/Utils.h"
  19. #include "llvm-c/Transforms/Scalar.h"
  20. #include "llvm-c/Transforms/Vectorize.h"
  21. #include "llvm-c/Transforms/PassManagerBuilder.h"
  22. #include "llvm-c/Initialization.h"
  23. #endif
  24. #include "llvm-c/Orc.h"
  25. #include "llvm-c/Error.h"
  26. #include "llvm-c/Support.h"
  27. #include "llvm-c/TargetMachine.h"
  28. #include "llvm-c/LLJIT.h"
  29. #if WASM_ENABLE_DEBUG_AOT != 0
  30. #include "llvm-c/DebugInfo.h"
  31. #endif
  32. #include "aot_orc_extra.h"
  33. #include "aot_comp_option.h"
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if LLVM_VERSION_MAJOR < 14
  38. #define LLVMBuildLoad2(builder, type, value, name) \
  39. LLVMBuildLoad(builder, value, name)
  40. #define LLVMBuildCall2(builder, type, func, args, num_args, name) \
  41. LLVMBuildCall(builder, func, args, num_args, name)
  42. #define LLVMBuildInBoundsGEP2(builder, type, ptr, indices, num_indices, name) \
  43. LLVMBuildInBoundsGEP(builder, ptr, indices, num_indices, name)
  44. #else
  45. /* Opaque pointer type */
  46. #define OPQ_PTR_TYPE INT8_PTR_TYPE
  47. #endif
  48. #ifndef NDEBUG
  49. #undef DEBUG_PASS
  50. #undef DUMP_MODULE
  51. // #define DEBUG_PASS
  52. // #define DUMP_MODULE
  53. #else
  54. #undef DEBUG_PASS
  55. #undef DUMP_MODULE
  56. #endif
  57. struct AOTValueSlot;
  58. /**
  59. * Value in the WASM operation stack, each stack element
  60. * is an LLVM value
  61. */
  62. typedef struct AOTValue {
  63. struct AOTValue *next;
  64. struct AOTValue *prev;
  65. LLVMValueRef value;
  66. /* VALUE_TYPE_I32/I64/F32/F64/VOID */
  67. uint8 type;
  68. bool is_local;
  69. uint32 local_idx;
  70. } AOTValue;
  71. /**
  72. * Value stack, represents stack elements in a WASM block
  73. */
  74. typedef struct AOTValueStack {
  75. AOTValue *value_list_head;
  76. AOTValue *value_list_end;
  77. } AOTValueStack;
  78. /* Record information of a value slot of local variable or stack
  79. during translation */
  80. typedef struct AOTValueSlot {
  81. /* The LLVM value of this slot */
  82. LLVMValueRef value;
  83. /* The value type of this slot */
  84. uint8 type;
  85. /* The dirty bit of the value slot. It's set if the value in
  86. register is newer than the value in memory. */
  87. uint32 dirty : 1;
  88. /* Whether the new value in register is a reference, which is valid
  89. only when the dirty bit is set. */
  90. uint32 ref : 1;
  91. /* Committed reference flag:
  92. 0: uncommitted, 1: not-reference, 2: reference */
  93. uint32 committed_ref : 2;
  94. } AOTValueSlot;
  95. /* Frame information for translation */
  96. typedef struct AOTCompFrame {
  97. /* The current compilation context */
  98. struct AOTCompContext *comp_ctx;
  99. /* The current function context */
  100. struct AOTFuncContext *func_ctx;
  101. /* The current instruction pointer which is being compiled */
  102. const uint8 *frame_ip;
  103. /* Max local slot number */
  104. uint32 max_local_cell_num;
  105. /* Max operand stack slot number */
  106. uint32 max_stack_cell_num;
  107. /* Size of current AOTFrame/WASMInterpFrame */
  108. uint32 cur_frame_size;
  109. /* Stack top pointer */
  110. AOTValueSlot *sp;
  111. /* Local variables + stack operands */
  112. AOTValueSlot lp[1];
  113. } AOTCompFrame;
  114. typedef struct AOTBlock {
  115. struct AOTBlock *next;
  116. struct AOTBlock *prev;
  117. /* Block index */
  118. uint32 block_index;
  119. /* LABEL_TYPE_BLOCK/LOOP/IF/FUNCTION */
  120. uint32 label_type;
  121. /* Whether it is reachable */
  122. bool is_reachable;
  123. /* Whether skip translation of wasm else branch */
  124. bool skip_wasm_code_else;
  125. /* code of else opcode of this block, if it is a IF block */
  126. uint8 *wasm_code_else;
  127. /* code end of this block */
  128. uint8 *wasm_code_end;
  129. /* LLVM label points to code begin */
  130. LLVMBasicBlockRef llvm_entry_block;
  131. /* LLVM label points to code else */
  132. LLVMBasicBlockRef llvm_else_block;
  133. /* LLVM label points to code end */
  134. LLVMBasicBlockRef llvm_end_block;
  135. /* WASM operation stack */
  136. AOTValueStack value_stack;
  137. /* Param count/types/PHIs of this block */
  138. uint32 param_count;
  139. uint8 *param_types;
  140. LLVMValueRef *param_phis;
  141. LLVMValueRef *else_param_phis;
  142. /* Result count/types/PHIs of this block */
  143. uint32 result_count;
  144. uint8 *result_types;
  145. LLVMValueRef *result_phis;
  146. /* The begin frame stack pointer of this block */
  147. AOTValueSlot *frame_sp_begin;
  148. /* The max frame stack pointer that br/br_if/br_table/br_on_xxx
  149. opcodes ever reached when they jumped to the end this block */
  150. AOTValueSlot *frame_sp_max_reached;
  151. } AOTBlock;
  152. /**
  153. * Block stack, represents WASM block stack elements
  154. */
  155. typedef struct AOTBlockStack {
  156. AOTBlock *block_list_head;
  157. AOTBlock *block_list_end;
  158. /* Current block index of each block type */
  159. uint32 block_index[3];
  160. } AOTBlockStack;
  161. typedef struct AOTCheckedAddr {
  162. struct AOTCheckedAddr *next;
  163. uint32 local_idx;
  164. uint32 offset;
  165. uint32 bytes;
  166. } AOTCheckedAddr, *AOTCheckedAddrList;
  167. typedef struct AOTMemInfo {
  168. LLVMValueRef mem_base_addr;
  169. LLVMValueRef mem_data_size_addr;
  170. LLVMValueRef mem_cur_page_count_addr;
  171. LLVMValueRef mem_bound_check_1byte;
  172. LLVMValueRef mem_bound_check_2bytes;
  173. LLVMValueRef mem_bound_check_4bytes;
  174. LLVMValueRef mem_bound_check_8bytes;
  175. LLVMValueRef mem_bound_check_16bytes;
  176. } AOTMemInfo;
  177. typedef struct AOTFuncContext {
  178. AOTFunc *aot_func;
  179. LLVMValueRef func;
  180. LLVMValueRef precheck_func;
  181. LLVMTypeRef func_type;
  182. LLVMModuleRef module;
  183. AOTBlockStack block_stack;
  184. LLVMValueRef exec_env;
  185. LLVMValueRef aot_inst;
  186. LLVMValueRef argv_buf;
  187. LLVMValueRef native_stack_bound;
  188. LLVMValueRef native_stack_top_min_addr;
  189. LLVMValueRef aux_stack_bound;
  190. LLVMValueRef aux_stack_bottom;
  191. LLVMValueRef native_symbol;
  192. LLVMValueRef func_ptrs;
  193. AOTMemInfo *mem_info;
  194. LLVMValueRef cur_exception;
  195. LLVMValueRef cur_frame;
  196. LLVMValueRef cur_frame_ptr;
  197. LLVMValueRef wasm_stack_top_bound;
  198. LLVMValueRef wasm_stack_top_ptr;
  199. bool mem_space_unchanged;
  200. AOTCheckedAddrList checked_addr_list;
  201. LLVMBasicBlockRef got_exception_block;
  202. LLVMBasicBlockRef func_return_block;
  203. LLVMValueRef exception_id_phi;
  204. /* current ip when exception is thrown */
  205. LLVMValueRef exception_ip_phi;
  206. LLVMValueRef func_type_indexes;
  207. #if WASM_ENABLE_DEBUG_AOT != 0
  208. LLVMMetadataRef debug_func;
  209. #endif
  210. unsigned int stack_consumption_for_func_call;
  211. LLVMValueRef locals[1];
  212. } AOTFuncContext;
  213. typedef struct AOTLLVMTypes {
  214. LLVMTypeRef int1_type;
  215. LLVMTypeRef int8_type;
  216. LLVMTypeRef int16_type;
  217. LLVMTypeRef int32_type;
  218. LLVMTypeRef int64_type;
  219. LLVMTypeRef intptr_t_type;
  220. LLVMTypeRef size_t_type;
  221. LLVMTypeRef float32_type;
  222. LLVMTypeRef float64_type;
  223. LLVMTypeRef void_type;
  224. LLVMTypeRef int8_ptr_type;
  225. LLVMTypeRef int8_pptr_type;
  226. LLVMTypeRef int16_ptr_type;
  227. LLVMTypeRef int32_ptr_type;
  228. LLVMTypeRef int64_ptr_type;
  229. LLVMTypeRef intptr_t_ptr_type;
  230. LLVMTypeRef float32_ptr_type;
  231. LLVMTypeRef float64_ptr_type;
  232. LLVMTypeRef v128_type;
  233. LLVMTypeRef v128_ptr_type;
  234. LLVMTypeRef i8x16_vec_type;
  235. LLVMTypeRef i16x8_vec_type;
  236. LLVMTypeRef i32x4_vec_type;
  237. LLVMTypeRef i64x2_vec_type;
  238. LLVMTypeRef f32x4_vec_type;
  239. LLVMTypeRef f64x2_vec_type;
  240. LLVMTypeRef int8_ptr_type_gs;
  241. LLVMTypeRef int16_ptr_type_gs;
  242. LLVMTypeRef int32_ptr_type_gs;
  243. LLVMTypeRef int64_ptr_type_gs;
  244. LLVMTypeRef float32_ptr_type_gs;
  245. LLVMTypeRef float64_ptr_type_gs;
  246. LLVMTypeRef v128_ptr_type_gs;
  247. LLVMTypeRef i1x2_vec_type;
  248. LLVMTypeRef meta_data_type;
  249. LLVMTypeRef funcref_type;
  250. LLVMTypeRef externref_type;
  251. LLVMTypeRef gc_ref_type;
  252. LLVMTypeRef gc_ref_ptr_type;
  253. } AOTLLVMTypes;
  254. typedef struct AOTLLVMConsts {
  255. LLVMValueRef i1_zero;
  256. LLVMValueRef i1_one;
  257. LLVMValueRef i8_zero;
  258. LLVMValueRef i8_one;
  259. LLVMValueRef i32_zero;
  260. LLVMValueRef i64_zero;
  261. LLVMValueRef f32_zero;
  262. LLVMValueRef f64_zero;
  263. LLVMValueRef i32_one;
  264. LLVMValueRef i32_two;
  265. LLVMValueRef i32_three;
  266. LLVMValueRef i32_four;
  267. LLVMValueRef i32_five;
  268. LLVMValueRef i32_six;
  269. LLVMValueRef i32_seven;
  270. LLVMValueRef i32_eight;
  271. LLVMValueRef i32_nine;
  272. LLVMValueRef i32_ten;
  273. LLVMValueRef i32_eleven;
  274. LLVMValueRef i32_twelve;
  275. LLVMValueRef i32_thirteen;
  276. LLVMValueRef i32_fourteen;
  277. LLVMValueRef i32_fifteen;
  278. LLVMValueRef i32_neg_one;
  279. LLVMValueRef i64_neg_one;
  280. LLVMValueRef i32_min;
  281. LLVMValueRef i64_min;
  282. LLVMValueRef i32_31;
  283. LLVMValueRef i32_32;
  284. LLVMValueRef i64_63;
  285. LLVMValueRef i64_64;
  286. LLVMValueRef i8x16_vec_zero;
  287. LLVMValueRef i16x8_vec_zero;
  288. LLVMValueRef i32x4_vec_zero;
  289. LLVMValueRef i64x2_vec_zero;
  290. LLVMValueRef f32x4_vec_zero;
  291. LLVMValueRef f64x2_vec_zero;
  292. LLVMValueRef i8x16_undef;
  293. LLVMValueRef i16x8_undef;
  294. LLVMValueRef i32x4_undef;
  295. LLVMValueRef i64x2_undef;
  296. LLVMValueRef f32x4_undef;
  297. LLVMValueRef f64x2_undef;
  298. LLVMValueRef i32x16_zero;
  299. LLVMValueRef i32x8_zero;
  300. LLVMValueRef i32x4_zero;
  301. LLVMValueRef i32x2_zero;
  302. LLVMValueRef gc_ref_null;
  303. LLVMValueRef i8_ptr_null;
  304. } AOTLLVMConsts;
  305. /**
  306. * Compiler context
  307. */
  308. typedef struct AOTCompContext {
  309. const AOTCompData *comp_data;
  310. /* LLVM variables required to emit LLVM IR */
  311. LLVMContextRef context;
  312. LLVMBuilderRef builder;
  313. #if WASM_ENABLE_DEBUG_AOT
  314. LLVMDIBuilderRef debug_builder;
  315. LLVMMetadataRef debug_file;
  316. LLVMMetadataRef debug_comp_unit;
  317. #endif
  318. LLVMTargetMachineRef target_machine;
  319. char *target_cpu;
  320. char target_arch[16];
  321. unsigned pointer_size;
  322. /* Hardware intrinsic compatibility flags */
  323. uint64 flags[8];
  324. /* required by JIT */
  325. LLVMOrcLLLazyJITRef orc_jit;
  326. LLVMOrcThreadSafeContextRef orc_thread_safe_context;
  327. LLVMModuleRef module;
  328. bool is_jit_mode;
  329. /* AOT indirect mode flag & symbol list */
  330. bool is_indirect_mode;
  331. bh_list native_symbols;
  332. /* Bulk memory feature */
  333. bool enable_bulk_memory;
  334. /* Boundary Check */
  335. bool enable_bound_check;
  336. /* Native stack boundary Check */
  337. bool enable_stack_bound_check;
  338. /* Native stack usage estimation */
  339. bool enable_stack_estimation;
  340. /* 128-bit SIMD */
  341. bool enable_simd;
  342. /* Auxiliary stack overflow/underflow check */
  343. bool enable_aux_stack_check;
  344. /* Generate auxiliary stack frame */
  345. bool enable_aux_stack_frame;
  346. /* Function performance profiling */
  347. bool enable_perf_profiling;
  348. /* Memory usage profiling */
  349. bool enable_memory_profiling;
  350. /* Thread Manager */
  351. bool enable_thread_mgr;
  352. /* Tail Call */
  353. bool enable_tail_call;
  354. /* Reference Types */
  355. bool enable_ref_types;
  356. /* Disable LLVM built-in intrinsics */
  357. bool disable_llvm_intrinsics;
  358. /* Disable LLVM link time optimization */
  359. bool disable_llvm_lto;
  360. /* Enable LLVM PGO (Profile-Guided Optimization) */
  361. bool enable_llvm_pgo;
  362. /* Treat unknown import function as wasm-c-api import function
  363. and allow to directly invoke it from AOT/JIT code */
  364. bool quick_invoke_c_api_import;
  365. /* Use profile file collected by LLVM PGO */
  366. char *use_prof_file;
  367. /* Enable to use segment register as the base addr
  368. of linear memory for load/store operations */
  369. bool enable_segue_i32_load;
  370. bool enable_segue_i64_load;
  371. bool enable_segue_f32_load;
  372. bool enable_segue_f64_load;
  373. bool enable_segue_v128_load;
  374. bool enable_segue_i32_store;
  375. bool enable_segue_i64_store;
  376. bool enable_segue_f32_store;
  377. bool enable_segue_f64_store;
  378. bool enable_segue_v128_store;
  379. /* Whether optimize the JITed code */
  380. bool optimize;
  381. bool emit_frame_pointer;
  382. /* Enable GC */
  383. bool enable_gc;
  384. uint32 opt_level;
  385. uint32 size_level;
  386. /* LLVM floating-point rounding mode metadata */
  387. LLVMValueRef fp_rounding_mode;
  388. /* LLVM floating-point exception behavior metadata */
  389. LLVMValueRef fp_exception_behavior;
  390. /* a global array to store stack sizes */
  391. LLVMTypeRef stack_sizes_type;
  392. LLVMValueRef stack_sizes;
  393. uint32 *jit_stack_sizes; /* for JIT */
  394. /* LLVM data types */
  395. AOTLLVMTypes basic_types;
  396. LLVMTypeRef exec_env_type;
  397. LLVMTypeRef aot_inst_type;
  398. /* LLVM const values */
  399. AOTLLVMConsts llvm_consts;
  400. /* Function contexts */
  401. AOTFuncContext **func_ctxes;
  402. uint32 func_ctx_count;
  403. char **custom_sections_wp;
  404. uint32 custom_sections_count;
  405. /* 3rd-party toolchains */
  406. /* External llc compiler, if specified, wamrc will emit the llvm-ir file and
  407. * invoke the llc compiler to generate object file.
  408. * This can be used when we want to benefit from the optimization of other
  409. * LLVM based toolchains */
  410. const char *external_llc_compiler;
  411. const char *llc_compiler_flags;
  412. /* External asm compiler, if specified, wamrc will emit the text-based
  413. * assembly file (.s) and invoke the llc compiler to generate object file.
  414. * This will be useful when the upstream LLVM doesn't support to emit object
  415. * file for some architecture (such as arc) */
  416. const char *external_asm_compiler;
  417. const char *asm_compiler_flags;
  418. const char *stack_usage_file;
  419. char stack_usage_temp_file[64];
  420. const char *llvm_passes;
  421. const char *builtin_intrinsics;
  422. /* Current frame information for translation */
  423. AOTCompFrame *aot_frame;
  424. } AOTCompContext;
  425. enum {
  426. AOT_FORMAT_FILE,
  427. AOT_OBJECT_FILE,
  428. AOT_LLVMIR_UNOPT_FILE,
  429. AOT_LLVMIR_OPT_FILE,
  430. };
  431. bool
  432. aot_compiler_init(void);
  433. void
  434. aot_compiler_destroy(void);
  435. AOTCompContext *
  436. aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option);
  437. void
  438. aot_destroy_comp_context(AOTCompContext *comp_ctx);
  439. int32
  440. aot_get_native_symbol_index(AOTCompContext *comp_ctx, const char *symbol);
  441. bool
  442. aot_compile_wasm(AOTCompContext *comp_ctx);
  443. uint8 *
  444. aot_emit_elf_file(AOTCompContext *comp_ctx, uint32 *p_elf_file_size);
  445. void
  446. aot_destroy_elf_file(uint8 *elf_file);
  447. void
  448. aot_value_stack_push(const AOTCompContext *comp_ctx, AOTValueStack *stack,
  449. AOTValue *value);
  450. AOTValue *
  451. aot_value_stack_pop(const AOTCompContext *comp_ctx, AOTValueStack *stack);
  452. void
  453. aot_value_stack_destroy(AOTCompContext *comp_ctx, AOTValueStack *stack);
  454. void
  455. aot_block_stack_push(AOTBlockStack *stack, AOTBlock *block);
  456. AOTBlock *
  457. aot_block_stack_pop(AOTBlockStack *stack);
  458. void
  459. aot_block_stack_destroy(AOTCompContext *comp_ctx, AOTBlockStack *stack);
  460. void
  461. aot_block_destroy(AOTCompContext *comp_ctx, AOTBlock *block);
  462. LLVMTypeRef
  463. wasm_type_to_llvm_type(const AOTCompContext *comp_ctx,
  464. const AOTLLVMTypes *llvm_types, uint8 wasm_type);
  465. bool
  466. aot_checked_addr_list_add(AOTFuncContext *func_ctx, uint32 local_idx,
  467. uint32 offset, uint32 bytes);
  468. void
  469. aot_checked_addr_list_del(AOTFuncContext *func_ctx, uint32 local_idx);
  470. bool
  471. aot_checked_addr_list_find(AOTFuncContext *func_ctx, uint32 local_idx,
  472. uint32 offset, uint32 bytes);
  473. void
  474. aot_checked_addr_list_destroy(AOTFuncContext *func_ctx);
  475. bool
  476. aot_build_zero_function_ret(const AOTCompContext *comp_ctx,
  477. AOTFuncContext *func_ctx, AOTFuncType *func_type);
  478. LLVMValueRef
  479. aot_call_llvm_intrinsic(const AOTCompContext *comp_ctx,
  480. const AOTFuncContext *func_ctx, const char *intrinsic,
  481. LLVMTypeRef ret_type, LLVMTypeRef *param_types,
  482. int param_count, ...);
  483. LLVMValueRef
  484. aot_call_llvm_intrinsic_v(const AOTCompContext *comp_ctx,
  485. const AOTFuncContext *func_ctx, const char *intrinsic,
  486. LLVMTypeRef ret_type, LLVMTypeRef *param_types,
  487. int param_count, va_list param_value_list);
  488. LLVMValueRef
  489. aot_get_func_from_table(const AOTCompContext *comp_ctx, LLVMValueRef base,
  490. LLVMTypeRef func_type, int32 index);
  491. LLVMValueRef
  492. aot_load_const_from_table(AOTCompContext *comp_ctx, LLVMValueRef base,
  493. const WASMValue *value, uint8 value_type);
  494. bool
  495. aot_check_simd_compatibility(const char *arch_c_str, const char *cpu_c_str);
  496. void
  497. aot_add_expand_memory_op_pass(LLVMPassManagerRef pass);
  498. void
  499. aot_add_simple_loop_unswitch_pass(LLVMPassManagerRef pass);
  500. void
  501. aot_apply_llvm_new_pass_manager(AOTCompContext *comp_ctx, LLVMModuleRef module);
  502. void
  503. aot_handle_llvm_errmsg(const char *string, LLVMErrorRef err);
  504. char *
  505. aot_compress_aot_func_names(AOTCompContext *comp_ctx, uint32 *p_size);
  506. bool
  507. aot_set_cond_br_weights(AOTCompContext *comp_ctx, LLVMValueRef cond_br,
  508. int32 weights_true, int32 weights_false);
  509. bool
  510. aot_target_precheck_can_use_musttail(const AOTCompContext *comp_ctx);
  511. unsigned int
  512. aot_estimate_stack_usage_for_function_call(const AOTCompContext *comp_ctx,
  513. const AOTFuncType *callee_func_type);
  514. #ifdef __cplusplus
  515. } /* end of extern "C" */
  516. #endif
  517. #endif /* end of _AOT_LLVM_H_ */