Avoid generating some unused LLVM IRs (#1696)

Refine the generated LLVM IRs at the beginning of each LLVM AOT/JIT function
to fasten the LLVM IR optimization:
- Only create argv_buf if there are func calls in this function
- Only create native stack bound if stack bound check is enabled
- Only create aux stack info if there is opcode set_global_aux_stack
- Only create native symbol if indirect_mode is enabled
- Only create memory info if there are memory operations
- Only create func_type_indexes if there is opcode call_indirect
This commit is contained in:
Wenyong Huang
2022-11-14 14:32:35 +08:00
committed by GitHub
parent 4b0660cf24
commit c70e1ebc3d
5 changed files with 376 additions and 190 deletions

View File

@ -43,7 +43,7 @@ endif ()
# Override the global heap usage
if (NOT DEFINED WAMR_BUILD_GLOBAL_HEAP_POOL)
add_definitions (-DWASM_ENABLE_GLOBAL_HEAP_POOL=1)
endif
endif ()
# Override the global heap size for small devices
if (NOT DEFINED WAMR_BUILD_GLOBAL_HEAP_SIZE)