From c5a75523eff46fe3880b94ae0fd22a1e01c27f28 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 28 Oct 2009 01:08:17 +0000 Subject: [PATCH] Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85358 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APFloat.h | 7 ------ lib/Support/APFloat.cpp | 50 -------------------------------------- 2 files changed, 57 deletions(-) diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index e0b6db1801d..30d998fc3c1 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -277,13 +277,6 @@ namespace llvm { /* 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. */ diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index d286833126f..b9b323c4242 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -2632,56 +2632,6 @@ APFloat::getHashValue() const } } -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. -- 2.34.1