Skip to content

gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action - #152781

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:llvm22
Jul 3, 2026
Merged

gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action#152781
vstinner merged 2 commits into
python:mainfrom
vstinner:llvm22

Conversation

@vstinner

@vstinnervstinner commented Jul 1, 2026

Copy link
Copy Markdown
Member

Upgrade LLVM to LLVM 21 in GitHub Action jobs:

  • Reusable Sanitizer
  • Reusable Ubuntu ("Install Clang and BOLT")

Upgrade LLVM to LLVM 22 in GitHub Action jobs:
* Reusable Sanitizer
* Reusable Ubuntu ("Install Clang and BOLT")
* Tail calling interpreter
Keep LLVM 21 for the JIT compiler jobs.
@vstinnervstinner changed the title Upgrade LLVM to LLVM 22 in GitHub Actiongh-152785: Upgrade LLVM to LLVM 22 in GitHub ActionJul 1, 2026
@vstinner
vstinner marked this pull request as ready for review July 1, 2026 13:15
@vstinner

Copy link
Copy Markdown
MemberAuthor

All jobs completed successfully.

@corona10@Fidget-Spinner: What do you think of upgrading to LLVM 22? Is there a reason to not use a newer LLVM version?

@corona10corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For BOLT, LGTM

@corona10corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why not keep same version as JIT? In anycase I prefer unifying LLVM version as possible.

@vstinner

Copy link
Copy Markdown
MemberAuthor

But why not keep same version as JIT? In anycase I prefer unifying LLVM version as possible.

Tools/jit/_llvm.py looks for LLVM 21. If I understood correctly, it requires exactly this LLVM version. Correct me if I'm wrong.

@corona10

Copy link
Copy Markdown
Member

Tools/jit/_llvm.py looks for LLVM 21. If I understood correctly, it requires exactly this LLVM version. Correct me if I'm wrong.

I mean why we need to upgrade to LLVM22, just upgrade to 21

@vstinner

Copy link
Copy Markdown
MemberAuthor

Well, usually a newer compiler is faster to build C code, produces faster programs, and provides better analysis of the code. So to me, it sounds interesting to use LLVM 22 instead of LLVM 21.

It would be nice if the JIT compiler would support LLVM 21 and LLVM 22, but it doesn't seem to be the case now.

For the JIT compiler, LLVM is only used to generate JIT stencils. For other CI jobs, LLVM is used to build the whole Python code base.

@vstinner

Copy link
Copy Markdown
MemberAuthor

@corona10: Are you ok with switching to LLVM 22? Or do you prefer to use LLVM 21 in all CI jobs? You approved the PR but then asked a question, so I'm now confused.

@corona10

Copy link
Copy Markdown
Member

Prefer to keep it as 21 to match with JIT as possible.

@vstinner
vstinner enabled auto-merge (squash) July 3, 2026 11:17
@vstinner

Copy link
Copy Markdown
MemberAuthor

Ok, I updated the PR to use LLVM 21 instead.

@vstinnervstinner changed the title gh-152785: Upgrade LLVM to LLVM 22 in GitHub Actiongh-152785: Upgrade LLVM to LLVM 21 in GitHub ActionJul 3, 2026
@vstinner
vstinner merged commit f5b3eef into python:mainJul 3, 2026
48 checks passed
@vstinner
vstinner deleted the llvm22 branch July 3, 2026 11:44
@hugovk

Copy link
Copy Markdown
Member

How far can we backport this? We need to keep the CI running until branch EOL, and it's easier to maintain if the branches are more similar to each other.

@vstinnervstinner added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 3, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

Copy link
Copy Markdown

GH-152968 is a backport of this pull request to the 3.15 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 3, 2026
@bedevere-app

Copy link
Copy Markdown

GH-152969 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Jul 3, 2026
@vstinner

Copy link
Copy Markdown
MemberAuthor

How far can we backport this? We need to keep the CI running until branch EOL, and it's easier to maintain if the branches are more similar to each other.

I backported the change to the 3.15 branch.

@corona10 prefers to use the same LLVM version than the one used by the JIT compiler. But in the 3.14 branch, Tools/jit/_llvm.py requires LLVM 19. So I don't think that this change should be backported to 3.13 and 3.14 branches. At least, not now.

Note: In the 3.13 branch, Tools/jit/_llvm.py requires LLVM 18.

vstinner added a commit that referenced this pull request Jul 3, 2026
…52781) (#152968)
gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action jobs (GH-152781)
Upgrade LLVM to LLVM 21 in GitHub Action jobs:
* Reusable Sanitizer
* Reusable Ubuntu ("Install Clang and BOLT")
(cherry picked from commit f5b3eef)
Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@vstinner@corona10@hugovk@Fidget-Spinner@JacobCoffee