Skip to main content Module autodiff Copy item path Source use std::ptr ; ๐ use rustc_ast::expand::autodiff_attrs::DiffActivity ; ๐ use rustc_ast::expand::autodiff_attrs::DiffMode ; ๐ use rustc_ast::expand::typetree::FncTree ; ๐ use rustc_attr_ir::RustcAutodiff ; ๐ use rustc_codegen_ssa::mir::IntrinsicResult ; ๐ use rustc_codegen_ssa::mir::operand::OperandRef ; ๐ use rustc_codegen_ssa::mir::operand::OperandValue ; ๐ use rustc_codegen_ssa::mir::place::PlaceValue ; ๐ use rustc_codegen_ssa::traits::BaseTypeCodegenMethods ; ๐ use rustc_codegen_ssa::traits::BuilderMethods ; ๐ use rustc_codegen_ssa::traits::ReturnSlot ; ๐ use rustc_data_structures::thin_vec::ThinVec ; ๐ use rustc_middle::ty ; ๐ use rustc_middle::ty::Ty ; ๐ use rustc_middle::ty::TyCtxt ; ๐ use rustc_middle::ty::TypingEnv ; ๐ use rustc_span::bug ; ๐ use rustc_target::callconv::PassMode ; ๐ use tracing::debug ; ๐ use crate::builder::Builder ; ๐ use crate::builder::UNNAMED ; ๐ use crate::context::SimpleCx ; ๐ use crate::declare::declare_simple_fn ; ๐ use crate::llvm ; ๐ use crate::llvm::TRUE ; ๐ use crate::llvm::Type ; ๐ use crate::llvm::TypeKind ; ๐ use crate::llvm::Value ; ๐ adjust_activity_to_abi ๐ generate_enzyme_call ๐ When differentiating fn_to_diff, take a outer_fn and generate another
function with expected naming and calling conventions which will be
discovered by the enzyme LLVM pass and its body populated with the differentiated
fn_to_diff. outer_fn is then modified to have a call to the generated
function and handle the differences between the Rust calling convention and
Enzyme. match_args_from_caller_to_enzyme ๐