Skip to content

Make some "safe" llvm ops actually sound #143722

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 1 commit into from
Jul 11, 2025
Merged

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jul 10, 2025

Noticed while doing other refactorings

it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway

@rustbot
Copy link
Collaborator

rustbot commented Jul 10, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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 A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` 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 Jul 10, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 10, 2025

Some changes occurred in compiler/rustc_codegen_llvm/src/builder/autodiff.rs

cc @ZuseZ4

Comment on lines -433 to 434
let name = llvm::get_value_name(g).to_vec();
let name = llvm::get_value_name(g);
llvm::set_value_name(g, b"");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this to_vec was load bearing for soundness without any comment about it

@dianqk
Copy link
Member

dianqk commented Jul 10, 2025

@bors r+ rollup=always

@bors
Copy link
Collaborator

bors commented Jul 10, 2025

📌 Commit 84eeca2 has been approved by dianqk

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 Jul 10, 2025
@dianqk dianqk assigned dianqk and unassigned davidtwco Jul 10, 2025
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 10, 2025
Make some "safe" llvm ops actually sound

Noticed while doing other refactorings

it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 10, 2025
Make some "safe" llvm ops actually sound

Noticed while doing other refactorings

it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway
bors added a commit that referenced this pull request Jul 10, 2025
Rollup of 8 pull requests

Successful merges:

 - #140136 (Add an aarch64-msvc build running on ARM64 Windows)
 - #143642 (stdarch subtree update)
 - #143679 (Preserve the .debug_gdb_scripts section)
 - #143707 (Fix `--skip-std-check-if-no-download-rustc`)
 - #143722 (Make some "safe" llvm ops actually sound)
 - #143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`)
 - #143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`)
 - #143744 (Properly track the depth when expanding free alias types)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 11, 2025
Rollup of 7 pull requests

Successful merges:

 - #140136 (Add an aarch64-msvc build running on ARM64 Windows)
 - #143642 (stdarch subtree update)
 - #143707 (Fix `--skip-std-check-if-no-download-rustc`)
 - #143722 (Make some "safe" llvm ops actually sound)
 - #143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`)
 - #143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`)
 - #143744 (Properly track the depth when expanding free alias types)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6e3d017 into rust-lang:master Jul 11, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 11, 2025
rust-timer added a commit that referenced this pull request Jul 11, 2025
Rollup merge of #143722 - oli-obk:sound-llvm, r=dianqk

Make some "safe" llvm ops actually sound

Noticed while doing other refactorings

it may cause some extra unnecessary allocations, but the current use sites are rare ones anyway
Kobzol pushed a commit to Kobzol/stdarch that referenced this pull request Jul 13, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#140136 (Add an aarch64-msvc build running on ARM64 Windows)
 - rust-lang/rust#143642 (stdarch subtree update)
 - rust-lang/rust#143707 (Fix `--skip-std-check-if-no-download-rustc`)
 - rust-lang/rust#143722 (Make some "safe" llvm ops actually sound)
 - rust-lang/rust#143728 (Resolve refactor: extraction of `finalize_module_binding` and `single_import_can_define_name`)
 - rust-lang/rust#143742 (Rework borrowing suggestions to use `Expr` instead of just `Span`)
 - rust-lang/rust#143744 (Properly track the depth when expanding free alias types)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. F-autodiff `#![feature(autodiff)]` 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.

5 participants