[PATCH] D77268: Clean up usages of asserting vector getters in Type
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 15:49:36 PDT 2020
ctetreau updated this revision to Diff 255836.
ctetreau added a comment.
rebase, mention amdgpu in commit message
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77268/new/
https://reviews.llvm.org/D77268
Files:
llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
@@ -152,7 +152,7 @@
}
if (IsV3 && Size >= 32) {
- V4Ty = VectorType::get(VT->getVectorElementType(), 4);
+ V4Ty = VectorType::get(VT->getElementType(), 4);
// Use the hack that clang uses to avoid SelectionDAG ruining v3 loads
AdjustedArgTy = V4Ty;
}
Index: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
@@ -153,7 +153,7 @@
case Type::PointerTyID:
return getValueType(Ty->getPointerElementType(), TypeName);
case Type::VectorTyID:
- return getValueType(Ty->getVectorElementType(), TypeName);
+ return getValueType(cast<VectorType>(Ty)->getElementType(), TypeName);
default:
return ValueType::Struct;
}
@@ -188,7 +188,7 @@
case Type::VectorTyID: {
auto VecTy = cast<VectorType>(Ty);
auto ElTy = VecTy->getElementType();
- auto NumElements = VecTy->getVectorNumElements();
+ auto NumElements = VecTy->getNumElements();
return (Twine(getTypeName(ElTy, Signed)) + Twine(NumElements)).str();
}
default:
@@ -600,7 +600,7 @@
case Type::PointerTyID:
return getValueType(Ty->getPointerElementType(), TypeName);
case Type::VectorTyID:
- return getValueType(Ty->getVectorElementType(), TypeName);
+ return getValueType(cast<VectorType>(Ty)->getElementType(), TypeName);
default:
return "struct";
}
@@ -635,7 +635,7 @@
case Type::VectorTyID: {
auto VecTy = cast<VectorType>(Ty);
auto ElTy = VecTy->getElementType();
- auto NumElements = VecTy->getVectorNumElements();
+ auto NumElements = VecTy->getNumElements();
return (Twine(getTypeName(ElTy, Signed)) + Twine(NumElements)).str();
}
default:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77268.255836.patch
Type: text/x-patch
Size: 2074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200407/6ffa3833/attachment-0001.bin>
More information about the llvm-commits
mailing list