Skip to content

Conversation

@stratakis
Copy link
Contributor

@stratakis stratakis commented Oct 9, 2025

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.

@vstinner
Copy link
Member

vstinner commented Oct 9, 2025

cc @corona10

@corona10 corona10 self-assigned this Oct 9, 2025
@corona10
Copy link
Member

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

…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.
Copy link
Member

@corona10 corona10 left a 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

@corona10 corona10 merged commit bad8d6d into python:main Oct 19, 2025
43 checks passed
@stratakis
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants