aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-14 22:26:36 +0000
committerDale Johannesen <dalej@apple.com>2007-09-14 22:26:36 +0000
commit9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c (patch)
treec30fb34d6aa099b2c600d4a43088b7e99ef4e79b /include/llvm
parent24f2ea3971065eb9e88d50ebeddad0463337cae3 (diff)
downloadexternal_llvm-9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c.zip
external_llvm-9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c.tar.gz
external_llvm-9e3d3abd937c9bb79d56d25ec0e0724c7cbba67c.tar.bz2
Remove the assumption that FP's are either float or
double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/ADT/APInt.h10
-rw-r--r--include/llvm/ADT/FoldingSet.h2
-rw-r--r--include/llvm/Constants.h3
3 files changed, 10 insertions, 5 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index 9a5643b..c6055df 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -153,11 +153,6 @@ class APInt {
const APInt &RHS, uint32_t rhsWords,
APInt *Quotient, APInt *Remainder);
-#ifndef NDEBUG
- /// @brief debug method
- void dump() const;
-#endif
-
public:
/// @name Constructors
/// @{
@@ -1165,6 +1160,11 @@ public:
static void tcSetLeastSignificantBits(integerPart *, unsigned int,
unsigned int bits);
+#ifndef NDEBUG
+ /// @brief debug method
+ void dump() const;
+#endif
+
/// @}
};
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 155243a..7fca638 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -18,6 +18,7 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/APFloat.h"
#include <string>
namespace llvm {
@@ -153,6 +154,7 @@ public:
void AddInteger(uint64_t I);
void AddFloat(float F);
void AddDouble(double D);
+ void AddAPFloat(const APFloat& apf);
void AddString(const std::string &String);
/// ComputeHash - Compute a strong hash value for this NodeID, used to
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index b6b3f63..2f3ad9d 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -231,6 +231,9 @@ public:
/// considers -0.0 to be null as well as 0.0. :(
virtual bool isNullValue() const;
+ // Get a negative zero.
+ static ConstantFP *getNegativeZero(const Type* Ty);
+
/// isExactlyValue - We don't rely on operator== working on double values, as
/// it returns true for things that are clearly not equal, like -0.0 and 0.0.
/// As such, this method can be used to do an exact bit-for-bit comparison of