diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-04-08 05:47:09 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-04-08 05:47:09 +0000 |
| commit | 3d941bc69675e1cc22289e5ede0f0450d245f2a1 (patch) | |
| tree | c2ea2772da2e5b816807b9c71515abb03e33a4a3 /llvm/lib | |
| parent | b4419f9d30a3a421ec4e723ffc9fb53d9b13b494 (diff) | |
| download | bcm5719-llvm-3d941bc69675e1cc22289e5ede0f0450d245f2a1.tar.gz bcm5719-llvm-3d941bc69675e1cc22289e5ede0f0450d245f2a1.zip | |
[IR] Inline Type::getScalarType() by using isVectorTy() and getVectorElementType() that were already available inline.
Seems to have very little compiled code size impact. But might give a tiny performance boost.
llvm-svn: 299811
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/IR/Type.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp index ca866738f88..b67b0a30786 100644 --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -41,12 +41,6 @@ Type *Type::getPrimitiveType(LLVMContext &C, TypeID IDNumber) { } } -Type *Type::getScalarType() const { - if (auto *VTy = dyn_cast<VectorType>(this)) - return VTy->getElementType(); - return const_cast<Type*>(this); -} - bool Type::isIntegerTy(unsigned Bitwidth) const { return isIntegerTy() && cast<IntegerType>(this)->getBitWidth() == Bitwidth; } |

