diff options
| author | Marcelo DomÃnguez <dmmarcelo27@gmail.com> | 2025-08-14 15:29:37 +0000 | 
|---|---|---|
| committer | Marcelo DomÃnguez <dmmarcelo27@gmail.com> | 2025-08-14 16:30:16 +0000 | 
| commit | c9c1c171289aa575040678f3d0c005342b1e29e1 (patch) | |
| tree | 61b1e5430ab57eb062fd6a9e3d6ad6a9f86a39b3 /compiler/rustc_codegen_llvm/src | |
| parent | 250d77e5d72fde69a6406050a3b037635f685378 (diff) | |
| download | rust-c9c1c171289aa575040678f3d0c005342b1e29e1.tar.gz rust-c9c1c171289aa575040678f3d0c005342b1e29e1.zip | |
Remove inlining for autodiff handling
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder/autodiff.rs | 8 | 
1 files changed, 1 insertions, 7 deletions
| diff --git a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs index 56116959a62..e2df3265f6f 100644 --- a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs +++ b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs @@ -10,10 +10,9 @@ use tracing::debug; use crate::builder::{Builder, PlaceRef, UNNAMED}; use crate::context::SimpleCx; use crate::declare::declare_simple_fn; -use crate::llvm::AttributePlace::Function; +use crate::llvm; use crate::llvm::{Metadata, True, Type}; use crate::value::Value; -use crate::{attributes, llvm}; pub(crate) fn adjust_activity_to_abi<'tcx>( tcx: TyCtxt<'tcx>, @@ -308,11 +307,6 @@ pub(crate) fn generate_enzyme_call<'ll, 'tcx>( enzyme_ty, ); - // Otherwise LLVM might inline our temporary code before the enzyme pass has a chance to - // do it's work. - let attr = llvm::AttributeKind::NoInline.create_attr(cx.llcx); - attributes::apply_to_llfn(ad_fn, Function, &[attr]); - let num_args = llvm::LLVMCountParams(&fn_to_diff); let mut args = Vec::with_capacity(num_args as usize + 1); args.push(fn_to_diff); | 
