Skip to main content

Module target_features

Module target_features 

Source

Re-exportsยง

use rustc_attr_ir::InstructionSetAttr; ๐Ÿ”’
use rustc_data_structures::fx::FxHashMap; ๐Ÿ”’
use rustc_data_structures::fx::FxHashSet; ๐Ÿ”’
use rustc_data_structures::fx::FxIndexSet; ๐Ÿ”’
use rustc_data_structures::unord::UnordMap; ๐Ÿ”’
use rustc_data_structures::unord::UnordSet; ๐Ÿ”’
use rustc_hir::def::DefKind; ๐Ÿ”’
use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_hir::def_id::LOCAL_CRATE; ๐Ÿ”’
use rustc_hir::def_id::LocalDefId; ๐Ÿ”’
use rustc_lint_defs::builtin::AARCH64_SOFTFLOAT_NEON; ๐Ÿ”’
use rustc_lint_defs::builtin::X86_SOFTFLOAT_SSE; ๐Ÿ”’
use rustc_middle::middle::codegen_fn_attrs::TargetFeature; ๐Ÿ”’
use rustc_middle::middle::codegen_fn_attrs::TargetFeatureKind; ๐Ÿ”’
use rustc_middle::query::Providers; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_session::EarlySession; ๐Ÿ”’
use rustc_session::diagnostics::feature_err; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’
use rustc_span::edit_distance; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use rustc_target::spec::Arch; ๐Ÿ”’
use rustc_target::spec::SanitizerSet; ๐Ÿ”’
use rustc_target::spec::Target; ๐Ÿ”’
use rustc_target::target_features::RUSTC_SPECIFIC_FEATURES; ๐Ÿ”’
use rustc_target::target_features::Stability; ๐Ÿ”’
use smallvec::SmallVec; ๐Ÿ”’
use crate::diagnostics::CrossArchFeatureNote; ๐Ÿ”’
use crate::diagnostics::FeatureNotValid; ๐Ÿ”’
use crate::diagnostics::FeatureNotValidHint; ๐Ÿ”’
use crate::diagnostics; ๐Ÿ”’
use crate::target_features; ๐Ÿ”’

Functionsยง

asm_target_features ๐Ÿ”’
Computes the set of target features used in a function for the purposes of inline assembly.
check_target_feature_trait_unsafe ๐Ÿ”’
Checks the function annotated with #[target_feature] is not a safe trait method implementation, reporting an error if it is.
check_tied_features
Given a map from target_features to whether they are enabled or disabled, ensure only valid combinations are allowed. Returns Some if a violation is found.
flag_to_backend_features
Translates the -Ctarget-feature flag into a backend target feature list.
from_target_feature_attr ๐Ÿ”’
Compute the enabled target features from the #[target_feature] function attribute. Enabled target features are added to target_features.
internal_target_features
Utility function for a codegen backend to compute the set of all actually enabled Rust target features (which will be stored in sess.internal_target_features).
parse_rust_feature_list ๐Ÿ”’
Parse the value of the target spec features field or -Ctarget-feature, calling the closure for each entry in the list, also expanding implied features (but only for actual Rust target features). If the list contains a syntactically invalid item (not starting with +/-) , the error callback is invoked.
provide ๐Ÿ”’
retpoline_features_by_flags
Computes the backend target features to be added to account for retpoline flags. Used by both LLVM and GCC since their target features are, conveniently, the same.
sanitizer_features_by_flags
Computes the backend target features to be added to account for sanitizer flags.
target_spec_to_backend_features
Translates the target spec features field into a backend target feature list.