diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
commit | debcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch) | |
tree | 22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff) |
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index a8398243c7..eca726a1df 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -798,7 +798,7 @@ void SelectionDAG::VerifyNode(SDNode *N) { unsigned SelectionDAG::getMVTAlignment(MVT VT) const { const Type *Ty = VT == MVT::iPTR ? PointerType::get(Type::Int8Ty, 0) : - VT.getTypeForMVT(*Context); + VT.getTypeForMVT(); return TLI.getTargetData()->getABITypeAlignment(Ty); } @@ -1389,7 +1389,7 @@ SDValue SelectionDAG::getShiftAmountOperand(SDValue Op) { SDValue SelectionDAG::CreateStackTemporary(MVT VT, unsigned minAlign) { MachineFrameInfo *FrameInfo = getMachineFunction().getFrameInfo(); unsigned ByteSize = VT.getStoreSizeInBits()/8; - const Type *Ty = VT.getTypeForMVT(*Context); + const Type *Ty = VT.getTypeForMVT(); unsigned StackAlign = std::max((unsigned)TLI.getTargetData()->getPrefTypeAlignment(Ty), minAlign); @@ -1402,8 +1402,8 @@ SDValue SelectionDAG::CreateStackTemporary(MVT VT, unsigned minAlign) { SDValue SelectionDAG::CreateStackTemporary(MVT VT1, MVT VT2) { unsigned Bytes = std::max(VT1.getStoreSizeInBits(), VT2.getStoreSizeInBits())/8; - const Type *Ty1 = VT1.getTypeForMVT(*Context); - const Type *Ty2 = VT2.getTypeForMVT(*Context); + const Type *Ty1 = VT1.getTypeForMVT(); + const Type *Ty2 = VT2.getTypeForMVT(); const TargetData *TD = TLI.getTargetData(); unsigned Align = std::max(TD->getPrefTypeAlignment(Ty1), TD->getPrefTypeAlignment(Ty2)); @@ -3104,8 +3104,7 @@ bool MeetsMaxMemopRequirement(std::vector<MVT> &MemOps, MVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr, DAG); if (VT != MVT::iAny) { unsigned NewAlign = (unsigned) - TLI.getTargetData()->getABITypeAlignment(VT.getTypeForMVT( - *DAG.getContext())); + TLI.getTargetData()->getABITypeAlignment(VT.getTypeForMVT()); // If source is a string constant, this will require an unaligned load. if (NewAlign > Align && (isSrcConst || AllowUnalign)) { if (Dst.getOpcode() != ISD::FrameIndex) { |