about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
diff options
context:
space:
mode:
authorManuel Drehwald <git@manuel.drehwald.info>2025-01-29 21:31:13 -0500
committerManuel Drehwald <git@manuel.drehwald.info>2025-01-29 21:31:13 -0500
commit1f30517d40a9a8fe3b89479891c7a167adb75cbd (patch)
tree4da71f0331d185e202236924a854190f913815c7 /compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
parentebcf860e7345e3387b4c6961338c77424b43cbd5 (diff)
downloadrust-1f30517d40a9a8fe3b89479891c7a167adb75cbd.tar.gz
rust-1f30517d40a9a8fe3b89479891c7a167adb75cbd.zip
upstream rustc_codegen_ssa/rustc_middle changes for enzyme/autodiff
Diffstat (limited to 'compiler/rustc_middle/src/middle/codegen_fn_attrs.rs')
-rw-r--r--compiler/rustc_middle/src/middle/codegen_fn_attrs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs b/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
index cc980f6e62a..1784665bcae 100644
--- a/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
+++ b/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs
@@ -1,4 +1,5 @@
 use rustc_abi::Align;
+use rustc_ast::expand::autodiff_attrs::AutoDiffAttrs;
 use rustc_attr_parsing::{InlineAttr, InstructionSetAttr, OptimizeAttr};
 use rustc_macros::{HashStable, TyDecodable, TyEncodable};
 use rustc_span::Symbol;
@@ -52,6 +53,8 @@ pub struct CodegenFnAttrs {
     /// The `#[patchable_function_entry(...)]` attribute. Indicates how many nops should be around
     /// the function entry.
     pub patchable_function_entry: Option<PatchableFunctionEntry>,
+    /// For the `#[autodiff]` macros.
+    pub autodiff_item: Option<AutoDiffAttrs>,
 }
 
 #[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, HashStable)]
@@ -160,6 +163,7 @@ impl CodegenFnAttrs {
             instruction_set: None,
             alignment: None,
             patchable_function_entry: None,
+            autodiff_item: None,
         }
     }