[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp
Jim Laskey
jlaskey at apple.com
Wed Aug 17 13:06:34 PDT 2005
Changes in directory llvm/lib/VMCore:
Constants.cpp updated: 1.127 -> 1.128
---
Log message:
Move code dependency for MathExtras.h out of Constants.h.
---
Diffs of the changes: (+9 -0)
Constants.cpp | 9 +++++++++
1 files changed, 9 insertions(+)
Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.127 llvm/lib/VMCore/Constants.cpp:1.128
--- llvm/lib/VMCore/Constants.cpp:1.127 Wed Aug 17 14:34:49 2005
+++ llvm/lib/VMCore/Constants.cpp Wed Aug 17 15:06:22 2005
@@ -812,6 +812,15 @@
static ValueMap<uint64_t, Type, ConstantFP> DoubleConstants;
static ValueMap<uint32_t, Type, ConstantFP> FloatConstants;
+bool ConstantFP::isNullValue() const {
+ return DoubleToBits(Val) == 0;
+}
+
+bool ConstantFP::isExactlyValue(double V) const {
+ return DoubleToBits(V) == DoubleToBits(Val);
+}
+
+
ConstantFP *ConstantFP::get(const Type *Ty, double V) {
if (Ty == Type::FloatTy) {
// Force the value through memory to normalize it.
More information about the llvm-commits
mailing list