Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
#include <type.h>
Public Member Functions | |
UndefinedStructType (const std::string &name, const Variability variability, bool isConst, SourcePos pos) | |
Variability | GetVariability () const |
bool | IsBoolType () const |
bool | IsFloatType () const |
bool | IsIntType () const |
bool | IsUnsignedType () const |
bool | IsConstType () const |
const Type * | GetBaseType () const |
const UndefinedStructType * | GetAsVaryingType () const |
const UndefinedStructType * | GetAsUniformType () const |
const UndefinedStructType * | GetAsUnboundVariabilityType () const |
const UndefinedStructType * | GetAsSOAType (int width) const |
const UndefinedStructType * | ResolveUnboundVariability (Variability v) const |
const UndefinedStructType * | GetAsConstType () const |
const UndefinedStructType * | GetAsNonConstType () const |
std::string | GetString () const |
std::string | Mangle () const |
std::string | GetCDeclaration (const std::string &name) const |
llvm::Type * | LLVMType (llvm::LLVMContext *ctx) const |
llvm::DIType * | GetDIType (llvm::DIScope *scope) const |
const std::string & | GetStructName () const |
Public Member Functions inherited from Type | |
bool | IsPointerType () const |
bool | IsArrayType () const |
bool | IsReferenceType () const |
bool | IsVoidType () const |
bool | IsNumericType () const |
bool | IsUniformType () const |
bool | IsVaryingType () const |
bool | IsSOAType () const |
int | GetSOAWidth () const |
bool | HasUnboundVariability () const |
virtual const Type * | GetAsUnsignedType () const |
virtual const Type * | GetReferenceTarget () const |
virtual llvm::Type * | LLVMStorageType (llvm::LLVMContext *ctx) const |
Private Attributes | |
const std::string | name |
const Variability | variability |
const bool | isConst |
const SourcePos | pos |
Additional Inherited Members | |
Static Public Member Functions inherited from Type | |
static bool | Equal (const Type *a, const Type *b) |
static bool | EqualIgnoringConst (const Type *a, const Type *b) |
static const Type * | MoreGeneralType (const Type *type0, const Type *type1, SourcePos pos, const char *reason, bool forceVarying=false, int vecSize=0) |
static bool | IsBasicType (const Type *type) |
Public Attributes inherited from Type | |
const TypeId | typeId |
Protected Member Functions inherited from Type | |
Type (TypeId id) | |
Type implementation representing a struct name that has been declared but where the struct members haven't been defined (i.e. "struct Foo;"). This class doesn't do much besides serve as a placeholder that other code can use to detect the presence of such as truct.
UndefinedStructType::UndefinedStructType | ( | const std::string & | name, |
const Variability | variability, | ||
bool | isConst, | ||
SourcePos | pos | ||
) |
Definition at line 1925 of file type.cpp.
References Assert, Globals::ctx, g, lMangleStructName(), lStructTypeMap, name, Variability::Unbound, and variability.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), and ResolveUnboundVariability().
|
virtual |
Get a const version of this type. If it's already const, then the old Type pointer is returned.
Implements Type.
Definition at line 1979 of file type.cpp.
References isConst, name, pos, UndefinedStructType(), and variability.
|
virtual |
Get a non-const version of this type. If it's already not const, then the old Type pointer is returned.
Implements Type.
Definition at line 1985 of file type.cpp.
References isConst, name, pos, UndefinedStructType(), and variability.
|
virtual |
|
virtual |
Get an instance of the type with unbound variability.
Implements Type.
Definition at line 1962 of file type.cpp.
References isConst, name, pos, Variability::Unbound, UndefinedStructType(), and variability.
|
virtual |
Return a "uniform" instance of this type. If the type is already uniform, its "this" pointer will be returned.
Implements Type.
Definition at line 1956 of file type.cpp.
References isConst, name, pos, UndefinedStructType(), Variability::Uniform, and variability.
|
virtual |
Return a "varying" instance of this type. If the type is already varying, its "this" pointer will be returned.
Implements Type.
Definition at line 1950 of file type.cpp.
References isConst, name, pos, UndefinedStructType(), variability, and Variability::Varying.
|
virtual |
|
virtual |
|
virtual |
Returns the DIType (LLVM's debugging information structure), corresponding to this type.
Implements Type.
Definition at line 2023 of file type.cpp.
References Module::diBuilder, SourcePos::first_line, SourcePos::GetDIFile(), m, name, and pos.
|
virtual |
Returns a text representation of the type (for example, for use in warning and error messages).
Implements Type.
Definition at line 1991 of file type.cpp.
References Variability::GetString(), isConst, name, and variability.
|
inline |
|
virtual |
Returns the variability of the type.
Implements Type.
Definition at line 1936 of file type.cpp.
References variability.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the LLVM type corresponding to this ispc type.
Implements Type.
Definition at line 2013 of file type.cpp.
References Assert, Module::errorCount, lMangleStructName(), lStructTypeMap, m, name, Variability::Unbound, and variability.
|
virtual |
Returns a string that represents the mangled type (for use in mangling function symbol names for function overloading). The various Types implementations of this method should collectively ensure that all of them use mangling schemes that are guaranteed not to clash.
Implements Type.
Definition at line 2001 of file type.cpp.
References isConst, lMangleStruct(), name, and variability.
|
virtual |
Implements Type.
Definition at line 1973 of file type.cpp.
References isConst, name, pos, Variability::Unbound, UndefinedStructType(), and variability.
|
private |
Definition at line 776 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), GetCDeclaration(), GetString(), IsConstType(), Mangle(), and ResolveUnboundVariability().
|
private |
Definition at line 774 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), GetCDeclaration(), GetDIType(), GetString(), LLVMType(), Mangle(), ResolveUnboundVariability(), and UndefinedStructType().
|
private |
Definition at line 777 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), GetDIType(), and ResolveUnboundVariability().
|
private |
Definition at line 775 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), GetString(), GetVariability(), LLVMType(), Mangle(), ResolveUnboundVariability(), and UndefinedStructType().