R600/SI: Remove some leftover MI dump call
[oota-llvm.git] / lib / IR / DataLayout.cpp
index d1096d74242b31b115eb9ae8eccca566a5dd413d..6bdc09eaee44330df6abca453d2912e08aee9e24 100644 (file)
@@ -514,8 +514,7 @@ unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
   if (Ty->isPointerTy())
     return getTypeSizeInBits(Ty);
 
-  Type *EleTy = cast<VectorType>(Ty)->getElementType();
-  return getTypeSizeInBits(EleTy);
+  return getTypeSizeInBits(Ty->getScalarType());
 }
 
 /*!
@@ -630,6 +629,13 @@ Type *DataLayout::getSmallestLegalIntType(LLVMContext &C, unsigned Width) const
   return 0;
 }
 
+unsigned DataLayout::getLargestLegalIntTypeSize() const {
+  unsigned MaxWidth = 0;
+  for (unsigned i = 0, e = (unsigned)LegalIntWidths.size(); i != e; ++i)
+    MaxWidth = std::max<unsigned>(MaxWidth, LegalIntWidths[i]);
+  return MaxWidth;
+}
+
 uint64_t DataLayout::getIndexedOffset(Type *ptrTy,
                                       ArrayRef<Value *> Indices) const {
   Type *Ty = ptrTy;