-
Notifications
You must be signed in to change notification settings - Fork 0
JIT executor #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JIT executor #335
Conversation
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
- Removed the old ExecutorBackendJIT implementation and replaced it with a new, comprehensive JIT compilation backend. - Introduced JITCache for caching compiled functions, improving performance by avoiding redundant compilations. - Added JITCompiler to handle the compilation of PolkaVM bytecode into native machine code. - Created JITExecutor to manage the execution of JIT-compiled functions. - Developed JITMemoryManager for managing the flat memory buffer used by JIT-compiled code. - Implemented platform-specific strategies for JIT operations with JITPlatformHelper and associated classes for macOS and Linux. - Defined custom error types in JITError for better error handling during JIT compilation and execution. - Enhanced PvmConfig to include memory layout configurations relevant for JIT execution. - Added extensions to Registers for safe mutable access during JIT interactions. - Overall, this commit establishes a robust framework for Just-In-Time compilation in the PolkaVM, aiming for improved execution speed and efficiency.
- Updated comments and documentation for clarity and consistency. - Improved error handling messages in compile functions. - Enhanced register usage descriptions for AArch64 and x86_64 architectures. - Removed placeholder comments and added TODOs for future implementation.
… ExecutorBackendJIT and JITExecutor
…tion, improving clarity and organization of register usage
…PolkaVM - Added `registers.hh` for static register allocation for x86_64 and AArch64 architectures. - Updated `x64_helper.cpp` to include new labels and structured exit paths for JIT execution. - Modified `ExecOutcome.swift` to change exit reason conversion from Int32 to UInt64 for better handling of associated values. - Refactored `ExecutorBackendJIT.swift` to remove unnecessary gas checks and streamline memory management. - Enhanced `JITCache.swift` to implement a more robust caching mechanism with async support. - Simplified `JITCompiler.swift` and `JITExecutor.swift` to prepare for future implementation of compilation and execution logic. - Removed `JITMemoryManager.swift` as its functionality is being integrated elsewhere.
…and encapsulate state management
… consistency across execution contexts
…ing host function dispatch mechanism
…ve JITCache, and update PvmConfig for improved architecture handling
… ExecutorBackendJIT
- Updated AArch64 JIT compilation in `a64_helper.cpp` to streamline register usage and improve code structure. - Simplified x86_64 JIT compilation in `x64_helper.cpp`, enhancing readability and maintainability. - Enhanced error handling in `ExecutorBackendJIT.swift` to catch compilation errors specifically. - Introduced `CompilationError` enum in `JITCompiler.swift` for better error categorization during JIT compilation. - Removed obsolete `JITError.swift` file and integrated relevant error handling into `JITExecutor.swift`. - Improved memory management in `VMStateJIT.swift` with lazy initialization of memory views and better error handling. - Added detailed logging for JIT compilation and execution processes to aid in debugging.
…te with VMStateInterpreter, update InvocationContext protocol, and introduce UncheckedSendableBox for async context management.
… headers and add C++ settings for asmjit target.
…oved context handling
…spatchQueueSchedulerTests
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #335 +/- ##
==========================================
- Coverage 86.88% 84.82% -2.07%
==========================================
Files 350 362 +12
Lines 29954 30633 +679
==========================================
- Hits 26025 25983 -42
- Misses 3929 4650 +721 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
some setup code