FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Upgrade LLVM to 19.1.6 by indygreg · Pull Request #462 · astral-sh/python-build-standalone · GitHub

Repository navigation

Upgrade LLVM to 19.1.6 - #462

Merged
zanieb merged 2 commits into
mainfrom
gps/llvm-19
Jan 2, 2025
Merged

zanieb merged 2 commits into
mainfrom
gps/llvm-19

Conversation

indygreg commented Dec 31, 2024 •
edited
Loading

Copy link
Copy Markdown
Collaborator

This is a redo of #420, which was merged prematurely.

With the BOLT changes from #463 merged, LLVM 19 just works.

As part of this we also modernize the BOLT apply settings to follow the recommendations at https://llvm.org/devmtg/2024-03/slides/practical-use-of-bolt.pdf.

This includes enabling support for loading hot code from a huge page at runtime. This should just work and could result in perf wins via improved iTLB hit rate, etc.

Copy link
Copy Markdown
Collaborator Author

This is a redo of #420, which was merged prematurely.

The error we're seeing is:

BOLT-ERROR: unable to get new address corresponding to input address 0x3dd8f4 in function _PyEval_EvalFrameDefault. Consider adding this function to --skip-funcs=...

Looking at the LLVM source code, we see this error was introduced by llvm/llvm-project#89681, which first shipped in LLVM 19.1.0.

The added test case says BOLT can't handle computed gotos in position independent code (PIC) (we use PIC since we build with -fPIC). _PyEval_EvalFrameDefault uses computed gotos if they are available. So LLVM 19.1 just isn't capable of BOLT optimizing _PyEval_EvalFrameDefault.

We'll need to add _PyEval_EvalFrameDefault to the BOLT skip list.

indygreg changed the base branch from main to gps/bolt-fixes January 1, 2025 19:38

indygreg commented Jan 1, 2025

Copy link
Copy Markdown
Collaborator Author

I diagnosed the BOLT issues and split those out into #463. I'm optimistic this will pass CI now.

indygreg force-pushed the gps/llvm-19 branch 2 times, most recently from 4d7ae4e to 50273e8 Compare January 1, 2025 21:30
Base automatically changed from gps/bolt-fixes to main January 1, 2025 23:08
LLVM 19 yields a compile error without these patches.

Strictly speaking we may only need the final one. However there
are conflicts unless we take all patches to `src/aarch64/sysv.S`.
So we just take the 3 of them.
As part of this we also modernize the BOLT apply settings to follow
the recommendations at
https://llvm.org/devmtg/2024-03/slides/practical-use-of-bolt.pdf.

This includes enabling support for loading hot code from a huge page
at runtime. This should _just work_ and could result in perf wins via
improved iTLB hit rate, etc.
indygreg marked this pull request as ready for review January 1, 2025 23:12
indygreg requested a review from zanieb January 2, 2025 02:36
zanieb merged commit 0be0a57 into main Jan 2, 2025
zanieb deleted the gps/llvm-19 branch January 2, 2025 18:15
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL