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 | c277dc408bea3697fbaa3429658c4d8deff3f066 (patch) | |
| tree | f65e750a09ae0ea781e0dc379886adaf7be21a77 /llvm/lib/CodeGen/SelectionDAG | |
| parent | bf61e3b4d3fd81eb65c44bd71b6e001127906b98 (diff) | |
| download | bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.tar.gz bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.zip  | |
Privatize the ConstantFP table.  I'm on a roll!
llvm-svn: 76097
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 5 | 
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4491eb262b9..85ade6fc715 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 4f90bb31fcf..3c85118cada 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/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));  | 

