[OPT] Don't call monomorphize from clif_type

This commit is contained in:
bjorn3 2020-02-07 20:27:37 +01:00
parent 5204a98398
commit bae0d9bb72
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ pub enum SsaKind {
pub fn analyze(fx: &FunctionCx<'_, '_, impl Backend>) -> IndexVec<Local, SsaKind> {
let mut flag_map = fx.mir.local_decls.iter().map(|local_decl| {
if fx.clif_type(local_decl.ty).is_some() {
if fx.clif_type(fx.monomorphize(&local_decl.ty)).is_some() {
SsaKind::Ssa
} else {
SsaKind::NotSsa

View File

@ -345,7 +345,7 @@ impl<'tcx, B: Backend + 'static> FunctionCx<'_, 'tcx, B> {
}
pub fn clif_type(&self, ty: Ty<'tcx>) -> Option<Type> {
clif_type_from_ty(self.tcx, self.monomorphize(&ty))
clif_type_from_ty(self.tcx, ty)
}
pub fn get_ebb(&self, bb: BasicBlock) -> Ebb {