Intel SPMD Program Compiler  1.9.1
Classes | Enumerations | Functions
type.h File Reference

File with declarations for classes related to type representation. More...

#include "ispc.h"
#include "util.h"
#include <llvm/IR/Type.h>
#include <llvm/IR/DerivedTypes.h>
#include <llvm/ADT/SmallVector.h>
Include dependency graph for type.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Variability
 
class  Type
 Interface class that defines the type abstraction. More...
 
class  AtomicType
 AtomicType represents basic types like floats, ints, etc. More...
 
class  EnumType
 Type implementation for enumerated types. More...
 
class  PointerType
 Type implementation for pointers to other types. More...
 
class  CollectionType
 Abstract base class for types that represent collections of other types. More...
 
class  SequentialType
 Abstract base class for types that represent sequences. More...
 
class  ArrayType
 One-dimensional array type. More...
 
class  VectorType
 A (short) vector of atomic types. More...
 
class  StructType
 Representation of a structure holding a number of members. More...
 
class  UndefinedStructType
 
class  ReferenceType
 Type representing a reference to another (non-reference) type. More...
 
class  FunctionType
 Type representing a function (return type + argument types) More...
 

Enumerations

enum  TypeId {
  ATOMIC_TYPE, ENUM_TYPE, POINTER_TYPE, ARRAY_TYPE,
  VECTOR_TYPE, STRUCT_TYPE, UNDEFINED_STRUCT_TYPE, REFERENCE_TYPE,
  FUNCTION_TYPE
}
 

Functions

template<typename T >
const T * CastType (const Type *type)
 
template<>
const AtomicTypeCastType (const Type *type)
 
template<>
const EnumTypeCastType (const Type *type)
 
template<>
const PointerTypeCastType (const Type *type)
 
template<>
const ArrayTypeCastType (const Type *type)
 
template<>
const VectorTypeCastType (const Type *type)
 
template<>
const SequentialTypeCastType (const Type *type)
 
template<>
const CollectionTypeCastType (const Type *type)
 
template<>
const StructTypeCastType (const Type *type)
 
template<>
const UndefinedStructTypeCastType (const Type *type)
 
template<>
const ReferenceTypeCastType (const Type *type)
 
template<>
const FunctionTypeCastType (const Type *type)
 
bool IsReferenceType (const Type *t)
 

Detailed Description

File with declarations for classes related to type representation.

Definition in file type.h.

Enumeration Type Documentation

enum TypeId

Enumerant that records each of the types that inherit from the Type baseclass.

Enumerator
ATOMIC_TYPE 
ENUM_TYPE 
POINTER_TYPE 
ARRAY_TYPE 
VECTOR_TYPE 
STRUCT_TYPE 
UNDEFINED_STRUCT_TYPE 
REFERENCE_TYPE 
FUNCTION_TYPE 

Definition at line 83 of file type.h.

Function Documentation

template<typename T >
const T* CastType ( const Type type)
inline

Definition at line 988 of file type.h.

template<>
const AtomicType* CastType ( const Type type)
inline

Definition at line 998 of file type.h.

References ATOMIC_TYPE, and Type::typeId.

template<>
const EnumType* CastType ( const Type type)
inline

Definition at line 1006 of file type.h.

References ENUM_TYPE, and Type::typeId.

template<>
const PointerType* CastType ( const Type type)
inline

Definition at line 1014 of file type.h.

References POINTER_TYPE, and Type::typeId.

template<>
const ArrayType* CastType ( const Type type)
inline

Definition at line 1022 of file type.h.

References ARRAY_TYPE, and Type::typeId.

template<>
const VectorType* CastType ( const Type type)
inline

Definition at line 1030 of file type.h.

References Type::typeId, and VECTOR_TYPE.

template<>
const SequentialType* CastType ( const Type type)
inline

Definition at line 1038 of file type.h.

References ARRAY_TYPE, Type::typeId, and VECTOR_TYPE.

template<>
const CollectionType* CastType ( const Type type)
inline

Definition at line 1049 of file type.h.

References ARRAY_TYPE, STRUCT_TYPE, Type::typeId, and VECTOR_TYPE.

template<>
const StructType* CastType ( const Type type)
inline

Definition at line 1061 of file type.h.

References STRUCT_TYPE, and Type::typeId.

template<>
const UndefinedStructType* CastType ( const Type type)
inline

Definition at line 1069 of file type.h.

References Type::typeId, and UNDEFINED_STRUCT_TYPE.

template<>
const ReferenceType* CastType ( const Type type)
inline

Definition at line 1077 of file type.h.

References REFERENCE_TYPE, and Type::typeId.

template<>
const FunctionType* CastType ( const Type type)
inline

Definition at line 1085 of file type.h.

References FUNCTION_TYPE, and Type::typeId.

bool IsReferenceType ( const Type t)
inline

Definition at line 1093 of file type.h.

Referenced by DeclStmt::EmitCode(), and ReturnStmt::EmitCode().