From 23b9b19b1a5a00faa9fce0788155c7dbfd00bfb1 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 12 Aug 2009 00:36:31 +0000 Subject: Add contexts to some of the MVT APIs. No functionality change yet, just the infrastructure work needed to get the contexts to where they need to be first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78759 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/CallingConvEmitter.cpp | 4 ++-- utils/TableGen/TGValueTypes.cpp | 19 ------------------- 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'utils') diff --git a/utils/TableGen/CallingConvEmitter.cpp b/utils/TableGen/CallingConvEmitter.cpp index df962c7b78..28ba2ed49f 100644 --- a/utils/TableGen/CallingConvEmitter.cpp +++ b/utils/TableGen/CallingConvEmitter.cpp @@ -163,12 +163,12 @@ void CallingConvEmitter::EmitAction(Record *Action, O << Size << ", "; else O << "\n" << IndentStr << " State.getTarget().getTargetData()" - "->getTypeAllocSize(LocVT.getTypeForEVT()), "; + "->getTypeAllocSize(LocVT.getTypeForEVT(State.getContext())), "; if (Align) O << Align; else O << "\n" << IndentStr << " State.getTarget().getTargetData()" - "->getABITypeAlignment(LocVT.getTypeForEVT())"; + "->getABITypeAlignment(LocVT.getTypeForEVT(State.getContext()))"; O << ");\n" << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset" << Counter << ", LocVT, LocInfo));\n"; diff --git a/utils/TableGen/TGValueTypes.cpp b/utils/TableGen/TGValueTypes.cpp index a50c9843fe..122d085b0d 100644 --- a/utils/TableGen/TGValueTypes.cpp +++ b/utils/TableGen/TGValueTypes.cpp @@ -64,25 +64,6 @@ static std::map static std::map, const Type *> ExtendedVectorTypeMap; -EVT EVT::getExtendedIntegerVT(unsigned BitWidth) { - const Type *&ET = ExtendedIntegerTypeMap[BitWidth]; - if (!ET) ET = new ExtendedIntegerType(BitWidth); - EVT VT; - VT.LLVMTy = ET; - assert(VT.isExtended() && "Type is not extended!"); - return VT; -} - -EVT EVT::getExtendedVectorVT(EVT VT, unsigned NumElements) { - const Type *&ET = ExtendedVectorTypeMap[std::make_pair(VT.getRawBits(), - NumElements)]; - if (!ET) ET = new ExtendedVectorType(VT, NumElements); - EVT ResultVT; - ResultVT.LLVMTy = ET; - assert(ResultVT.isExtended() && "Type is not extended!"); - return ResultVT; -} - bool EVT::isExtendedFloatingPoint() const { assert(isExtended() && "Type is not extended!"); // Extended floating-point types are not supported yet. -- cgit v1.2.3