/// VINSERT_VECTOR_ELT(VECTOR, VAL, IDX, COUNT,TYPE) - Given a vector
/// VECTOR, an element ELEMENT, and a (potentially variable) index IDX,
- /// return an vector with the specified element of VECTOR replaced with VAL.
+ /// return a vector with the specified element of VECTOR replaced with VAL.
/// COUNT and TYPE specify the type of vector, as is standard for V* nodes.
VINSERT_VECTOR_ELT,
return get(std::vector<Constant*>(Vals, Vals+NumVals));
}
- /// getType - Specialize the getType() method to always return an VectorType,
+ /// getType - Specialize the getType() method to always return a VectorType,
/// which reduces the amount of casting needed in parts of the compiler.
///
inline const VectorType *getType() const {
return reinterpret_cast<const VectorType*>(Value::getType());
}
- /// @returns the value for an packed integer constant of the given type that
+ /// @returns the value for a vector integer constant of the given type that
/// has all its bits set to true.
/// @brief Get the all ones value
static ConstantVector *getAllOnesValue(const VectorType *Ty);
/// created as ConstantAggregateZero objects.
virtual bool isNullValue() const { return false; }
- /// This function will return true iff every element in this packed constant
+ /// This function will return true iff every element in this vector constant
/// is set to all ones.
/// @returns true iff this constant's emements are all set to all ones.
/// @brief Determine if the value is all ones.
static Constant *getShuffleVector(Constant *V1, Constant *V2, Constant *Mask);
/// Floating point negation must be implemented with f(x) = -0.0 - x. This
- /// method returns the negative zero constant for floating point or packed
+ /// method returns the negative zero constant for floating point or vector
/// floating point types; for all other types, it returns the null value.
static Constant *getZeroValueForNegationExpr(const Type *Ty);
Ops.push_back(DAG.getCopyFromReg(DAG.getEntryNode(), InReg++,
PTyElementVT));
} else if (PTyElementVT < PTyLegalElementVT) {
- // If the register was promoted, use TRUNCATE of FP_ROUND as appropriate.
+ // If the register was promoted, use TRUNCATE or FP_ROUND as appropriate.
for (unsigned i = 0; i != NE; ++i) {
SDOperand Op = DAG.getCopyFromReg(DAG.getEntryNode(), InReg++,
PTyElementVT);
}
-// EliminateBlockCases - Given an vector of bb/value pairs, remove any entries
+// EliminateBlockCases - Given a vector of bb/value pairs, remove any entries
// in the list that match the specified block.
static void EliminateBlockCases(BasicBlock *BB,
std::vector<std::pair<ConstantInt*, BasicBlock*> > &Cases) {
return 0;
}
-/// @returns the value for an packed integer constant of the given type that
+/// @returns the value for a vector integer constant of the given type that
/// has all its bits set to true.
/// @brief Get the all ones value
ConstantVector *ConstantVector::getAllOnesValue(const VectorType *Ty) {
std::vector<Constant*> Elts;
Elts.resize(Ty->getNumElements(),
ConstantInt::getAllOnesValue(Ty->getElementType()));
- assert(Elts[0] && "Not a packed integer type!");
+ assert(Elts[0] && "Not a vector integer type!");
return cast<ConstantVector>(ConstantVector::get(Elts));
}
assert((C->getType() == T->getElementType() ||
(T->isAbstract() &&
C->getType()->getTypeID() == T->getElementType()->getTypeID())) &&
- "Initializer for packed element doesn't match packed element type!");
+ "Initializer for vector element doesn't match vector element type!");
OL->init(C, this);
}
}
Constant *ConstantVector::get(const VectorType *Ty,
const std::vector<Constant*> &V) {
- // If this is an all-zero packed, return a ConstantAggregateZero object
+ // If this is an all-zero vector, return a ConstantAggregateZero object
if (!V.empty()) {
Constant *C = V[0];
if (!C->isNullValue())
destroyConstantImpl();
}
-/// This function will return true iff every element in this packed constant
+/// This function will return true iff every element in this vector constant
/// is set to all ones.
/// @returns true iff this constant's emements are all set to all ones.
/// @brief Determine if the value is all ones.
VectorType *VectorType::get(const Type *ElementType, unsigned NumElements) {
- assert(ElementType && "Can't get packed of null types!");
+ assert(ElementType && "Can't get vector of null types!");
assert(isPowerOf2_32(NumElements) && "Vector length should be a power of 2!");
VectorValType PVT(ElementType, NumElements);