Store Used CpuFeature in Artifact instead Present CpuFeatures for Singlepass

This commit is contained in:
ptitSeb
2022-11-23 11:28:22 +01:00
parent a22b50aecc
commit d0bef5c026
5 changed files with 48 additions and 34 deletions

View File

@ -14,6 +14,7 @@ use crate::machine_arm64::MachineARM64;
use crate::machine_x64::MachineX86_64;
#[cfg(feature = "unwind")]
use crate::unwind::{create_systemv_cie, UnwindFrame};
use enumset::EnumSet;
#[cfg(feature = "unwind")]
use gimli::write::{EhFrame, FrameTable};
#[cfg(feature = "rayon")]
@ -256,6 +257,11 @@ impl Compiler for SinglepassCompiler {
debug: dwarf,
})
}
fn get_cpu_features_used(&self, cpu_features: &EnumSet<CpuFeature>) -> EnumSet<CpuFeature> {
let used = CpuFeature::AVX | CpuFeature::SSE42 | CpuFeature::LZCNT;
cpu_features.intersection(used)
}
}
trait IntoParIterIfRayon {