|
Intel SPMD Program Compiler
1.3.0
|
Type representing a reference to another (non-reference) type. More...
#include <type.h>


Public Member Functions | |
| ReferenceType (const Type *targetType) | |
| Variability | GetVariability () const |
| bool | IsBoolType () const |
| bool | IsFloatType () const |
| bool | IsIntType () const |
| bool | IsUnsignedType () const |
| bool | IsConstType () const |
| const Type * | GetBaseType () const |
| const Type * | GetReferenceTarget () const |
| const ReferenceType * | GetAsVaryingType () const |
| const ReferenceType * | GetAsUniformType () const |
| const ReferenceType * | GetAsUnboundVariabilityType () const |
| const Type * | GetAsSOAType (int width) const |
| const ReferenceType * | ResolveUnboundVariability (Variability v) const |
| const ReferenceType * | GetAsConstType () const |
| const ReferenceType * | 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::DIDescriptor scope) const |
Private Attributes | |
| const Type *const | targetType |
| const ReferenceType * | asOtherConstType |
Type representing a reference to another (non-reference) type.
| ReferenceType::ReferenceType | ( | const Type * | targetType | ) |
Definition at line 2370 of file type.cpp.
References asOtherConstType, and NULL.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), and ResolveUnboundVariability().
| const ReferenceType * ReferenceType::GetAsConstType | ( | ) | const [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 2506 of file type.cpp.
References asOtherConstType, Assert, Module::errorCount, Type::GetAsConstType(), IsConstType(), m, NULL, ReferenceType(), and targetType.
| const ReferenceType * ReferenceType::GetAsNonConstType | ( | ) | const [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 2523 of file type.cpp.
References asOtherConstType, Assert, Module::errorCount, Type::GetAsNonConstType(), IsConstType(), m, NULL, ReferenceType(), and targetType.
| const Type * ReferenceType::GetAsSOAType | ( | int | width | ) | const [virtual] |
| const ReferenceType * ReferenceType::GetAsUnboundVariabilityType | ( | ) | const [virtual] |
Get an instance of the type with unbound variability.
Implements Type.
Definition at line 2477 of file type.cpp.
References Assert, Module::errorCount, Type::GetAsUnboundVariabilityType(), Type::HasUnboundVariability(), m, NULL, ReferenceType(), and targetType.
| const ReferenceType * ReferenceType::GetAsUniformType | ( | ) | const [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 2465 of file type.cpp.
References Assert, Module::errorCount, Type::GetAsUniformType(), Type::IsUniformType(), m, NULL, ReferenceType(), and targetType.
| const ReferenceType * ReferenceType::GetAsVaryingType | ( | ) | const [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 2453 of file type.cpp.
References Assert, Module::errorCount, Type::GetAsVaryingType(), Type::IsVaryingType(), m, NULL, ReferenceType(), and targetType.
| const Type * ReferenceType::GetBaseType | ( | ) | const [virtual] |
Returns the basic root type of the given type. For example, for an array or short-vector, this returns the element type. For a struct or atomic type, it returns itself.
Implements Type.
Definition at line 2443 of file type.cpp.
References Assert, Module::errorCount, Type::GetBaseType(), m, NULL, and targetType.
| std::string ReferenceType::GetCDeclaration | ( | const std::string & | name | ) | const [virtual] |
Returns a string that is the declaration of the same type in C syntax.
Implements Type.
Definition at line 2566 of file type.cpp.
References Assert, Module::errorCount, Type::GetAsNonConstType(), Type::GetCDeclaration(), ArrayType::GetElementCount(), ArrayType::GetElementType(), lShouldPrintName(), m, NULL, and targetType.
| llvm::DIType ReferenceType::GetDIType | ( | llvm::DIDescriptor | scope | ) | const [virtual] |
Returns the DIType (LLVM's debugging information structure), corresponding to this type.
Implements Type.
Definition at line 2616 of file type.cpp.
References Assert, Module::diBuilder, Module::errorCount, Type::GetDIType(), m, NULL, and targetType.
| const Type * ReferenceType::GetReferenceTarget | ( | ) | const [virtual] |
If this is a reference type, returns the type it is referring to. For all other types, just returns its own type.
Reimplemented from Type.
Definition at line 2437 of file type.cpp.
References targetType.
Referenced by emitOffloadParamStruct(), StructMemberExpr::getStructType(), TypeCastExpr::GetValue(), lArgIsPointerType(), lCheckTypeEquality(), and Module::writeDevStub().
| std::string ReferenceType::GetString | ( | ) | const [virtual] |
Returns a text representation of the type (for example, for use in warning and error messages).
Implements Type.
Definition at line 2540 of file type.cpp.
References Assert, Module::errorCount, Type::GetString(), m, NULL, and targetType.
Referenced by InitSymbol().
| Variability ReferenceType::GetVariability | ( | ) | const [virtual] |
Returns the variability of the type.
Implements Type.
Definition at line 2377 of file type.cpp.
References Assert, Module::errorCount, Type::GetVariability(), m, NULL, targetType, and Variability::Unbound.
| bool ReferenceType::IsBoolType | ( | ) | const [virtual] |
Returns true if the underlying type is boolean. In other words, this is true for individual bools and for short-vectors with underlying bool type, but not for arrays of bools.
Implements Type.
Definition at line 2387 of file type.cpp.
References Assert, Module::errorCount, Type::IsBoolType(), m, NULL, and targetType.
| bool ReferenceType::IsConstType | ( | ) | const [virtual] |
Returns true if this type is 'const'-qualified.
Implements Type.
Definition at line 2427 of file type.cpp.
References Assert, Module::errorCount, Type::IsConstType(), m, NULL, and targetType.
Referenced by GetAsConstType(), and GetAsNonConstType().
| bool ReferenceType::IsFloatType | ( | ) | const [virtual] |
Returns true if the underlying type is float or double. In other words, this is true for individual floats/doubles and for short-vectors of them, but not for arrays of them.
Implements Type.
Definition at line 2397 of file type.cpp.
References Assert, Module::errorCount, Type::IsFloatType(), m, NULL, and targetType.
| bool ReferenceType::IsIntType | ( | ) | const [virtual] |
Returns true if the underlying type is an integer type. In other words, this is true for individual integers and for short-vectors of integer types, but not for arrays of integer types.
Implements Type.
Definition at line 2407 of file type.cpp.
References Assert, Module::errorCount, Type::IsIntType(), m, NULL, and targetType.
| bool ReferenceType::IsUnsignedType | ( | ) | const [virtual] |
Returns true if the underlying type is unsigned. In other words, this is true for unsigned integers and short vectors of unsigned integer types.
Implements Type.
Definition at line 2417 of file type.cpp.
References Assert, Module::errorCount, Type::IsUnsignedType(), m, NULL, and targetType.
| llvm::Type * ReferenceType::LLVMType | ( | llvm::LLVMContext * | ctx | ) | const [virtual] |
Returns the LLVM type corresponding to this ispc type
Implements Type.
Definition at line 2599 of file type.cpp.
References Assert, Module::errorCount, Type::LLVMType(), m, NULL, and targetType.
| std::string ReferenceType::Mangle | ( | ) | const [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 2554 of file type.cpp.
References Assert, Module::errorCount, m, Type::Mangle(), NULL, and targetType.
| const ReferenceType * ReferenceType::ResolveUnboundVariability | ( | Variability | v | ) | const [virtual] |
Implements Type.
Definition at line 2496 of file type.cpp.
References Assert, Module::errorCount, m, NULL, ReferenceType(), Type::ResolveUnboundVariability(), and targetType.
const ReferenceType* ReferenceType::asOtherConstType [mutable, private] |
Definition at line 820 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), and ReferenceType().
const Type* const ReferenceType::targetType [private] |
Definition at line 819 of file type.h.
Referenced by GetAsConstType(), GetAsNonConstType(), GetAsUnboundVariabilityType(), GetAsUniformType(), GetAsVaryingType(), GetBaseType(), GetCDeclaration(), GetDIType(), GetReferenceTarget(), GetString(), GetVariability(), IsBoolType(), IsConstType(), IsFloatType(), IsIntType(), IsUnsignedType(), LLVMType(), Mangle(), and ResolveUnboundVariability().
1.7.5.1