| 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 | |
| 79 | VectorShape VectorShapeTransformer::computeShape(const Instruction &I, |
| 80 | SmallValVec &taintedOps) const { |
no outgoing calls
no test coverage detected