From 3221b5bd23ed14b381b29652b1756ef7e40e7f02 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 6 Dec 2013 20:12:19 +0000 Subject: micro optimization: isSizedDerivedType is only called with arrays, vectors and structs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196604 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Type.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/IR/Type.cpp') diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp index 432cbc99f5..03b1122e9e 100644 --- a/lib/IR/Type.cpp +++ b/lib/IR/Type.cpp @@ -156,18 +156,12 @@ int Type::getFPMantissaWidth() const { /// iff all of the members of the type are sized as well. Since asking for /// their size is relatively uncommon, move this operation out of line. bool Type::isSizedDerivedType() const { - if (this->isIntegerTy()) - return true; - if (const ArrayType *ATy = dyn_cast(this)) return ATy->getElementType()->isSized(); if (const VectorType *VTy = dyn_cast(this)) return VTy->getElementType()->isSized(); - if (!this->isStructTy()) - return false; - return cast(this)->isSized(); } -- cgit v1.2.3