[llvm-commits] [llvm] r85358 - in /llvm/trunk: include/llvm/ADT/APFloat.h lib/Support/APFloat.cpp
Evan Cheng
evan.cheng at apple.com
Tue Oct 27 18:08:17 PDT 2009
Author: evancheng
Date: Tue Oct 27 20:08:17 2009
New Revision: 85358
URL: http://llvm.org/viewvc/llvm-project?rev=85358&view=rev
Log:
Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.
Modified:
llvm/trunk/include/llvm/ADT/APFloat.h
llvm/trunk/lib/Support/APFloat.cpp
Modified: llvm/trunk/include/llvm/ADT/APFloat.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=85358&r1=85357&r2=85358&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APFloat.h (original)
+++ llvm/trunk/include/llvm/ADT/APFloat.h Tue Oct 27 20:08:17 2009
@@ -277,13 +277,6 @@
/* Return an arbitrary integer value usable for hashing. */
uint32_t getHashValue() const;
- /// getIEEEFloatParts / getIEEEDoubleParts - Return exponent, significant,
- /// and sign bit of an IEEE float / IEEE double value.
- void getIEEEFloatParts(bool &Sign, uint32_t &Exp,
- uint32_t &Significant) const;
- void getIEEEDoubleParts(bool &Sign, uint64_t &Exp,
- uint64_t &Significant) const;
-
private:
/* Trivial queries. */
Modified: llvm/trunk/lib/Support/APFloat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APFloat.cpp?rev=85358&r1=85357&r2=85358&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APFloat.cpp (original)
+++ llvm/trunk/lib/Support/APFloat.cpp Tue Oct 27 20:08:17 2009
@@ -2632,56 +2632,6 @@
}
}
-void APFloat::getIEEEFloatParts(bool &Sign, uint32_t &Exp,
- uint32_t &Significand) const {
- assert(semantics == (const llvm::fltSemantics*)&IEEEsingle &&
- "Float semantics are not IEEEsingle");
- assert(partCount()==1);
-
- if (category == fcNormal) {
- Exp = exponent+127; // bias
- Significand = (uint32_t)*significandParts();
- if (Exp == 1 && !(Significand & 0x800000))
- Exp = 0; // denormal
- } else if (category==fcZero) {
- Exp = 0;
- Significand = 0;
- } else if (category==fcInfinity) {
- Exp = 0xff;
- Significand = 0;
- } else {
- assert(category == fcNaN && "Unknown category!");
- Exp = 0xff;
- Significand = (uint32_t)*significandParts();
- }
- Sign = sign;
-}
-
-void APFloat::getIEEEDoubleParts(bool &Sign, uint64_t &Exp,
- uint64_t &Significand) const {
- assert(semantics == (const llvm::fltSemantics*)&IEEEdouble &&
- "Float semantics are not IEEEdouble");
- assert(partCount()==1);
-
- if (category == fcNormal) {
- Exp = exponent+1023; // bias
- Significand = *significandParts();
- if (Exp == 1 && !(Significand & 0x10000000000000LL))
- Exp = 0; // denormal
- } else if (category==fcZero) {
- Exp = 0;
- Significand = 0;
- } else if (category==fcInfinity) {
- Exp = 0x7ff;
- Significand = 0;
- } else {
- assert(category == fcNaN && "Unknown category!");
- Exp = 0x7ff;
- Significand = *significandParts();
- }
- Sign = sign;
-}
-
// Conversion from APFloat to/from host float/double. It may eventually be
// possible to eliminate these and have everybody deal with APFloats, but that
// will take a while. This approach will not easily extend to long double.
More information about the llvm-commits
mailing list