[llvm] r198115 - Mark some Type and EVT methods as LLVM_READONLY.
Craig Topper
craig.topper at gmail.com
Sat Dec 28 08:17:27 PST 2013
Author: ctopper
Date: Sat Dec 28 10:17:26 2013
New Revision: 198115
URL: http://llvm.org/viewvc/llvm-project?rev=198115&view=rev
Log:
Mark some Type and EVT methods as LLVM_READONLY.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
llvm/trunk/include/llvm/IR/Type.h
llvm/trunk/lib/IR/Type.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=198115&r1=198114&r2=198115&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Sat Dec 28 10:17:26 2013
@@ -880,19 +880,19 @@ namespace llvm {
static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
static EVT getExtendedVectorVT(LLVMContext &C, EVT VT,
unsigned NumElements);
- bool isExtendedFloatingPoint() const;
- bool isExtendedInteger() const;
- bool isExtendedVector() const;
- bool isExtended16BitVector() const;
- bool isExtended32BitVector() const;
- bool isExtended64BitVector() const;
- bool isExtended128BitVector() const;
- bool isExtended256BitVector() const;
- bool isExtended512BitVector() const;
- bool isExtended1024BitVector() const;
+ bool isExtendedFloatingPoint() const LLVM_READONLY;
+ bool isExtendedInteger() const LLVM_READONLY;
+ bool isExtendedVector() const LLVM_READONLY;
+ bool isExtended16BitVector() const LLVM_READONLY;
+ bool isExtended32BitVector() const LLVM_READONLY;
+ bool isExtended64BitVector() const LLVM_READONLY;
+ bool isExtended128BitVector() const LLVM_READONLY;
+ bool isExtended256BitVector() const LLVM_READONLY;
+ bool isExtended512BitVector() const LLVM_READONLY;
+ bool isExtended1024BitVector() const LLVM_READONLY;
EVT getExtendedVectorElementType() const;
- unsigned getExtendedVectorNumElements() const;
- unsigned getExtendedSizeInBits() const;
+ unsigned getExtendedVectorNumElements() const LLVM_READONLY;
+ unsigned getExtendedSizeInBits() const LLVM_READONLY;
};
} // End llvm namespace
Modified: llvm/trunk/include/llvm/IR/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=198115&r1=198114&r2=198115&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Type.h (original)
+++ llvm/trunk/include/llvm/IR/Type.h Sat Dec 28 10:17:26 2013
@@ -290,12 +290,12 @@ public:
/// instance of the type is stored to memory. The DataLayout class provides
/// additional query functions to provide this information.
///
- unsigned getPrimitiveSizeInBits() const;
+ unsigned getPrimitiveSizeInBits() const LLVM_READONLY;
/// getScalarSizeInBits - If this is a vector type, return the
/// getPrimitiveSizeInBits value for the element type. Otherwise return the
/// getPrimitiveSizeInBits value for this type.
- unsigned getScalarSizeInBits();
+ unsigned getScalarSizeInBits() const LLVM_READONLY;
/// getFPMantissaWidth - Return the width of the mantissa of this type. This
/// is only valid on floating point types. If the FP type does not
@@ -304,8 +304,8 @@ public:
/// getScalarType - If this is a vector type, return the element type,
/// otherwise return 'this'.
- const Type *getScalarType() const;
- Type *getScalarType();
+ const Type *getScalarType() const LLVM_READONLY;
+ Type *getScalarType() LLVM_READONLY;
//===--------------------------------------------------------------------===//
// Type Iteration support.
Modified: llvm/trunk/lib/IR/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Type.cpp?rev=198115&r1=198114&r2=198115&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Type.cpp (original)
+++ llvm/trunk/lib/IR/Type.cpp Sat Dec 28 10:17:26 2013
@@ -132,7 +132,7 @@ unsigned Type::getPrimitiveSizeInBits()
/// getScalarSizeInBits - If this is a vector type, return the
/// getPrimitiveSizeInBits value for the element type. Otherwise return the
/// getPrimitiveSizeInBits value for this type.
-unsigned Type::getScalarSizeInBits() {
+unsigned Type::getScalarSizeInBits() const {
return getScalarType()->getPrimitiveSizeInBits();
}
More information about the llvm-commits
mailing list