Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.474 -> 1.475 SelectionDAGISel.cpp updated: 1.367 -> 1.368 TargetLowering.cpp updated: 1.90 -> 1.91 --- Log message: For PR1195: http://llvm.org/PR1195 : Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. --- Diffs of the changes: (+33 -33) LegalizeDAG.cpp | 2 - SelectionDAGISel.cpp | 58 +++++++++++++++++++++++++-------------------------- TargetLowering.cpp | 6 ++--- 3 files changed, 33 insertions(+), 33 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.474 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.475 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.474 Tue Feb 13 23:52:17 2007 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Feb 14 20:26:09 2007 @@ -3874,7 +3874,7 @@ CV.push_back(UndefValue::get(OpNTy)); } } - Constant *CP = ConstantPacked::get(CV); + Constant *CP = ConstantVector::get(CV); SDOperand CPIdx = DAG.getConstantPool(CP, TLI.getPointerTy()); return DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0); } Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.367 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.368 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.367 Wed Feb 14 01:34:56 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Feb 14 20:26:09 2007 @@ -281,7 +281,7 @@ else { MVT::ValueType VT1,VT2; NumElements = - TLI.getPackedTypeBreakdown(cast<PackedType>(PN->getType()), + TLI.getVectorTypeBreakdown(cast<VectorType>(PN->getType()), VT1, VT2); } unsigned PHIReg = ValueMap[PN]; @@ -306,7 +306,7 @@ // If this is a packed type, figure out what type it will decompose into // and how many of the elements it will use. if (VT == MVT::Vector) { - const PackedType *PTy = cast<PackedType>(V->getType()); + const VectorType *PTy = cast<VectorType>(V->getType()); unsigned NumElts = PTy->getNumElements(); MVT::ValueType EltTy = TLI.getValueType(PTy->getElementType()); @@ -504,7 +504,7 @@ void visitEitherBinary(User &I, unsigned ScalarOp, unsigned VectorOp); void visitShift(User &I, unsigned Opcode); void visitAdd(User &I) { - if (isa<PackedType>(I.getType())) + if (isa<VectorType>(I.getType())) visitVectorBinary(I, ISD::VADD); else if (I.getType()->isFloatingPoint()) visitScalarBinary(I, ISD::FADD); @@ -513,7 +513,7 @@ } void visitSub(User &I); void visitMul(User &I) { - if (isa<PackedType>(I.getType())) + if (isa<VectorType>(I.getType())) visitVectorBinary(I, ISD::VMUL); else if (I.getType()->isFloatingPoint()) visitScalarBinary(I, ISD::FMUL); @@ -601,11 +601,11 @@ } else if (isa<ConstantPointerNull>(C)) { return N = DAG.getConstant(0, TLI.getPointerTy()); } else if (isa<UndefValue>(C)) { - if (!isa<PackedType>(VTy)) + if (!isa<VectorType>(VTy)) return N = DAG.getNode(ISD::UNDEF, VT); // Create a VBUILD_VECTOR of undef nodes. - const PackedType *PTy = cast<PackedType>(VTy); + const VectorType *PTy = cast<VectorType>(VTy); unsigned NumElements = PTy->getNumElements(); MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); @@ -619,7 +619,7 @@ &Ops[0], Ops.size()); } else if (ConstantFP *CFP = dyn_cast<ConstantFP>(C)) { return N = DAG.getConstantFP(CFP->getValue(), VT); - } else if (const PackedType *PTy = dyn_cast<PackedType>(VTy)) { + } else if (const VectorType *PTy = dyn_cast<VectorType>(VTy)) { unsigned NumElements = PTy->getNumElements(); MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); @@ -627,7 +627,7 @@ // Constant or ConstantFP node onto the ops list for each element of // the packed constant. SmallVector<SDOperand, 8> Ops; - if (ConstantPacked *CP = dyn_cast<ConstantPacked>(C)) { + if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) { for (unsigned i = 0; i != NumElements; ++i) Ops.push_back(getValue(CP->getOperand(i))); } else { @@ -691,8 +691,8 @@ // Otherwise, if this is a vector, make it available as a generic vector // here. MVT::ValueType PTyElementVT, PTyLegalElementVT; - const PackedType *PTy = cast<PackedType>(VTy); - unsigned NE = TLI.getPackedTypeBreakdown(PTy, PTyElementVT, + const VectorType *PTy = cast<VectorType>(VTy); + unsigned NE = TLI.getVectorTypeBreakdown(PTy, PTyElementVT, PTyLegalElementVT); // Build a VBUILD_VECTOR with the input registers. @@ -1377,7 +1377,7 @@ void SelectionDAGLowering::visitSub(User &I) { // -0.0 - X --> fneg const Type *Ty = I.getType(); - if (isa<PackedType>(Ty)) { + if (isa<VectorType>(Ty)) { visitVectorBinary(I, ISD::VSUB); } else if (Ty->isFloatingPoint()) { if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0))) @@ -1400,8 +1400,8 @@ void SelectionDAGLowering::visitVectorBinary(User &I, unsigned OpCode) { - assert(isa<PackedType>(I.getType())); - const PackedType *Ty = cast<PackedType>(I.getType()); + assert(isa<VectorType>(I.getType())); + const VectorType *Ty = cast<VectorType>(I.getType()); SDOperand Typ = DAG.getValueType(TLI.getValueType(Ty->getElementType())); setValue(&I, DAG.getNode(OpCode, MVT::Vector, @@ -1413,7 +1413,7 @@ void SelectionDAGLowering::visitEitherBinary(User &I, unsigned ScalarOp, unsigned VectorOp) { - if (isa<PackedType>(I.getType())) + if (isa<VectorType>(I.getType())) visitVectorBinary(I, VectorOp); else visitScalarBinary(I, ScalarOp); @@ -1501,7 +1501,7 @@ SDOperand Cond = getValue(I.getOperand(0)); SDOperand TrueVal = getValue(I.getOperand(1)); SDOperand FalseVal = getValue(I.getOperand(2)); - if (!isa<PackedType>(I.getType())) { + if (!isa<VectorType>(I.getType())) { setValue(&I, DAG.getNode(ISD::SELECT, TrueVal.getValueType(), Cond, TrueVal, FalseVal)); } else { @@ -1611,7 +1611,7 @@ if (DestVT == MVT::Vector) { // This is a cast to a vector from something else. // Get information about the output vector. - const PackedType *DestTy = cast<PackedType>(I.getType()); + const VectorType *DestTy = cast<VectorType>(I.getType()); MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType()); setValue(&I, DAG.getNode(ISD::VBIT_CONVERT, DestVT, N, DAG.getConstant(DestTy->getNumElements(),MVT::i32), @@ -1793,7 +1793,7 @@ const Value *SV, SDOperand Root, bool isVolatile) { SDOperand L; - if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) { + if (const VectorType *PTy = dyn_cast<VectorType>(Ty)) { MVT::ValueType PVT = TLI.getValueType(PTy->getElementType()); L = DAG.getVecLoad(PTy->getNumElements(), PVT, Root, Ptr, DAG.getSrcValue(SV)); @@ -1863,7 +1863,7 @@ // If this is a vector type, force it to the right packed type. if (Op.getValueType() == MVT::Vector) { - const PackedType *OpTy = cast<PackedType>(I.getOperand(i)->getType()); + const VectorType *OpTy = cast<VectorType>(I.getOperand(i)->getType()); MVT::ValueType EltVT = TLI.getValueType(OpTy->getElementType()); MVT::ValueType VVT = MVT::getVectorType(EltVT, OpTy->getNumElements()); @@ -1880,7 +1880,7 @@ if (I.getType() != Type::VoidTy) { MVT::ValueType VT = TLI.getValueType(I.getType()); if (VT == MVT::Vector) { - const PackedType *DestTy = cast<PackedType>(I.getType()); + const VectorType *DestTy = cast<VectorType>(I.getType()); MVT::ValueType EltVT = TLI.getValueType(DestTy->getElementType()); VT = MVT::getVectorType(EltVT, DestTy->getNumElements()); @@ -1915,7 +1915,7 @@ DAG.setRoot(Chain); } if (I.getType() != Type::VoidTy) { - if (const PackedType *PTy = dyn_cast<PackedType>(I.getType())) { + if (const VectorType *PTy = dyn_cast<VectorType>(I.getType())) { MVT::ValueType EVT = TLI.getValueType(PTy->getElementType()); Result = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, Result, DAG.getConstant(PTy->getNumElements(), MVT::i32), @@ -2966,8 +2966,8 @@ } else { // Otherwise, this is a vector type. We only support legal vectors // right now. - unsigned NumElems = cast<PackedType>(I->getType())->getNumElements(); - const Type *EltTy = cast<PackedType>(I->getType())->getElementType(); + unsigned NumElems = cast<VectorType>(I->getType())->getNumElements(); + const Type *EltTy = cast<VectorType>(I->getType())->getElementType(); // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the packed type. @@ -3031,7 +3031,7 @@ } else { // Otherwise, this is a vector type. We only support legal vectors // right now. - const PackedType *PTy = cast<PackedType>(I->getType()); + const VectorType *PTy = cast<VectorType>(I->getType()); unsigned NumElems = PTy->getNumElements(); const Type *EltTy = PTy->getElementType(); @@ -3154,7 +3154,7 @@ } else { // Otherwise, this is a vector type. We only support legal vectors // right now. - const PackedType *PTy = cast<PackedType>(Args[i].Ty); + const VectorType *PTy = cast<VectorType>(Args[i].Ty); unsigned NumElems = PTy->getNumElements(); const Type *EltTy = PTy->getElementType(); @@ -3200,7 +3200,7 @@ } else { // Otherwise, this is a vector type. We only support legal vectors // right now. - const PackedType *PTy = cast<PackedType>(RetTy); + const VectorType *PTy = cast<VectorType>(RetTy); unsigned NumElems = PTy->getNumElements(); const Type *EltTy = PTy->getElementType(); @@ -3238,8 +3238,8 @@ if (VT == MVT::Vector) { // Insert a VBITCONVERT to convert from the packed result type to the // MVT::Vector type. - unsigned NumElems = cast<PackedType>(RetTy)->getNumElements(); - const Type *EltTy = cast<PackedType>(RetTy)->getElementType(); + unsigned NumElems = cast<VectorType>(RetTy)->getNumElements(); + const Type *EltTy = cast<VectorType>(RetTy)->getElementType(); // Figure out if there is a Packed type corresponding to this Vector // type. If so, convert to the packed type. @@ -3938,7 +3938,7 @@ } else if (SrcVT == MVT::Vector) { // Handle copies from generic vectors to registers. MVT::ValueType PTyElementVT, PTyLegalElementVT; - unsigned NE = TLI.getPackedTypeBreakdown(cast<PackedType>(V->getType()), + unsigned NE = TLI.getVectorTypeBreakdown(cast<VectorType>(V->getType()), PTyElementVT, PTyLegalElementVT); // Insert a VBIT_CONVERT of the input vector to a "N x PTyElementVT" @@ -4133,7 +4133,7 @@ else { MVT::ValueType VT1,VT2; NumElements = - TLI.getPackedTypeBreakdown(cast<PackedType>(PN->getType()), + TLI.getVectorTypeBreakdown(cast<VectorType>(PN->getType()), VT1, VT2); } for (unsigned i = 0, e = NumElements; i != e; ++i) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.90 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.91 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.90 Tue Feb 13 17:41:38 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed Feb 14 20:26:10 2007 @@ -278,13 +278,13 @@ return NULL; } -/// getPackedTypeBreakdown - Packed types are broken down into some number of +/// getVectorTypeBreakdown - Packed types are broken down into some number of /// legal first class types. For example, <8 x float> maps to 2 MVT::v4f32 /// with Altivec or SSE1, or 8 promoted MVT::f64 values with the X86 FP stack. /// /// This method returns the number and type of the resultant breakdown. /// -unsigned TargetLowering::getPackedTypeBreakdown(const PackedType *PTy, +unsigned TargetLowering::getVectorTypeBreakdown(const VectorType *PTy, MVT::ValueType &PTyElementVT, MVT::ValueType &PTyLegalElementVT) const { // Figure out the right, legal destination reg to copy into. @@ -2206,6 +2206,6 @@ case Type::FloatTyID: return MVT::f32; case Type::DoubleTyID: return MVT::f64; case Type::PointerTyID: return PointerTy; - case Type::PackedTyID: return MVT::Vector; + case Type::VectorTyID: return MVT::Vector; } } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits