Internal refactoring

Change-Id: I6b67eaa96a991998351ce07133ae0220bce6119c
This commit is contained in:
Gu, Junjie
2020-03-11 18:26:37 -07:00
committed by sys_zuul
parent 140db32dc5
commit 649153816a

View File

@ -46,6 +46,12 @@ namespace
VectorType* VTy = dyn_cast<VectorType>(V->getType());
return VTy ? (int)VTy->getNumElements() : 1;
}
inline int getTypeSizeInBits(Type* Ty) {
int scalarBits = Ty->getScalarSizeInBits();
VectorType* VTy = dyn_cast<VectorType>(Ty);
return scalarBits * (VTy ? (int)VTy->getNumElements() : 1);
}
}
char VariableReuseAnalysis::ID = 0;