[llvm-branch-commits] [llvm] 504e4be - [IR] Remove isPowerOf2ByteWidth
Kazu Hirata via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 14 23:05:01 PST 2020
Author: Kazu Hirata
Date: 2020-12-14T23:00:17-08:00
New Revision: 504e4be2c111ef8e79a91f0b92fdc009995204d1
URL: https://github.com/llvm/llvm-project/commit/504e4be2c111ef8e79a91f0b92fdc009995204d1
DIFF: https://github.com/llvm/llvm-project/commit/504e4be2c111ef8e79a91f0b92fdc009995204d1.diff
LOG: [IR] Remove isPowerOf2ByteWidth
The predicate used to be used with the C backend, which was removed on
Mar 23, 2012 in commit 64a232343aa649fdacf78698da3e4d5737dee56a. It
seems to be unused since then.
Added:
Modified:
llvm/include/llvm/IR/DerivedTypes.h
llvm/lib/IR/Type.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h
index 9534edc4ea06..51c5dd2d5845 100644
--- a/llvm/include/llvm/IR/DerivedTypes.h
+++ b/llvm/include/llvm/IR/DerivedTypes.h
@@ -87,12 +87,6 @@ class IntegerType : public Type {
/// Get a bit mask for this type.
APInt getMask() const;
- /// This method determines if the width of this IntegerType is a power-of-2
- /// in terms of 8 bit bytes.
- /// @returns true if this is a power-of-2 byte width.
- /// Is this a power-of-2 byte-width IntegerType ?
- bool isPowerOf2ByteWidth() const;
-
/// Methods for support type inquiry through isa, cast, and dyn_cast.
static bool classof(const Type *T) {
return T->getTypeID() == IntegerTyID;
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp
index 5e33c022a7ae..3b085129a375 100644
--- a/llvm/lib/IR/Type.cpp
+++ b/llvm/lib/IR/Type.cpp
@@ -275,11 +275,6 @@ IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) {
return Entry;
}
-bool IntegerType::isPowerOf2ByteWidth() const {
- unsigned BitWidth = getBitWidth();
- return (BitWidth > 7) && isPowerOf2_32(BitWidth);
-}
-
APInt IntegerType::getMask() const {
return APInt::getAllOnesValue(getBitWidth());
}
More information about the llvm-branch-commits
mailing list