Move SIMD layout logic to rustc_abi

This commit is contained in:
Moulins
2025-03-07 21:17:16 +01:00
parent 9917173575
commit e69491ac60
5 changed files with 117 additions and 79 deletions

View File

@@ -205,6 +205,13 @@ impl ReprOptions {
}
}
/// The maximum supported number of lanes in a SIMD vector.
///
/// This value is selected based on backend support:
/// * LLVM does not appear to have a vector width limit.
/// * Cranelift stores the base-2 log of the lane count in a 4 bit integer.
pub const MAX_SIMD_LANES: u64 = 1 << 0xF;
/// Parsed [Data layout](https://llvm.org/docs/LangRef.html#data-layout)
/// for a target, which contains everything needed to compute layouts.
#[derive(Debug, PartialEq, Eq)]