Skip to content

Commit 3aa5c8e

Browse files
committed
Remove dead code
1 parent d651974 commit 3aa5c8e

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::str;
88
use rustc_abi::{HasDataLayout, Size, TargetDataLayout, VariantIdx};
99
use rustc_codegen_ssa::back::versioned_llvm_target;
1010
use rustc_codegen_ssa::base::{wants_msvc_seh, wants_wasm_eh};
11-
use rustc_codegen_ssa::common::TypeKind;
1211
use rustc_codegen_ssa::errors as ssa_errors;
1312
use rustc_codegen_ssa::traits::*;
1413
use rustc_data_structures::base_n::{ALPHANUMERIC_ONLY, ToBaseN};
@@ -654,10 +653,6 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
654653
}
655654
}
656655
impl<'ll> SimpleCx<'ll> {
657-
pub(crate) fn _get_return_type(&self, ty: &'ll Type) -> &'ll Type {
658-
assert_eq!(self.type_kind(ty), TypeKind::Function);
659-
unsafe { llvm::LLVMGetReturnType(ty) }
660-
}
661656
pub(crate) fn get_type_of_global(&self, val: &'ll Value) -> &'ll Type {
662657
unsafe { llvm::LLVMGlobalGetValueType(val) }
663658
}

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
6868
codegen_fn_attrs.flags |= CodegenFnAttrFlags::TRACK_CALLER;
6969
}
7070

71-
// If our rustc version supports autodiff/enzyme, then we call our handler
72-
// to check for any `#[rustc_autodiff(...)]` attributes.
73-
if cfg!(llvm_enzyme) {
74-
let ad = autodiff_attrs(tcx, did.into());
75-
codegen_fn_attrs.autodiff_item = ad;
76-
}
77-
7871
// When `no_builtins` is applied at the crate level, we should add the
7972
// `no-builtins` attribute to each function to ensure it takes effect in LTO.
8073
let crate_attrs = tcx.hir_attrs(rustc_hir::CRATE_HIR_ID);

compiler/rustc_middle/src/middle/codegen_fn_attrs.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::borrow::Cow;
22

33
use rustc_abi::Align;
4-
use rustc_ast::expand::autodiff_attrs::AutoDiffAttrs;
54
use rustc_attr_data_structures::{InlineAttr, InstructionSetAttr, OptimizeAttr};
65
use rustc_macros::{HashStable, TyDecodable, TyEncodable};
76
use rustc_span::Symbol;
@@ -75,8 +74,6 @@ pub struct CodegenFnAttrs {
7574
/// The `#[patchable_function_entry(...)]` attribute. Indicates how many nops should be around
7675
/// the function entry.
7776
pub patchable_function_entry: Option<PatchableFunctionEntry>,
78-
/// For the `#[autodiff]` macros.
79-
pub autodiff_item: Option<AutoDiffAttrs>,
8077
}
8178

8279
#[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, HashStable)]
@@ -182,7 +179,6 @@ impl CodegenFnAttrs {
182179
instruction_set: None,
183180
alignment: None,
184181
patchable_function_entry: None,
185-
autodiff_item: None,
186182
}
187183
}
188184

0 commit comments

Comments
 (0)