GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-101525: [BOLT] Add GCC's LTO-generated function clones, with computed gotos, to BOLT skip list by stratakis · Pull Request #139840 · python/cpython

Conversation

@stratakis

@stratakis stratakis commented Oct 9, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

When building with --with-lto, --enable-bolt and --enable-shared, GCC creates optimized function clones with the suffix .lto_priv.0.

The sre_ucs*_match functions use computed gotos, which BOLT cannot optimize, so their .lto_priv.0 clones must be skipped as well.

Static builds and Clang's LTO implementation are not affected.

  • Issue: Make BOLT as stable feature #101525

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stratakis
stratakis requested review from AA-Turner, corona10, emmatyping and erlend-aasland as code owners October 9, 2025 11:20
@bedevere-app bedevere-app Bot mentioned this pull request Oct 9, 2025
Make BOLT as stable feature #101525
Open
5 of 7 tasks
@bedevere-app bedevere-app Bot added the awaiting review label Oct 9, 2025
@vstinner vstinner added the skip news label Oct 9, 2025
@vstinner

vstinner commented Oct 9, 2025

Copy link
Copy Markdown
Member

cc @corona10

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@corona10 corona10 self-assigned this Oct 9, 2025
@corona10

corona10 commented Oct 14, 2025

Copy link
Copy Markdown
Member

I will try to review this PR until end of this week.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stratakis
pythongh-101525: Add GCC's LTO-generated function clones, with comput…
d6da34f
…ed gotos, to BOLT skip list

When building with --with-lto, --enable-bolt and --enable-shared, GCC creates
optimized function clones with the suffix .lto_priv.0.

The sre_ucs*_match functions use computed gotos, which BOLT cannot
optimize, so their .lto_priv.0 clones must be skipped as well.

Static builds and Clang's LTO implementation are not affected.
@stratakis
stratakis force-pushed the main branch from d59de4c to d6da34f Compare October 17, 2025 12:15
@stratakis stratakis mentioned this pull request Oct 17, 2025
gh-101525: Check whether to skip functions with computed gotos during BOLT runs #140250
Open
corona10
corona10 approved these changes Oct 19, 2025
View reviewed changes

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM!
But since LLVM 20 has been released and llvm/llvm-project#120267
is merged, it’s probably a good time to test without using -skip-funcs :)
cc @zanieb

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Oct 19, 2025
@corona10
corona10 merged commit bad8d6d into python:main Oct 19, 2025
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Oct 19, 2025
@stratakis

stratakis commented Oct 20, 2025

Copy link
Copy Markdown
Contributor Author

LGTM! But since LLVM 20 has been released and llvm/llvm-project#120267 is merged, it’s probably a good time to test without using -skip-funcs :) cc @zanieb

I did some testing there with GCC. #140250 works, unless the linker uses -pack-relative-relocs, then those functions fail again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stratakis

stratakis commented Nov 6, 2025

Copy link
Copy Markdown
Contributor Author

Would it make sense to backport this to previous versions, as it's a bugfix?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Nov 7, 2025

Copy link
Copy Markdown
Member

Would it make sense to backport this to previous versions, as it's a bugfix?

Yes, I think so. Do you agree to backport @corona10?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@stratakis @StanFromIreland
pythongh-101525: [BOLT] Add GCC's LTO-generated function clones, with…
0685971
… computed gotos, to BOLT skip list (pythongh-139840)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@corona10 corona10 corona10 approved these changes
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@corona10 corona10

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@stratakis @vstinner @corona10
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.