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
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::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 @@
       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 @@
   }
   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));