Skip to content

[llvm-jit] Optimize LLVM JIT compile speed and make IR verification configurable#232

Merged
MacroModel merged 7 commits into
UlteSoft:masterfrom
MacroModel:master
May 25, 2026
Merged

[llvm-jit] Optimize LLVM JIT compile speed and make IR verification configurable#232
MacroModel merged 7 commits into
UlteSoft:masterfrom
MacroModel:master

Conversation

@MacroModel
Copy link
Copy Markdown
Member

No description provided.

- Replaced hardcoded `true` with a configurable `default_verify_llvm_jit_ir` flag in `runtime_local_func_llvm_jit_emit_state_t` and `compile_option` structures to enhance flexibility in JIT compilation.
- Refactored function signatures to utilize the new default verification flag, ensuring consistent behavior across the codebase.
- Introduced a utility function `should_verify_runtime_llvm_jit_ir` to conditionally verify LLVM modules during optimization, improving performance and maintainability.
- Updated documentation and comments to reflect changes in verification logic and its implications for JIT operations.
- Introduced `runtime_compile_threads_verbose_now` and `runtime_compile_threads_verbose_done` functions to track and log the duration of runtime compilation tasks.
- Replaced direct verbose logging calls with the new functions to improve consistency and maintainability in logging behavior.
- Enhanced logging output to include timestamps and detailed information about the completion of module translations, aiding in performance monitoring and debugging.
- Improved the verification logic in `verify_llvm_jit_function` and `verify_llvm_jit_module` to return early when verification is disabled, enhancing performance.
- Added timestamp logging for compile start and end times in lazy compilation processes, providing better insights into compilation durations.
- Updated error handling to include compile time logging in case of failures, improving debugging capabilities.
- Refactored logging functions to ensure consistent timestamp usage across different compilation contexts, enhancing overall logging clarity.
- Removed the `should_verify_lazy_llvm_jit_ir` function and replaced it with a direct boolean parameter `verify_llvm_jit_ir` in relevant functions to streamline verification logic.
- Updated `optimize_lazy_llvm_jit_module` and `optimize_runtime_llvm_jit_module` to utilize the new parameter, enhancing flexibility in controlling LLVM IR verification during JIT compilation.
- Introduced a new command line parameter `--runtime-disable-llvm-ir-verifaction` to allow users to disable LLVM IR verification at runtime, improving performance and configurability.
- Enhanced documentation to reflect changes in verification handling and command line options, ensuring clarity for users.
- Revised the documentation for runtime commands to include the new `--runtime-disable-llvm-ir-verifaction` option, allowing users to disable LLVM IR verification during JIT compilation.
- Updated related command descriptions in both the command-line reference and README files to reflect this change, ensuring clarity and consistency across documentation.
- Enhanced the runtime command documentation to provide detailed behavior and usage examples for the new option, improving user guidance.
- Updated the CI workflow configuration to streamline LLVM compiler options, removing redundant flags related to LLVM JIT testing.
- Modified test cases in `uwvm_int_lazy_demand_semantics.cc` to conditionally check for function compilation based on the presence of LLVM JIT, improving test coverage and clarity.
- Enhanced `llvm_jit_verify_compile.cc` by introducing dedicated functions for running various compilation modes, improving code organization and readability.
- Introduced functions to read CMake cache values and check for compatible LLVM ABI in WABT builds, improving integration and compatibility checks.
- Refactored the WABT build process to utilize a dedicated function for generating CMake arguments, enhancing clarity and maintainability.
- Added logic to ensure proper handling of LLVM JIT options and flags during WABT configuration, streamlining the build process for better performance and flexibility.
@MacroModel MacroModel merged commit b13d0e2 into UlteSoft:master May 25, 2026
13 checks passed
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.

1 participant