|
LLVM
4.0.0
|
#include <APFloat.h>
Static Public Member Functions | |
| static APFloat | getZero (const fltSemantics &Sem, bool Negative=false) |
| Factory for Positive and Negative Zero. More... | |
| static APFloat | getInf (const fltSemantics &Sem, bool Negative=false) |
| Factory for Positive and Negative Infinity. More... | |
| static APFloat | getNaN (const fltSemantics &Sem, bool Negative=false, unsigned type=0) |
| Factory for NaN values. More... | |
| static APFloat | getQNaN (const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr) |
| Factory for QNaN values. More... | |
| static APFloat | getSNaN (const fltSemantics &Sem, bool Negative=false, const APInt *payload=nullptr) |
| Factory for SNaN values. More... | |
| static APFloat | getLargest (const fltSemantics &Sem, bool Negative=false) |
| Returns the largest finite number in the given semantics. More... | |
| static APFloat | getSmallest (const fltSemantics &Sem, bool Negative=false) |
| Returns the smallest (by magnitude) finite number in the given semantics. More... | |
| static APFloat | getSmallestNormalized (const fltSemantics &Sem, bool Negative=false) |
| Returns the smallest (by magnitude) normalized finite number in the given semantics. More... | |
| static APFloat | getAllOnesValue (unsigned BitWidth, bool isIEEE=false) |
| Returns a float which is bitcasted from an all one value int. More... | |
| static APFloat | copySign (APFloat Value, const APFloat &Sign) |
Static Public Member Functions inherited from llvm::APFloatBase | |
| static unsigned int | semanticsPrecision (const fltSemantics &) |
| static ExponentType | semanticsMinExponent (const fltSemantics &) |
| static ExponentType | semanticsMaxExponent (const fltSemantics &) |
| static unsigned int | semanticsSizeInBits (const fltSemantics &) |
| static unsigned | getSizeInBits (const fltSemantics &Sem) |
| Returns the size of the floating point number (in bits) in the given semantics. More... | |
| static const fltSemantics & | IEEEhalf () |
| static const fltSemantics & | IEEEsingle () |
| static const fltSemantics & | IEEEdouble () |
| static const fltSemantics & | IEEEquad () |
| static const fltSemantics & | PPCDoubleDouble () |
| static const fltSemantics & | x87DoubleExtended () |
| static const fltSemantics & | Bogus () |
| A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real. More... | |
Public Attributes | |
| friend | IEEEFloat |
| friend | DoubleAPFloat |
Friends | |
| hash_code | hash_value (const APFloat &Arg) |
| See friend declarations above. More... | |
| int | ilogb (const APFloat &Arg) |
| APFloat | scalbn (APFloat X, int Exp, roundingMode RM) |
| APFloat | frexp (const APFloat &X, int &Exp, roundingMode RM) |
Additional Inherited Members | |
Public Types inherited from llvm::APFloatBase | |
| enum | cmpResult { cmpLessThan, cmpEqual, cmpGreaterThan, cmpUnordered } |
| IEEE-754R 5.11: Floating Point Comparison Relations. More... | |
| enum | roundingMode { rmNearestTiesToEven, rmTowardPositive, rmTowardNegative, rmTowardZero, rmNearestTiesToAway } |
| IEEE-754R 4.3: Rounding-direction attributes. More... | |
| enum | opStatus { opOK = 0x00, opInvalidOp = 0x01, opDivByZero = 0x02, opOverflow = 0x04, opUnderflow = 0x08, opInexact = 0x10 } |
| IEEE-754R 7: Default exception handling. More... | |
| enum | fltCategory { fcInfinity, fcNaN, fcNormal, fcZero } |
| Category of internally-represented number. More... | |
| enum | uninitializedTag { uninitialized } |
| Convenience enum used to construct an uninitialized APFloat. More... | |
| enum | IlogbErrorKinds { IEK_Zero = INT_MIN + 1, IEK_NaN = INT_MIN, IEK_Inf = INT_MAX } |
Enumeration of ilogb error results. More... | |
| typedef signed short | ExponentType |
| A signed type to represent a floating point numbers unbiased exponent. More... | |
|
inline |
| llvm::APFloat::APFloat | ( | const fltSemantics & | Semantics, |
| StringRef | S | ||
| ) |
Definition at line 4134 of file APFloat.cpp.
References convertFromString(), and llvm::APFloatBase::rmNearestTiesToEven.
|
inline |
|
inline |
|
inline |
|
default |
|
default |
|
inline |
Definition at line 925 of file APFloat.h.
References getSemantics(), and llvm_unreachable.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 1012 of file APFloat.h.
References llvm::detail::IEEEFloat::bitcastToAPInt().
Referenced by llvm::DwarfUnit::addConstantFPValue(), llvm::FunctionComparator::cmpAPFloats(), emitDebugLocValue(), emitGlobalConstantFP(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::ExecutionEngine::getConstantValue(), llvm::AArch64_AM::getFP16Imm(), llvm::ARM_AM::getFP16Imm(), llvm::AArch64_AM::getFP32Imm(), llvm::ARM_AM::getFP32Imm(), llvm::AArch64_AM::getFP64Imm(), llvm::ARM_AM::getFP64Imm(), llvm::SelectionDAG::getNode(), llvm::HexagonLowerToMC(), llvm::NVPTXFloatMCExpr::printImpl(), llvm::AArch64InstructionSelector::select(), toString(), and WriteConstantInternal().
Definition at line 1022 of file APFloat.h.
References llvm::detail::IEEEFloat::bitwiseIsEqual().
Referenced by llvm::DenseMapAPFloatKeyInfo::isEqual(), llvm::ConstantFP::isExactlyValue(), llvm::X86TargetLowering::isFPImmLegal(), and toString().
|
inline |
Definition at line 975 of file APFloat.h.
References llvm::detail::IEEEFloat::changeSign().
Referenced by GetNegatedExpression(), llvm::SelectionDAG::getNode(), and llvm::X86TargetLowering::X86TargetLowering().
|
inline |
Definition at line 976 of file APFloat.h.
References llvm::detail::IEEEFloat::clearSign().
Referenced by llvm::abs(), llvm::SelectionDAG::getNode(), LowerFCOPYSIGN(), and llvm::InstCombiner::visitFCmpInst().
Definition at line 1018 of file APFloat.h.
References llvm::detail::IEEEFloat::compare().
Referenced by llvm::ConstantFoldCompareInstruction(), llvm::MDNode::getMostGenericFPMath(), llvm::isMathLibCallNoop(), llvm::maxnum(), llvm::minnum(), performFPMed3ImmCombine(), and llvm::InstCombiner::visitFCmpInst().
| APFloat::opStatus llvm::APFloat::convert | ( | const fltSemantics & | ToSemantics, |
| roundingMode | RM, | ||
| bool * | losesInfo | ||
| ) |
Definition at line 4139 of file APFloat.cpp.
References assert(), llvm::detail::IEEEFloat::convert(), getSemantics(), llvm_unreachable, llvm::APFloatBase::opOK, llvm::MipsISD::Ret, llvm::semIEEEdouble, llvm::semPPCDoubleDouble, and llvm::semPPCDoubleDoubleImpl.
Referenced by llvm::ConstantFoldCastInstruction(), emitDebugValueComment(), fitsInFPType(), llvm::ConstantFP::get(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getNode(), llvm::ConstantFP::isExactlyValue(), llvm::ConstantFPSDNode::isExactlyValue(), llvm::ConstantFP::isValueValidForType(), LLVMConstRealGetDouble(), llvm::ARMAsmPrinter::lowerOperand(), llvm::NVPTXFloatMCExpr::printImpl(), valueHasFloatPrecision(), llvm::InstCombiner::visitFCmpInst(), WriteConstantInternal(), and llvm::X86TargetLowering::X86TargetLowering().
|
inline |
Definition at line 995 of file APFloat.h.
References llvm::detail::IEEEFloat::convertFromAPInt().
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 999 of file APFloat.h.
References llvm::detail::IEEEFloat::convertFromSignExtendedInteger().
| APFloat::opStatus llvm::APFloat::convertFromString | ( | StringRef | , |
| roundingMode | |||
| ) |
Definition at line 4128 of file APFloat.cpp.
References llvm::detail::IEEEFloat::convertFromString().
Referenced by APFloat().
|
inline |
Definition at line 1005 of file APFloat.h.
References llvm::detail::IEEEFloat::convertFromZeroExtendedInteger().
|
inline |
Definition at line 1013 of file APFloat.h.
References llvm::detail::IEEEFloat::convertToDouble().
Referenced by emitDebugValueComment(), LLVMConstRealGetDouble(), llvm::WebAssemblyMCInstLower::Lower(), and llvm::ARMAsmPrinter::lowerOperand().
|
inline |
Definition at line 1014 of file APFloat.h.
References llvm::detail::IEEEFloat::convertToFloat().
Referenced by emitDebugValueComment(), llvm::FPMathOperator::getFPAccuracy(), LLVMConstRealGetDouble(), and llvm::WebAssemblyMCInstLower::Lower().
|
inline |
Definition at line 1026 of file APFloat.h.
References llvm::detail::IEEEFloat::convertToHexString().
Referenced by toString().
|
inline |
Definition at line 986 of file APFloat.h.
References llvm::detail::IEEEFloat::convertToInteger().
Referenced by llvm::ConstantFoldCastInstruction(), ConvertToSInt(), llvm::BuildVectorSDNode::getConstantFPSplatPow2ToLog2Int(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 991 of file APFloat.h.
References llvm::detail::IEEEFloat::convertToInteger().
Definition at line 977 of file APFloat.h.
References llvm::detail::IEEEFloat::copySign().
Referenced by llvm::SelectionDAG::getNode().
Definition at line 979 of file APFloat.h.
References llvm::detail::IEEEFloat::copySign(), and getSemantics().
|
inline |
Definition at line 942 of file APFloat.h.
References llvm::detail::IEEEFloat::divide(), and llvm::NVPTX::PTXCvtMode::RM.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ExecutionEngine::getConstantValue(), llvm::SelectionDAG::getNode(), and llvm::InstCombiner::visitCallInst().
| void llvm::APFloat::dump | ( | ) | const |
Definition at line 4192 of file APFloat.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 949 of file APFloat.h.
References llvm::detail::IEEEFloat::fusedMultiplyAdd(), and llvm::NVPTX::PTXCvtMode::RM.
Referenced by llvm::SelectionDAG::getNode().
Returns a float which is bitcasted from an all one value int.
| BitWidth | - Select float type |
| isIEEE | - If 128 bit number, select between PPC and IEEE |
Definition at line 4164 of file APFloat.cpp.
References assert(), llvm::APInt::getAllOnesValue(), llvm_unreachable, llvm::semIEEEdouble, llvm::semIEEEhalf, llvm::semIEEEquad, llvm::semIEEEsingle, llvm::semPPCDoubleDouble, and llvm::semX87DoubleExtended.
Referenced by llvm::Constant::getAllOnesValue().
|
inline |
Definition at line 1042 of file APFloat.h.
References llvm::detail::IEEEFloat::getCategory().
Referenced by isInfinity(), isNaN(), and isZero().
Definition at line 1063 of file APFloat.h.
References llvm::detail::IEEEFloat::getExactInverse().
Referenced by CvtFDivConstToReciprocal().
|
inlinestatic |
Factory for Positive and Negative Infinity.
| Negative | True iff the number should be negative. |
Definition at line 850 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::ConstantFP::getInfinity().
|
inlinestatic |
Returns the largest finite number in the given semantics.
| Negative | - True iff the number should be negative |
Definition at line 890 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
|
inlinestatic |
Factory for NaN values.
| Negative | - True iff the NaN generated should be negative. |
| type | - The unspecified fill bits for creating the NaN, 0 by default. The value is truncated as necessary. |
Definition at line 861 of file APFloat.h.
References getQNaN().
Referenced by llvm::ConstantFP::getNaN().
|
inlinestatic |
Factory for QNaN values.
Definition at line 872 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by getNaN(), and toString().
Definition at line 1069 of file APFloat.h.
References assert(), getSemantics(), and llvm::APFloatBase::PPCDoubleDouble().
|
inline |
Definition at line 1043 of file APFloat.h.
Referenced by add(), llvm::FunctionComparator::cmpAPFloats(), convert(), copySign(), CvtFDivConstToReciprocal(), llvm::frexp(), llvm::ConstantFP::get(), getSecondFloat(), llvm::ConstantFP::isExactlyValue(), llvm::isMathLibCallNoop(), llvm::ConstantFP::isValueValidForType(), needsCleanup(), operator*(), operator+(), operator-(), operator/(), llvm::scalbn(), subtract(), toString(), and llvm::InstCombiner::visitCallInst().
|
inlinestatic |
Returns the smallest (by magnitude) finite number in the given semantics.
Might be denormalized, which implies a relative loss of precision.
| Negative | - True iff the number should be negative |
Definition at line 900 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
|
inlinestatic |
Returns the smallest (by magnitude) normalized finite number in the given semantics.
| Negative | - True iff the number should be negative |
Definition at line 910 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::InstCombiner::visitFCmpInst().
|
inlinestatic |
Factory for SNaN values.
Definition at line 880 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
|
inlinestatic |
Factory for Positive and Negative Zero.
| Negative | True iff the number should be negative. |
Definition at line 841 of file APFloat.h.
References llvm::APFloatBase::uninitialized.
Referenced by llvm::ExecutionEngine::getConstantValue(), llvm::ConstantFP::getNegativeZero(), llvm::Constant::getNullValue(), and llvm::X86TargetLowering::X86TargetLowering().
|
inline |
Definition at line 1036 of file APFloat.h.
References llvm::detail::IEEEFloat::isDenormal().
Referenced by isNormal(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1040 of file APFloat.h.
References isInfinity(), and isNaN().
Referenced by isFiniteNonZero().
|
inline |
Definition at line 1045 of file APFloat.h.
References isFinite(), and isZero().
Referenced by CvtFDivConstToReciprocal(), isFiniteNonZeroFp(), and isNormal().
|
inline |
Definition at line 1032 of file APFloat.h.
References llvm::APFloatBase::fcInfinity, and getCategory().
Referenced by isFinite(), llvm::ConstantFP::isInfinity(), llvm::isMathLibCallNoop(), SimplifyFCmpInst(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1050 of file APFloat.h.
References llvm::detail::IEEEFloat::isInteger().
|
inline |
Definition at line 1049 of file APFloat.h.
References llvm::detail::IEEEFloat::isLargest().
|
inline |
Definition at line 1033 of file APFloat.h.
References llvm::APFloatBase::fcNaN, and getCategory().
Referenced by isFinite(), llvm::isMathLibCallNoop(), llvm::ConstantFP::isNaN(), llvm::maxnum(), llvm::minnum(), SimplifyFCmpInst(), toString(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1035 of file APFloat.h.
References llvm::detail::IEEEFloat::isNegative().
Referenced by llvm::isMathLibCallNoop(), llvm::ConstantFP::isNegative(), isNegZero(), isPosZero(), SimplifyFCmpInst(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1047 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::SystemZTargetLowering::isFPImmLegal().
|
inline |
|
inline |
Definition at line 1039 of file APFloat.h.
References isDenormal(), and isFiniteNonZero().
Referenced by isNormalFp(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1046 of file APFloat.h.
References isNegative(), and isZero().
Referenced by llvm::AArch64TargetLowering::isFPImmLegal(), and llvm::PPCTargetLowering::isFPImmLegal().
|
inline |
Definition at line 1037 of file APFloat.h.
References llvm::detail::IEEEFloat::isSignaling().
Referenced by llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 1048 of file APFloat.h.
References llvm::detail::IEEEFloat::isSmallest().
|
inline |
Definition at line 1031 of file APFloat.h.
References llvm::APFloatBase::fcZero, and getCategory().
Referenced by isFiniteNonZero(), llvm::SystemZTargetLowering::isFPImmLegal(), llvm::isMathLibCallNoop(), isNegZero(), isNonZero(), isPosZero(), llvm::ConstantFP::isZero(), SimplifyFCmpInst(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFCmpInst().
Definition at line 948 of file APFloat.h.
References llvm::detail::IEEEFloat::mod().
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 939 of file APFloat.h.
References llvm::detail::IEEEFloat::multiply(), and llvm::NVPTX::PTXCvtMode::RM.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 830 of file APFloat.h.
References getSemantics(), and llvm_unreachable.
Definition at line 957 of file APFloat.h.
References llvm::detail::IEEEFloat::next().
Definition at line 967 of file APFloat.h.
References getSemantics().
Definition at line 959 of file APFloat.h.
References getSemantics().
Definition at line 963 of file APFloat.h.
References getSemantics().
Definition at line 971 of file APFloat.h.
References getSemantics().
| void llvm::APFloat::print | ( | raw_ostream & | OS | ) | const |
|
inline |
Definition at line 923 of file APFloat.h.
References llvm::detail::IEEEFloat::Profile().
Definition at line 945 of file APFloat.h.
References llvm::detail::IEEEFloat::remainder().
|
inline |
Definition at line 954 of file APFloat.h.
References llvm::detail::IEEEFloat::roundToIntegral().
Referenced by llvm::SelectionDAG::getNode().
|
inline |
Definition at line 932 of file APFloat.h.
References getSemantics(), and llvm_unreachable.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ExecutionEngine::getConstantValue(), and llvm::SelectionDAG::getNode().
|
inline |
Definition at line 1055 of file APFloat.h.
References llvm::detail::IEEEFloat::toString().
Referenced by emitGlobalConstantFP(), print(), and toStringAPFloat().
|
friend |
See friend declarations above.
These additional declarations are required in order to compile LLVM with IBM xlC compiler.
Definition at line 4132 of file APFloat.cpp.
|
friend |
| friend llvm::APFloat::DoubleAPFloat |
| friend llvm::APFloat::IEEEFloat |
1.8.6