[llvm-jit] Optimize LLVM JIT compile speed and make IR verification configurable#232
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.