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

Rollup of 5 pull requests #132184

Merged
merged 14 commits into from
Oct 26, 2024
Merged

Rollup of 5 pull requests #132184

merged 14 commits into from
Oct 26, 2024

Conversation

jieyouxu
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Zalathar and others added 14 commits October 25, 2024 12:42
There is no need for this code to be split across multiple functions in
multiple files.
In all the situations where this context is needed, it should always be
available.
Adding an extra `OnceCell` to `CrateCoverageContext` is much nicer than trying
to thread this string through multiple layers of function calls that already
have access to the context.
…eyouxu

coverage: Consolidate creation of covmap/covfun records

This code for creating covmap/covfun records during codegen was split across multiple functions and files for dubious historical reasons. Having it all in one place makes it easier to follow.

This PR also includes two semi-related cleanups:
- Getting the codegen context's `coverage_cx` state is made infallible, since it should always exist when running the code paths that need it.
- The value of `covfun_section_name` is saved in the codegen context, since it never changes at runtime, and the code that needs it has access to the context anyway.

---

Background: Coverage instrumentation generates two kinds of metadata that are embedded in the final binary. There is per-CGU information that goes in the `__llvm_covmap` linker section, and per-function information that goes in the `__llvm_covfun` section (except on Windows, where slightly different section names are used).
Enable LSX feature for LoongArch Linux targets

Enable 128-bit vector (LSX) feature for `loongarch64-unknown-linux-{gnu, musl}` targets.

try-job: dist-loongarch64-linux
try-job: dist-loongarch64-musl
…=compiler-errors

Deny calls to non-`#[const_trait]` methods in MIR constck

This is a (potentially temporary) fix that closes off the mismatch in assumptions between MIR constck and typeck which does the const traits checking. Before this PR, MIR constck assumed that typeck correctly handled all calls to trait methods in const contexts if effects is enabled. That is not true because typeck only correctly handles callees that are const. For non-const callees (such as methods in a non-const_trait), typeck had never created an error.

https://github.com/rust-lang/rust/blob/45089ec19ebebec88bace6ec237244ff0eaa7ad3/compiler/rustc_hir_typeck/src/callee.rs#L876-L877

I called this potentially temporary because the const checks could be moved to HIR entirely. Alongside the recent refactor in const stability checks where that component could be placed would need more discussion. (cc ```@compiler-errors``` ```@RalfJung)```

Tests are updated, mainly due to traits not being const in core, so tests that call them correctly error.

This fixes rust-lang/project-const-traits#12.
x86 target features: make pclmulqdq imply sse2

Based on comments in rust-lang/stdarch#1661

Fixes rust-lang/stdarch#1661
…mpiler-errors

Print unsafety of attribute in AST pretty print

This PR fixes the AST pretty print, which was missing the unsafety for unsafe attributes.

Related to rust-lang#131558 (comment)
@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. rollup A PR which is a rollup labels Oct 26, 2024
@jieyouxu
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Oct 26, 2024

📌 Commit 50e78b8 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 Oct 26, 2024
@bors
Copy link
Contributor

bors commented Oct 26, 2024

⌛ Testing commit 50e78b8 with merge 9260be3...

@bors
Copy link
Contributor

bors commented Oct 26, 2024

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 9260be3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 26, 2024
@bors bors merged commit 9260be3 into rust-lang:master Oct 26, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 26, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132124 coverage: Consolidate creation of covmap/covfun records 58440ea0b886ad62ebc55ea505638d5b9b221150 (link)
#132140 Enable LSX feature for LoongArch Linux targets 502d0c9fc0eb823c8b2307e3542c0df35bf91ece (link)
#132169 Deny calls to non-#[const_trait] methods in MIR constck e59dbf37236e6214cd861c40f3ce5e9a9e26628c (link)
#132174 x86 target features: make pclmulqdq imply sse2 1b96d05d1081b0f03cd2530235f1a51c90e84662 (link)
#132180 Print unsafety of attribute in AST pretty print 5532cd050f8833c67b34d9d5d7f31519b6977ba0 (link)

previous master: 17f8215394

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@jieyouxu jieyouxu deleted the rollup-81ht12w branch October 26, 2024 16:38
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9260be3): 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)

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

Cycles

Results (primary -0.8%)

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)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.8% [-0.8%, -0.8%] 1

Binary size

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

Bootstrap: 784.653s -> 781.782s (-0.37%)
Artifact size: 333.81 MiB -> 333.71 MiB (-0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

9 participants