summaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-15 02:26:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-15 02:26:10 +0000
commit9d6565a5b1fbc4286d6ee638d8f47a3171a9ed7e (patch)
tree6bac879128a02cb08acd536416a5f2d32fb465a7 /lib/Bytecode
parentb7d61101b1a9e28541470e05af1321fea76f08e5 (diff)
For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Reader/Analyzer.cpp4
-rw-r--r--lib/Bytecode/Reader/Reader.cpp20
-rw-r--r--lib/Bytecode/Writer/Writer.cpp8
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/Bytecode/Reader/Analyzer.cpp b/lib/Bytecode/Reader/Analyzer.cpp
index 880605c40fc..75b3ca7aa82 100644
--- a/lib/Bytecode/Reader/Analyzer.cpp
+++ b/lib/Bytecode/Reader/Analyzer.cpp
@@ -423,8 +423,8 @@ public:
bca.numValues++;
}
- virtual void handleConstantPacked(
- const PackedType* PT,
+ virtual void handleConstantVector(
+ const VectorType* PT,
Constant**Elements, unsigned NumElts,
unsigned TypeSlot,
Constant* PackedVal)
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp
index d516910d80f..bafe7d32503 100644
--- a/lib/Bytecode/Reader/Reader.cpp
+++ b/lib/Bytecode/Reader/Reader.cpp
@@ -482,7 +482,7 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds,
break;
}
case Instruction::InsertElement: {
- const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+ const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
if (!PackedTy || Oprnds.size() != 3)
error("Invalid insertelement instruction!");
@@ -496,13 +496,13 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds,
break;
}
case Instruction::ShuffleVector: {
- const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+ const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
if (!PackedTy || Oprnds.size() != 3)
error("Invalid shufflevector instruction!");
Value *V1 = getValue(iType, Oprnds[0]);
Value *V2 = getValue(iType, Oprnds[1]);
- const PackedType *EltTy =
- PackedType::get(Type::Int32Ty, PackedTy->getNumElements());
+ const VectorType *EltTy =
+ VectorType::get(Type::Int32Ty, PackedTy->getNumElements());
Value *V3 = getValue(getTypeSlot(EltTy), Oprnds[2]);
if (!ShuffleVectorInst::isValidOperands(V1, V2, V3))
error("Invalid shufflevector instruction!");
@@ -1029,10 +1029,10 @@ const Type *BytecodeReader::ParseType() {
Result = ArrayType::get(ElementType, NumElements);
break;
}
- case Type::PackedTyID: {
+ case Type::VectorTyID: {
const Type *ElementType = readType();
unsigned NumElements = read_vbr_uint();
- Result = PackedType::get(ElementType, NumElements);
+ Result = VectorType::get(ElementType, NumElements);
break;
}
case Type::StructTyID: {
@@ -1314,8 +1314,8 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
break;
}
- case Type::PackedTyID: {
- const PackedType *PT = cast<PackedType>(Ty);
+ case Type::VectorTyID: {
+ const VectorType *PT = cast<VectorType>(Ty);
unsigned NumElements = PT->getNumElements();
unsigned TypeSlot = getTypeSlot(PT->getElementType());
std::vector<Constant*> Elements;
@@ -1323,8 +1323,8 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
while (NumElements--) // Read all of the elements of the constant.
Elements.push_back(getConstantValue(TypeSlot,
read_vbr_uint()));
- Result = ConstantPacked::get(PT, Elements);
- if (Handler) Handler->handleConstantPacked(PT, &Elements[0],Elements.size(),
+ Result = ConstantVector::get(PT, Elements);
+ if (Handler) Handler->handleConstantVector(PT, &Elements[0],Elements.size(),
TypeSlot, Result);
break;
}
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 78d628343e7..de15267d5ca 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -242,8 +242,8 @@ void BytecodeWriter::outputType(const Type *T) {
break;
}
- case Type::PackedTyID: {
- const PackedType *PT = cast<PackedType>(T);
+ case Type::VectorTyID: {
+ const VectorType *PT = cast<VectorType>(T);
output_typeid(Table.getTypeSlot(PT->getElementType()));
output_vbr(PT->getNumElements());
break;
@@ -326,8 +326,8 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
break;
}
- case Type::PackedTyID: {
- const ConstantPacked *CP = cast<ConstantPacked>(CPV);
+ case Type::VectorTyID: {
+ const ConstantVector *CP = cast<ConstantVector>(CPV);
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
output_vbr(Table.getSlot(CP->getOperand(i)));
break;