Skip to main content

admits

Function admits 

Source
pub fn admits(cfg: &OptimizationConfig, tier: Tier, opt: Opt) -> bool
Expand description

Whether opt runs at tier under cfg: it must be enabled in the config AND cost no more than the tier’s budget. The tier→opt-set mapping is therefore DERIVED from the registry, never hardcoded — adding an opt with a cost slots it into the right tier automatically (HOTSWAP §4.2).

This is pure policy. Run-path callers additionally AND in any #[cfg(feature = "codegen")] availability for the codegen-only passes (Affine/Unroll/Scalarize): those passes don’t exist on targets without the feature, so tier-invariance is asserted per-platform, not across platforms.