-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-125498: Update JIT builds to use LLVM 19 and use preserve_none
#125499
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
Merged
Changes from 43 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
94252cf
Update to LLVM 19
savannahostrowski f8dc236
update syntax in disabled gil ci
savannahostrowski 80a3b40
📜🤖 Added by blurb_it.
blurb-it[bot] ba02d7c
Merge branch 'main' into jit-llvm-19
savannahostrowski 7a1133e
Update readme
savannahostrowski d8e38db
fix free-threaded by pseudo-pinning version
savannahostrowski b8ae218
Add check to see that registers match in stencil generation
savannahostrowski 4368d5f
Appease linters
savannahostrowski 12fc5cd
Remove devcontainer instructions from readme
savannahostrowski 7f9fe5a
Update README
savannahostrowski 8c21729
Merge branch 'main' into jit-llvm-19
savannahostrowski a597ea5
Remove ghccc
savannahostrowski 4df5efc
Merge branch 'main' into remove-ghccc
savannahostrowski 85b858d
add back cpu_count
savannahostrowski 9209651
Appease linter
savannahostrowski a842f90
Add sys import
savannahostrowski 73c725b
Move preserve_none
savannahostrowski 4d8a012
define jit_func_preserve_none
savannahostrowski 994af97
add comment
savannahostrowski 0d86727
add comment
savannahostrowski 98f0535
Fix whitespace
savannahostrowski 9a20a2e
Move header to separate file
savannahostrowski 4a2f3c4
Add newline
savannahostrowski 4c4ca2f
Add newline
savannahostrowski 7d1745a
Address PR comments
savannahostrowski c8d4692
Replace entry_symbol with string
savannahostrowski 72d5ed0
Appease linter
savannahostrowski a96af70
Add newline
savannahostrowski 9827ade
Merge branch 'main' into remove-ghccc
savannahostrowski 4e32743
Merge branch 'main' into remove-ghccc
savannahostrowski ed29ae2
Merge branch 'main' into remove-ghccc
savannahostrowski 3a2ecee
Merge branch 'main' into remove-ghccc
savannahostrowski 3259994
Merge branch 'main' into remove-ghccc
savannahostrowski 5ef69e6
📜🤖 Added by blurb_it.
blurb-it[bot] 709bb08
Rephrase
savannahostrowski 5ca8d61
Run pre-commit
savannahostrowski 24d9143
Add newline
savannahostrowski b351303
Add line to remove symlink
savannahostrowski 53ec962
Merge branch 'main' into remove-ghccc
savannahostrowski fe58a12
Fix typo
savannahostrowski a4b2d3e
Merge branch 'remove-ghccc' of https://github.com/savannahostrowski/c…
savannahostrowski 0f88955
Fix wording
savannahostrowski 4e16dd6
Merge branch 'main' into remove-ghccc
savannahostrowski bb1e650
Update Misc/NEWS.d/next/Core_and_Builtins/2024-10-22-04-18-53.gh-issu…
savannahostrowski 5f3ec52
Apply suggestions from code review
savannahostrowski 46cee93
Address PR comments
savannahostrowski c119a5d
Fix whitespace
savannahostrowski cbb0ddf
Add newline to jit.h
savannahostrowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Core_and_Builtins/2024-09-14-20-09-39.gh-issue-123714.o1mbe4.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Update JIT compilation to use LLVM 19 |
6 changes: 6 additions & 0 deletions
6
Misc/NEWS.d/next/Core_and_Builtins/2024-10-22-04-18-53.gh-issue-125498.cFjPIn.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The JIT has been updated to leverage LLVM 19’s preserve_none attribute, which | ||
adds native support for the Glasgow Haskell Compiler Calling Convention (ghccc) | ||
for both x86-64 and AArch64 targets. This removes the need to manually patch | ||
the calling convention in LLVM IR, simplifying the JIT compilation process. | ||
Additionally, this update enables the optimization across all platforms, except | ||
for i686-pc-windows-msvc where the attribute is not supported. | ||
savannahostrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// To use preserve_none in JIT builds, we need to declare a separate function pointer with __attribute__((preserve_none)) since this attribute is not supported in < clang 19. | ||
// This is functionally the same as jit_func_native from Include/internal/pycore_jit.h except that it has __attribute__((preserve_none)). | ||
savannahostrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
typedef _Py_CODEUNIT *(*jit_func_preserve_none)(_PyInterpreterFrame *frame, _PyStackRef *stack_pointer, PyThreadState *tstate) __attribute__((preserve_none)); | ||
savannahostrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.