diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
commit | 48db02d0d921faded40a05912717a380e0f62642 (patch) | |
tree | 264a207cfc9ab42468c68293bbda6da7f4ade3e3 /lib/CodeGen | |
parent | 9ffdfb86ecd3d2f35102142f15187294778dcc57 (diff) | |
download | external_llvm-48db02d0d921faded40a05912717a380e0f62642.zip external_llvm-48db02d0d921faded40a05912717a380e0f62642.tar.gz external_llvm-48db02d0d921faded40a05912717a380e0f62642.tar.bz2 |
Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4491eb2..85ade6f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -916,7 +916,7 @@ SDValue SelectionDAG::getIntPtrConstant(uint64_t Val, bool isTarget) { SDValue SelectionDAG::getConstantFP(const APFloat& V, MVT VT, bool isTarget) { - return getConstantFP(*ConstantFP::get(V), VT, isTarget); + return getConstantFP(*Context->getConstantFP(V), VT, isTarget); } SDValue SelectionDAG::getConstantFP(const ConstantFP& V, MVT VT, bool isTarget){ diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 4f90bb3..3c85118 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -2146,7 +2146,8 @@ void SelectionDAGLowering::visitFSub(User &I) { const VectorType *DestTy = cast<VectorType>(I.getType()); const Type *ElTy = DestTy->getElementType(); unsigned VL = DestTy->getNumElements(); - std::vector<Constant*> NZ(VL, Context->getConstantFPNegativeZero(ElTy)); + std::vector<Constant*> NZ(VL, + DAG.getContext()->getConstantFPNegativeZero(ElTy)); Constant *CNZ = DAG.getContext()->getConstantVector(&NZ[0], NZ.size()); if (CV == CNZ) { SDValue Op2 = getValue(I.getOperand(1)); @@ -2158,7 +2159,7 @@ void SelectionDAGLowering::visitFSub(User &I) { } if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0))) if (CFP->isExactlyValue( - Context->getConstantFPNegativeZero(Ty)->getValueAPF())) { + DAG.getContext()->getConstantFPNegativeZero(Ty)->getValueAPF())) { SDValue Op2 = getValue(I.getOperand(1)); setValue(&I, DAG.getNode(ISD::FNEG, getCurDebugLoc(), Op2.getValueType(), Op2)); |