Skip to content

Conversation

ZuseZ4
Copy link
Member

@ZuseZ4 ZuseZ4 commented Mar 17, 2025

Splitting out some cleanups to reduce the size of my batching PR and simplify @haenoe 's PR.

r? @oli-obk

Tracking:

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Mar 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs

cc @jdonszelmann

@ZuseZ4 ZuseZ4 added the F-autodiff `#![feature(autodiff)]` label Mar 17, 2025
@ZuseZ4
Copy link
Member Author

ZuseZ4 commented Mar 17, 2025

Ok, I think I'm done here. Most of these changes just extract a bit of logic into their own functions, since my batching PR will increase them a bit. It's also nicer to read that way. This also fixes one of the fixme's, since I was incorrectly looking for duplicated attribute id's, when I should have just checked the full name.

Best reviewed commit by commit, since each of them is very simple.

@rust-log-analyzer

This comment has been minimized.

@ZuseZ4 ZuseZ4 force-pushed the autodiff-cleanups branch from 5628e24 to 47c07ed Compare March 17, 2025 23:13

use crate::errors;

pub(crate) fn outer_normal_attr(
Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about putting it into the rustc_ast crate, but I couldn't find any other users and given jana's attribute rework I don't think it makes sense to add extra functions there, especially given someone is looking into moving autodiff over to the new attribute handling infra.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 20, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 20, 2025

📌 Commit 81b2d55 has been approved by oli-obk

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 Mar 20, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2025
Autodiff cleanups Splitting out some cleanups to reduce the size of my batching PR and simplify `@haenoe` 's [PR](rust-lang#138314). r? `@oli-obk` Tracking: - rust-lang#124509
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
Rollup of 10 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
Kobzol added a commit to Kobzol/rust that referenced this pull request Mar 21, 2025
Autodiff cleanups Splitting out some cleanups to reduce the size of my batching PR and simplify ```@haenoe``` 's [PR](rust-lang#138314). r? ```@oli-obk``` Tracking: - rust-lang#124509
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) r? `@ghost` `@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 21, 2025
Autodiff cleanups Splitting out some cleanups to reduce the size of my batching PR and simplify ````@haenoe```` 's [PR](rust-lang#138314). r? ````@oli-obk```` Tracking: - rust-lang#124509
@bors bors merged commit 0c594da into rust-lang:master Mar 21, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 21, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
Rollup merge of rust-lang#138627 - EnzymeAD:autodiff-cleanups, r=oli-obk Autodiff cleanups Splitting out some cleanups to reduce the size of my batching PR and simplify ``@haenoe`` 's [PR](rust-lang#138314). r? ``@oli-obk`` Tracking: - rust-lang#124509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

5 participants