|
LLVM
4.0.0
|
#include "llvm/Support/Compiler.h"#include "llvm/Support/SwapByteOrder.h"#include <algorithm>#include <cassert>#include <cstring>#include <type_traits>#include <limits>Go to the source code of this file.
Classes | |
| struct | llvm::detail::TrailingZerosCounter< T, SizeOfT > |
| struct | llvm::detail::LeadingZerosCounter< T, SizeOfT > |
| struct | llvm::detail::PopulationCounter< T, SizeOfT > |
| struct | llvm::detail::PopulationCounter< T, 8 > |
| struct | llvm::AlignTo< Align > |
alignTo for contexts where a constant expression is required. More... | |
| struct | llvm::AlignTo< Align >::from_value< Value > |
Namespaces | |
| llvm | |
| Compute iterated dominance frontiers using a linear time algorithm. | |
| llvm::detail | |
| Implementation details of the pass manager interfaces. | |
Macros | |
| #define | R2(n) n, n + 2 * 64, n + 1 * 64, n + 3 * 64 |
| #define | R4(n) R2(n), R2(n + 2 * 16), R2(n + 1 * 16), R2(n + 3 * 16) |
| #define | R6(n) R4(n), R4(n + 2 * 4), R4(n + 1 * 4), R4(n + 3 * 4) |
Enumerations | |
| enum | llvm::ZeroBehavior { llvm::ZB_Undefined, llvm::ZB_Max, llvm::ZB_Width } |
| The behavior an operation has on an input of 0. More... | |
Functions | |
| template<typename T > | |
| std::size_t | llvm::countTrailingZeros (T Val, ZeroBehavior ZB=ZB_Width) |
| Count number of 0's from the least significant bit to the most stopping at the first 1. More... | |
| template<typename T > | |
| std::size_t | llvm::countLeadingZeros (T Val, ZeroBehavior ZB=ZB_Width) |
| Count number of 0's from the most significant bit to the least stopping at the first 1. More... | |
| template<typename T > | |
| T | llvm::findFirstSet (T Val, ZeroBehavior ZB=ZB_Max) |
| Get the index of the first set bit starting from the least significant bit. More... | |
| template<typename T > | |
| T | llvm::findLastSet (T Val, ZeroBehavior ZB=ZB_Max) |
| Get the index of the last set bit starting from the least significant bit. More... | |
| template<typename T > | |
| T | llvm::reverseBits (T Val) |
Reverse the bits in Val. More... | |
| constexpr uint32_t | llvm::Hi_32 (uint64_t Value) |
| Hi_32 - This function returns the high 32 bits of a 64 bit value. More... | |
| constexpr uint32_t | llvm::Lo_32 (uint64_t Value) |
| Lo_32 - This function returns the low 32 bits of a 64 bit value. More... | |
| constexpr uint64_t | llvm::Make_64 (uint32_t High, uint32_t Low) |
| Make_64 - This functions makes a 64-bit integer from a high / low pair of 32-bit integers. More... | |
| template<unsigned N> | |
| constexpr bool | llvm::isInt (int64_t x) |
| isInt - Checks if an integer fits into the given bit width. More... | |
| template<> | |
| constexpr bool | llvm::isInt< 8 > (int64_t x) |
| template<> | |
| constexpr bool | llvm::isInt< 16 > (int64_t x) |
| template<> | |
| constexpr bool | llvm::isInt< 32 > (int64_t x) |
| template<unsigned N, unsigned S> | |
| constexpr bool | llvm::isShiftedInt (int64_t x) |
| isShiftedInt<N,S> - Checks if a signed integer is an N bit number shifted left by S. More... | |
| template<unsigned N> | |
| constexpr std::enable_if<(N < 64), bool >::type | llvm::isUInt (uint64_t X) |
| isUInt - Checks if an unsigned integer fits into the given bit width. More... | |
| template<unsigned N> | |
| constexpr bool::type | llvm::isUInt (uint64_t X) |
| template<> | |
| constexpr bool | llvm::isUInt< 8 > (uint64_t x) |
| template<> | |
| constexpr bool | llvm::isUInt< 16 > (uint64_t x) |
| template<> | |
| constexpr bool | llvm::isUInt< 32 > (uint64_t x) |
| template<unsigned N, unsigned S> | |
| constexpr bool | llvm::isShiftedUInt (uint64_t x) |
| Checks if a unsigned integer is an N bit number shifted left by S. More... | |
| uint64_t | llvm::maxUIntN (uint64_t N) |
| Gets the maximum value for a N-bit unsigned integer. More... | |
| int64_t | llvm::minIntN (int64_t N) |
| Gets the minimum value for a N-bit signed integer. More... | |
| int64_t | llvm::maxIntN (int64_t N) |
| Gets the maximum value for a N-bit signed integer. More... | |
| bool | llvm::isUIntN (unsigned N, uint64_t x) |
| isUIntN - Checks if an unsigned integer fits into the given (dynamic) bit width. More... | |
| bool | llvm::isIntN (unsigned N, int64_t x) |
| isIntN - Checks if an signed integer fits into the given (dynamic) bit width. More... | |
| constexpr bool | llvm::isMask_32 (uint32_t Value) |
| isMask_32 - This function returns true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (32 bit version). More... | |
| constexpr bool | llvm::isMask_64 (uint64_t Value) |
| isMask_64 - This function returns true if the argument is a non-empty sequence of ones starting at the least significant bit with the remainder zero (64 bit version). More... | |
| constexpr bool | llvm::isShiftedMask_32 (uint32_t Value) |
| isShiftedMask_32 - This function returns true if the argument contains a non-empty sequence of ones with the remainder zero (32 bit version.) Ex. More... | |
| constexpr bool | llvm::isShiftedMask_64 (uint64_t Value) |
| isShiftedMask_64 - This function returns true if the argument contains a non-empty sequence of ones with the remainder zero (64 bit version.) More... | |
| constexpr bool | llvm::isPowerOf2_32 (uint32_t Value) |
| isPowerOf2_32 - This function returns true if the argument is a power of two > 0. More... | |
| constexpr bool | llvm::isPowerOf2_64 (uint64_t Value) |
isPowerOf2_64 - This function returns true if the argument is a power of two
More... | |
| uint16_t | llvm::ByteSwap_16 (uint16_t Value) |
| ByteSwap_16 - This function returns a byte-swapped representation of the 16-bit argument, Value. More... | |
| uint32_t | llvm::ByteSwap_32 (uint32_t Value) |
| ByteSwap_32 - This function returns a byte-swapped representation of the 32-bit argument, Value. More... | |
| uint64_t | llvm::ByteSwap_64 (uint64_t Value) |
| ByteSwap_64 - This function returns a byte-swapped representation of the 64-bit argument, Value. More... | |
| template<typename T > | |
| std::size_t | llvm::countLeadingOnes (T Value, ZeroBehavior ZB=ZB_Width) |
| Count the number of ones from the most significant bit to the first zero bit. More... | |
| template<typename T > | |
| std::size_t | llvm::countTrailingOnes (T Value, ZeroBehavior ZB=ZB_Width) |
| Count the number of ones from the least significant bit to the first zero bit. More... | |
| template<typename T > | |
| unsigned | llvm::countPopulation (T Value) |
| Count the number of set bits in a value. More... | |
| double | llvm::Log2 (double Value) |
| Log2 - This function returns the log base 2 of the specified value. More... | |
| unsigned | llvm::Log2_32 (uint32_t Value) |
| Log2_32 - This function returns the floor log base 2 of the specified value, -1 if the value is zero. More... | |
| unsigned | llvm::Log2_64 (uint64_t Value) |
| Log2_64 - This function returns the floor log base 2 of the specified value, -1 if the value is zero. More... | |
| unsigned | llvm::Log2_32_Ceil (uint32_t Value) |
| Log2_32_Ceil - This function returns the ceil log base 2 of the specified value, 32 if the value is zero. More... | |
| unsigned | llvm::Log2_64_Ceil (uint64_t Value) |
| Log2_64_Ceil - This function returns the ceil log base 2 of the specified value, 64 if the value is zero. More... | |
| uint64_t | llvm::GreatestCommonDivisor64 (uint64_t A, uint64_t B) |
| GreatestCommonDivisor64 - Return the greatest common divisor of the two values using Euclid's algorithm. More... | |
| double | llvm::BitsToDouble (uint64_t Bits) |
| BitsToDouble - This function takes a 64-bit integer and returns the bit equivalent double. More... | |
| float | llvm::BitsToFloat (uint32_t Bits) |
| BitsToFloat - This function takes a 32-bit integer and returns the bit equivalent float. More... | |
| uint64_t | llvm::DoubleToBits (double Double) |
| DoubleToBits - This function takes a double and returns the bit equivalent 64-bit integer. More... | |
| uint32_t | llvm::FloatToBits (float Float) |
| FloatToBits - This function takes a float and returns the bit equivalent 32-bit integer. More... | |
| constexpr uint64_t | llvm::MinAlign (uint64_t A, uint64_t B) |
| MinAlign - A and B are either alignments or offsets. More... | |
| uintptr_t | llvm::alignAddr (const void *Addr, size_t Alignment) |
Aligns Addr to Alignment bytes, rounding up. More... | |
| size_t | llvm::alignmentAdjustment (const void *Ptr, size_t Alignment) |
Returns the necessary adjustment for aligning Ptr to Alignment bytes, rounding up. More... | |
| uint64_t | llvm::NextPowerOf2 (uint64_t A) |
| NextPowerOf2 - Returns the next power of two (in 64-bits) that is strictly greater than A. More... | |
| uint64_t | llvm::PowerOf2Floor (uint64_t A) |
| Returns the power of two which is less than or equal to the given value. More... | |
| uint64_t | llvm::PowerOf2Ceil (uint64_t A) |
| Returns the power of two which is greater than or equal to the given value. More... | |
| uint64_t | llvm::alignTo (uint64_t Value, uint64_t Align, uint64_t Skew=0) |
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More... | |
| template<uint64_t Align> | |
| constexpr uint64_t | llvm::alignTo (uint64_t Value) |
Returns the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More... | |
| uint64_t | llvm::alignDown (uint64_t Value, uint64_t Align, uint64_t Skew=0) |
Returns the largest uint64_t less than or equal to Value and is Skew mod Align. More... | |
| uint64_t | llvm::OffsetToAlignment (uint64_t Value, uint64_t Align) |
Returns the offset to the next integer (mod 2**64) that is greater than or equal to Value and is a multiple of Align. More... | |
| template<unsigned B> | |
| constexpr int32_t | llvm::SignExtend32 (uint32_t X) |
| Sign-extend the number in the bottom B bits of X to a 32-bit integer. More... | |
| int32_t | llvm::SignExtend32 (uint32_t X, unsigned B) |
| Sign-extend the number in the bottom B bits of X to a 32-bit integer. More... | |
| template<unsigned B> | |
| constexpr int64_t | llvm::SignExtend64 (uint64_t x) |
| Sign-extend the number in the bottom B bits of X to a 64-bit integer. More... | |
| int64_t | llvm::SignExtend64 (uint64_t X, unsigned B) |
| Sign-extend the number in the bottom B bits of X to a 64-bit integer. More... | |
| template<typename T > | |
| std::enable_if < std::is_unsigned< T >::value, T >::type | llvm::AbsoluteDifference (T X, T Y) |
| Subtract two unsigned integers, X and Y, of type T and return the absolute value of the result. More... | |
| template<typename T > | |
| std::enable_if < std::is_unsigned< T >::value, T >::type | llvm::SaturatingAdd (T X, T Y, bool *ResultOverflowed=nullptr) |
| Add two unsigned integers, X and Y, of type T. More... | |
| template<typename T > | |
| std::enable_if < std::is_unsigned< T >::value, T >::type | llvm::SaturatingMultiply (T X, T Y, bool *ResultOverflowed=nullptr) |
| Multiply two unsigned integers, X and Y, of type T. More... | |
| template<typename T > | |
| std::enable_if < std::is_unsigned< T >::value, T >::type | llvm::SaturatingMultiplyAdd (T X, T Y, T A, bool *ResultOverflowed=nullptr) |
| Multiply two unsigned integers, X and Y, and add the unsigned integer, A to the product. More... | |
Variables | |
| static const unsigned char | llvm::BitReverseTable256 [256] |
| Macro compressed bit reversal table for 256 bits. More... | |
| const float | llvm::huge_valf = HUGE_VALF |
| Use this rather than HUGE_VALF; the latter causes warnings on MSVC. More... | |
| #define R2 | ( | n | ) | n, n + 2 * 64, n + 1 * 64, n + 3 * 64 |
Referenced by addOps(), CC_Hexagon32(), DecodeIntRegsRegisterClass(), DecodetcGPRRegisterClass(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::HexagonEvaluator::evaluate(), llvm::PPCInstrInfo::expandPostRAPseudo(), llvm::f64AssignAAPCS(), llvm::f64AssignAPCS(), llvm::f64RetAssign(), foldLogOpOfMaskedICmpsHelper(), llvm::HexagonRegisterInfo::getCalleeSavedRegs(), llvm::HexagonRegisterInfo::getCallerSavedRegs(), llvm::HexagonMCInstrInfo::getDuplexRegisterNumbering(), llvm::getLanaiRegisterNumbering(), getNextRegister(), llvm::AVRTargetLowering::getRegisterByName(), llvm::LanaiRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::isARMArea1Register(), llvm::isARMLowRegister(), llvm::HexagonRegisterInfo::isEHReturnCalleeSaveReg(), llvm::SimpleBitstreamCursor::Read(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), RetCC_Hexagon32(), and llvm::Thumb1FrameLowering::spillCalleeSavedRegisters().
Referenced by addOps(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), CC_Hexagon32(), llvm::CC_PPC32_SVR4_Custom_AlignArgRegs(), llvm::CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), checkNumAlignedDPRCS2Regs(), DecodeIntRegsRegisterClass(), llvm::ARMFrameLowering::determineCalleeSaves(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::ARMFrameLowering::emitEpilogue(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::XCoreRegisterInfo::getCalleeSavedRegs(), llvm::HexagonRegisterInfo::getCallerSavedRegs(), llvm::HexagonMCInstrInfo::getDuplexRegisterNumbering(), llvm::PPCTargetLowering::getExceptionSelectorRegister(), llvm::getLanaiRegisterNumbering(), getNextRegister(), llvm::AVRTargetLowering::getRegisterByName(), llvm::LanaiRegisterInfo::getReservedRegs(), llvm::isARMArea1Register(), llvm::isARMLowRegister(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), RetCC_Hexagon32(), skipAlignedDPRCS2Spills(), and llvm::Thumb1FrameLowering::spillCalleeSavedRegisters().
Referenced by addOps(), llvm::CC_PPC32_SVR4_Custom_AlignArgRegs(), llvm::CC_PPC32_SVR4_Custom_SkipLastArgRegsPPCF128(), DecodeIntRegsRegisterClass(), llvm::BPFFrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::Thumb1FrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::MSP430RegisterInfo::getCalleeSavedRegs(), llvm::XCoreRegisterInfo::getCalleeSavedRegs(), llvm::HexagonRegisterInfo::getCallerSavedRegs(), llvm::HexagonMCInstrInfo::getDuplexRegisterNumbering(), llvm::HexagonRegisterInfo::getFirstCallerSavedNonParamReg(), llvm::getLanaiRegisterNumbering(), getNextRegister(), llvm::AVRTargetLowering::getRegisterByName(), llvm::isARMArea1Register(), llvm::isARMLowRegister(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), and llvm::Thumb1FrameLowering::spillCalleeSavedRegisters().
1.8.6