1
Fork 0

Make the randomize feature of rustc_abi additive

This commit is contained in:
hkalbasi 2023-11-05 21:51:47 +03:30
parent a42d94ebb8
commit c8a25eddfe
4 changed files with 7 additions and 9 deletions

View file

@ -7,7 +7,7 @@ use rustc_middle::mir::visit::*;
use rustc_middle::mir::*;
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_mir_dataflow::value_analysis::{excluded_locals, iter_fields};
use rustc_target::abi::{FieldIdx, ReprFlags, FIRST_VARIANT};
use rustc_target::abi::{FieldIdx, FIRST_VARIANT};
pub struct ScalarReplacementOfAggregates;
@ -66,7 +66,7 @@ fn escaping_locals<'tcx>(
return true;
}
if let ty::Adt(def, _args) = ty.kind() {
if def.repr().flags.contains(ReprFlags::IS_SIMD) {
if def.repr().simd() {
// Exclude #[repr(simd)] types so that they are not de-optimized into an array
return true;
}