Skip to content

Subtree sync for rustc_codegen_cranelift #123785

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

Merged
merged 17 commits into from
Apr 11, 2024

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Apr 11, 2024

This fixes an ICE for unreachable blocks.

r? @ghost

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

bjorn3 and others added 17 commits April 5, 2024 16:20
These are expected to panic inside compiletest which fails when
compiletest is compiled with panic=abort.
Save/restore more items in cache with incremental compilation

Right now they don't play very well together, consider a simple example:

```
$ export RUSTFLAGS="--emit asm"
$ cargo new --lib foo
     Created library `foo` package
$ cargo build -q
$ touch src/lib.rs
$ cargo build
error: could not copy
  "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.4qbzn9k8mosu50a5.rcgu.s"
  to "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.s":
  No such file or directory (os error 2)
```

Touch triggers the rebuild, incremental compilation detects no changes (yay) and everything explodes while trying to copy files were they should go.

This pull request fixes it by copying and restoring more files in the incremental compilation cache

Fixes rust-lang#89149
Fixes rust-lang#88829

Related: https://internals.rust-lang.org/t/interaction-between-incremental-compilation-and-emit/20551
They don't work anyway as object misses support for emitting the
particular format macOS expects. And on arm64 macOS it causes
compilation to abort due to an unsupported relocation type.

Fixes rust-lang/rustc_codegen_cranelift#1371
@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. has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 11, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

@rustbot rustbot added A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend labels Apr 11, 2024
@bjorn3
Copy link
Member Author

bjorn3 commented Apr 11, 2024

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Apr 11, 2024

📌 Commit 2ab4334 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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 11, 2024
@bors
Copy link
Collaborator

bors commented Apr 11, 2024

⌛ Testing commit 2ab4334 with merge 62cffee...

@bors
Copy link
Collaborator

bors commented Apr 11, 2024

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 62cffee to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Apr 11, 2024

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 62cffee to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 11, 2024
@bors bors merged commit 62cffee into rust-lang:master Apr 11, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 11, 2024
@bjorn3 bjorn3 deleted the sync_cg_clif-2024-04-11 branch April 11, 2024 13:43
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (62cffee): 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

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)
-3.2% [-3.8%, -2.6%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.2% [-3.8%, -2.6%] 2

Cycles

Results

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

Binary size

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

Bootstrap: 677.599s -> 676.108s (-0.22%)
Artifact size: 316.01 MiB -> 316.01 MiB (-0.00%)

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 has-merge-commits PR has merge commits, merge with caution. 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.

6 participants