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

Subtree update cg_gcc 2025/01/12 #135442

Merged
merged 187 commits into from
Jan 14, 2025

Conversation

antoyo
Copy link
Contributor

@antoyo antoyo commented Jan 13, 2025

r? GuillaumeGomez

RalfJung and others added 30 commits July 2, 2024 21:05
Miri function identity hack: account for possible inlining

Having a non-lifetime generic is not the only reason a function can be duplicated. Another possibility is that the function may be eligible for cross-crate inlining. So also take into account the inlining attribute in this Miri hack for function pointer identity.

That said, `cross_crate_inlinable` will still sometimes return true even for `inline(never)` functions:
- when they are `DefKind::Ctor(..) | DefKind::Closure` -- I assume those cannot be `InlineAttr::Never` anyway?
- when `cross_crate_inline_threshold == InliningThreshold::Always`

so maybe this is still not quite the right criterion to use for function pointer identity.
From LLVM 15.0.0-rc3. This adds support for COFF archives containing
Arm64EC object files and has various fixes for AIX big archive files.
…davidtwco

Sync ar_archive_writer to LLVM 18.1.3

From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
The `weak-intrinsics` feature was removed from compiler_builtins in
rust-lang/compiler-builtins#598, so dropped the
`compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In rust-lang/compiler-builtins#593, some
builtins for f16/f128 were added. These don't work for all compiler
backends, so add a `compiler-builtins-no-f16-f128` feature and disable
it for cranelift and gcc. Also disable it for LLVM targets that don't
support it.
…ss35

Update compiler_builtins to 0.1.114

The `weak-intrinsics` feature was removed from compiler_builtins in rust-lang/compiler-builtins#598, so dropped the `compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In rust-lang/compiler-builtins#593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a `compiler-builtins-no-f16-f128` feature and disable it for cranelift and gcc.
…res, r=Amanieu

Add implied target features to target_feature attribute

See [zulip](https://rust-lang.zulipchat.com/#narrow/stream/208962-t-libs.2Fstdarch/topic/Why.20would.20target-feature.20include.20implied.20features.3F) for some context.  Adds implied target features, e.g. `#[target_feature(enable = "avx2")]` acts like `#[target_feature(enable = "avx2,avx,sse4.2,sse4.1...")]`.  Fixes rust-lang#128125, fixes rust-lang#128426

The implied feature sets are taken from [the rust reference](https://doc.rust-lang.org/reference/attributes/codegen.html?highlight=target-fea#x86-or-x86_64), there are certainly more features and targets to add.

Please feel free to reassign this to whoever should review it.

r? ``@Amanieu``
By splitting the `FnSig` within `TyKind::FnPtr` into `FnSigTys` and
`FnHeader`, which can be packed more efficiently. This reduces the size
of the hot `TyKind` type from 32 bytes to 24 bytes on 64-bit platforms.
This reduces peak memory usage by a few percent on some benchmarks. It
also reduces cache misses and page faults similarly, though this doesn't
translate to clear cycles or wall-time improvements on CI.
…ouxu,Amanieu,Jubilee

nontemporal_store: make sure that the intrinsic is truly just a hint

The `!nontemporal` flag for stores in LLVM *sounds* like it is just a hint, but actually, it is not -- at least on x86, non-temporal stores need very special treatment by the programmer or else the Rust memory model breaks down. LLVM still treats these stores as-if they were normal stores for optimizations, which is [highly dubious](llvm/llvm-project#64521). Let's avoid all that dubiousness by making our own non-temporal stores be truly just a hint, which is possible on some targets (e.g. ARM). On all other targets, non-temporal stores become regular stores.

~~Blocked on rust-lang/stdarch#1541 propagating to the rustc repo, to make sure the `_mm_stream` intrinsics are unaffected by this change.~~

Fixes rust-lang#114582
Cc `@Amanieu` `@workingjubilee`
…r=RalfJung,nikic

const vector passed through to codegen

This allows constant vectors using a repr(simd) type to be propagated
through to the backend by reusing the functionality used to do a similar
thing for the simd_shuffle intrinsic

rust-lang#118209

r​? RalfJung
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 13, 2025
@GuillaumeGomez
Copy link
Member

Not sure it works once CI started unfortunately...

@bors r-

@rust-log-analyzer

This comment has been minimized.

@antoyo antoyo force-pushed the subtree-update_cg_gcc_2025_01_12 branch from a9eea3d to f3cfff7 Compare January 13, 2025 19:22
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 13, 2025
@GuillaumeGomez
Copy link
Member

@bors r+ p=1 rollup=never

@bors
Copy link
Contributor

bors commented Jan 13, 2025

📌 Commit f3cfff7 has been approved by GuillaumeGomez

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 13, 2025
@matthiaskrgr
Copy link
Member

@bors p=2

@bors
Copy link
Contributor

bors commented Jan 14, 2025

⌛ Testing commit f3cfff7 with merge d4562c8...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
…_12, r=GuillaumeGomez

Subtree update cg_gcc 2025/01/12

r? GuillaumeGomez
@bors
Copy link
Contributor

bors commented Jan 14, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@tgross35
Copy link
Contributor

fatal: unable to access 'https://github.com/rust-lang/rust/': The requested URL returned error: 502

Today's github outage maybe?

@bors retry

@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 Jan 14, 2025
@bors
Copy link
Contributor

bors commented Jan 14, 2025

⌛ Testing commit f3cfff7 with merge c074d8e...

@bors
Copy link
Contributor

bors commented Jan 14, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing c074d8e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 14, 2025
@bors bors merged commit c074d8e into rust-lang:master Jan 14, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 14, 2025
@antoyo antoyo deleted the subtree-update_cg_gcc_2025_01_12 branch January 14, 2025 14:21
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c074d8e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 1.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.7% [0.9%, 2.8%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [0.9%, 2.8%] 3

Cycles

Results (primary -2.3%, secondary 2.9%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 763.089s -> 763.379s (0.04%)
Artifact size: 326.08 MiB -> 326.08 MiB (0.00%)

.filter(|(_, gate, _)| gate.in_cfg())
.filter_map(|(feature, gate, _)| {
.filter(|&&(_, gate, _)| gate.in_cfg())
.filter_map(|&(feature, gate, _)| {
Copy link
Member

Choose a reason for hiding this comment

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

These extra & are quite non-intuitive IMO, and most people changing this file will only learn about them via CI... I don't understand he intended benefit of this lint, but there's a non-negligible cost in contributor confusion and extra round-trip time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would it be better if clippy was ran for cg_gcc when doing ./x.py check?
Do you have any better ideas for how to improve your flow?

Copy link
Member

Choose a reason for hiding this comment

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

Having this flagged in check would avoid the round-trip, it wouldn't avoid the surprise and time spent learning how to comply with this non-standard coding style. Even clippy makes this allow-by-default, and clippy is already very opinionated in its defaults.

IMO it'd be better to standardize the clippy lints enforced on the repo, to avoid developers having to learn different conventions for each directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.