llvm::toVectorizedTy

A helper for converting to vectorized types. For scalar types, this is equivalent to calling toVectorTy. For struct types, this returns a new struct where each element type has been widened to a vector type. Note: - If the incoming type is void, we return void - If EC is scalar, Ty is returned unchanged - Only unpacked literal struct types are supported

Synopsis

Declared in <llvm/IR/VectorTypeUtils.h>

Type*
toVectorizedTy(
    Type* Ty,
    ElementCount EC);

Return Value

The instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.

Parameters

NameDescription
TyThe instances of the Type class are immutable: once they are created, they are never changed. Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.