MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / getElementType

Function getElementType

src/compiler/cbs/VectorShapeTransformer.cpp:59–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59[[maybe_unused]] static Type *getElementType(Type *Ty) {
60 if (auto VecTy = dyn_cast<VectorType>(Ty)) {
61 return VecTy->getElementType();
62 }
63#if HAS_TYPED_PTR
64 if (auto PtrTy = dyn_cast<PointerType>(Ty)) {
65 if IS_OPAQUE (PtrTy)
66 return nullptr;
67#pragma GCC diagnostic push
68#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
69 return PtrTy->getPointerElementType();
70#pragma GCC diagnostic pop
71 }
72#endif
73 if (auto ArrTy = dyn_cast<ArrayType>(Ty)) {
74 return ArrTy->getElementType();
75 }
76 return nullptr;
77}
78
79VectorShape VectorShapeTransformer::computeShape(const Instruction &I,
80 SmallValVec &taintedOps) const {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected