[llvm-commits] [llvm] r41409 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Dale Johannesen
dalej at apple.com
Sat Aug 25 18:18:27 PDT 2007
Author: johannes
Date: Sat Aug 25 20:18:27 2007
New Revision: 41409
URL: http://llvm.org/viewvc/llvm-project?rev=41409&view=rev
Log:
Revise per review comments.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=41409&r1=41408&r2=41409&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Sat Aug 25 20:18:27 2007
@@ -1154,7 +1154,7 @@
getSDVTList(VT)),
Value(VT==MVT::f64 ? APFloat(val) : APFloat((float)val)) {
}
- ConstantFPSDNode(bool isTarget, APFloat val, MVT::ValueType VT)
+ ConstantFPSDNode(bool isTarget, const APFloat& val, MVT::ValueType VT)
: SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP,
getSDVTList(VT)), Value(val) {
}
@@ -1168,7 +1168,7 @@
else
return Value.convertToFloat();
}
- APFloat getValueAPF() const { return Value; }
+ const APFloat& getValueAPF() const { return Value; }
/// 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.
@@ -1180,7 +1180,7 @@
else
return isExactlyValue(APFloat((float)V));
}
- bool isExactlyValue(APFloat V) const;
+ bool isExactlyValue(const APFloat& V) const;
static bool classof(const ConstantFPSDNode *) { return true; }
static bool classof(const SDNode *N) {
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=41409&r1=41408&r2=41409&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Aug 25 20:18:27 2007
@@ -3195,7 +3195,7 @@
return DAG.getNode(ISD::FCOPYSIGN, VT, N0, N1);
if (N1CFP) {
- APFloat V = N1CFP->getValueAPF();
+ const APFloat& V = N1CFP->getValueAPF();
// copysign(x, c1) -> fabs(x) iff ispos(c1)
// copysign(x, c1) -> fneg(fabs(x)) iff isneg(c1)
if (!V.isNegative())
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=41409&r1=41408&r2=41409&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Aug 25 20:18:27 2007
@@ -48,7 +48,7 @@
/// 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
/// two floating point values.
-bool ConstantFPSDNode::isExactlyValue(APFloat V) const {
+bool ConstantFPSDNode::isExactlyValue(const APFloat& V) const {
return Value.bitwiseIsEqual(V);
}
More information about the llvm-commits
mailing list