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

Sync rustc_codegen_cranelift #107843

Merged
merged 43 commits into from
Feb 9, 2023
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 9, 2023

  • Couple of bugfixes
  • A significant runtime perf improvement
  • Implemented sym and const support for inline asm
  • Improved self profile integration

r? @ghost

@rustbot label +A-codegen +A-cranelift +T-compiler

erikdesjardins and others added 30 commits January 22, 2023 23:41
...and remove it from `PointeeInfo`, which isn't meant for this.

There are still various places (marked with FIXMEs) that assume all pointers
have the same size and alignment. Fixing this requires parsing non-default
address spaces in the data layout string, which will be done in a followup.
It fixes a bug that caused compilation on 32bit x86 to fail
…d, r=cjgillot

InstCombine away intrinsic validity assertions

This optimization (currently) fires 246 times on the standard library. It seems to fire hardly at all on the big crates in the benchmark suite. Interesting.
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#106407 (Improve proc macro attribute diagnostics)
 - rust-lang#106960 (Teach parser to understand fake anonymous enum syntax)
 - rust-lang#107085 (Custom MIR: Support binary and unary operations)
 - rust-lang#107086 (Print PID holding bootstrap build lock on Linux)
 - rust-lang#107175 (Fix escaping inference var ICE in `point_at_expr_source_of_inferred_type`)
 - rust-lang#107204 (suggest qualifying bare associated constants)
 - rust-lang#107248 (abi: add AddressSpace field to Primitive::Pointer )
 - rust-lang#107272 (Implement ObjectSafe and WF in the new solver)
 - rust-lang#107285 (Implement `Generator` and `Future` in the new solver)
 - rust-lang#107286 (ICE in new solver if we see an inference variable)
 - rust-lang#107313 (Add Style Team Triagebot config)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
…orn3

Sync rustc_codegen_cranelift

For cg_clif itself there have been a couple of bug fixes since the last sync, a Cranelift update and implemented all remaining simd platform intrinsics used by `std::simd`. (`std::arch` still misses a lot though) Most of the diff is from reworking of the cg_clif build system though.

r? `@ghost`

`@rustbot` label +A-codegen +A-cranelift +T-compiler
Switch to `EarlyBinder` for `fn_sig` query

Part of the work to finish rust-lang#105779 (also see rust-lang/types-team#78).

Several queries `X` have a `bound_X` variant that wraps the output in [`EarlyBinder`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.EarlyBinder.html). This adds `EarlyBinder` to the return type of the `fn_sig` query and removes `bound_fn_sig`.

r? `@lcnr`
Use stable metric for const eval limit instead of current terminator-based logic

This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.

The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).

Also see: rust-lang#103877
…e_transmute

Sometimes it is necessary for handling vector to scalar pair transmutes,
but if the types are the same there is no need for this.

This improves runtime performance on simple-raytracer by 12%.
Improve -Ztime-passes and -Zself-profile output
This reduces the sysroot size
@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. A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend labels Feb 9, 2023
@bjorn3
Copy link
Member Author

bjorn3 commented Feb 9, 2023

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Feb 9, 2023

📌 Commit e25566e has been approved by bjorn3

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 Feb 9, 2023
@bors
Copy link
Contributor

bors commented Feb 9, 2023

⌛ Testing commit e25566e with merge 8cca42a...

@bors
Copy link
Contributor

bors commented Feb 9, 2023

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 8cca42a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 9, 2023
@bors bors merged commit 8cca42a into rust-lang:master Feb 9, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 9, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8cca42a): 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

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

@bjorn3 bjorn3 deleted the sync_cg_clif-2023-02-09 branch February 9, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants