Skip to content
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

[AIX] change AIX default codemodel=large #133811

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

mustartt
Copy link
Contributor

@mustartt mustartt commented Dec 3, 2024

On AIX, for most libraries, we run out of Table of Contents (TOC) offsets very quickly due to the default 16-bit offset limit. We want the large code model should be used as the default to provide more TOC entries so the end user does not have to specify -Ccode-model=large for all their packages. This is even more of an issue with ThinLTO as the ThinLTO globals can very quickly use all available TOC entry.

In addition, on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

Copy link
Contributor

@daltenty daltenty left a comment

Choose a reason for hiding this comment

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

LGTM. We feel this will provide a more sensible default for modern applications, and the additional large codemodel access patterns have reduced impact on modern CPU generations

@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned BoxyUwU Dec 3, 2024
@jieyouxu jieyouxu added the O-aix OS: Big Blue's Advanced Interactive eXecutive.. label Dec 3, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks. AIX is tier 3, so this needs no other procedure.

@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

Tagging this as compat relnotes just for FYI but I don't expect bug reports based on

on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.

@rustbot label +relnotes

@rustbot rustbot added the relnotes Marks issues that should be documented in the release notes of the next release. label Dec 3, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 3, 2024

📌 Commit 89b70b9 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 3, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#132937 (a release operation synchronizes with an acquire operation)
 - rust-lang#133681 (improve TagEncoding::Niche docs, sanity check, and UB checks)
 - rust-lang#133726 (Add `core::arch::breakpoint` and test)
 - rust-lang#133768 (Remove `generic_associated_types_extended` feature gate)
 - rust-lang#133811 ([AIX] change AIX default codemodel=large)
 - rust-lang#133812 (Update wasm-component-ld to 0.5.11)
 - rust-lang#133813 (compiletest: explain that UI tests are expected not to compile by default)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9a97214 into rust-lang:master Dec 4, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2024
Rollup merge of rust-lang#133811 - mustartt:change-default-codemodel, r=jieyouxu

[AIX] change AIX default codemodel=large

On AIX, for most libraries, we run out of Table of Contents (TOC) offsets very quickly due to the default 16-bit offset limit. We want the large code model should be used as the default to provide more TOC entries so the end user does not have to specify `-Ccode-model=large` for all their packages. This is even more of an issue with ThinLTO as the ThinLTO globals can very quickly use all available TOC entry.

In addition, on AIX, code with different code-model across different compilation units will not cause undefined behavior, so this is safe to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-aix OS: Big Blue's Advanced Interactive eXecutive.. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants