Intel SPMD Program Compiler  1.3.0
Public Member Functions | Private Member Functions | Private Attributes
ConstExpr Class Reference

Expression representing a compile-time constant value. More...

#include <expr.h>

Inheritance diagram for ConstExpr:
Inheritance graph
[legend]
Collaboration diagram for ConstExpr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConstExpr (const Type *t, int8_t i, SourcePos p)
 ConstExpr (const Type *t, int8_t *i, SourcePos p)
 ConstExpr (const Type *t, uint8_t u, SourcePos p)
 ConstExpr (const Type *t, uint8_t *u, SourcePos p)
 ConstExpr (const Type *t, int16_t i, SourcePos p)
 ConstExpr (const Type *t, int16_t *i, SourcePos p)
 ConstExpr (const Type *t, uint16_t u, SourcePos p)
 ConstExpr (const Type *t, uint16_t *u, SourcePos p)
 ConstExpr (const Type *t, int32_t i, SourcePos p)
 ConstExpr (const Type *t, int32_t *i, SourcePos p)
 ConstExpr (const Type *t, uint32_t u, SourcePos p)
 ConstExpr (const Type *t, uint32_t *u, SourcePos p)
 ConstExpr (const Type *t, float f, SourcePos p)
 ConstExpr (const Type *t, float *f, SourcePos p)
 ConstExpr (const Type *t, double d, SourcePos p)
 ConstExpr (const Type *t, double *d, SourcePos p)
 ConstExpr (const Type *t, int64_t i, SourcePos p)
 ConstExpr (const Type *t, int64_t *i, SourcePos p)
 ConstExpr (const Type *t, uint64_t i, SourcePos p)
 ConstExpr (const Type *t, uint64_t *i, SourcePos p)
 ConstExpr (const Type *t, bool b, SourcePos p)
 ConstExpr (const Type *t, bool *b, SourcePos p)
 ConstExpr (ConstExpr *old, double *values)
 ConstExpr (ConstExpr *old, SourcePos pos)
llvm::Value * GetValue (FunctionEmitContext *ctx) const
const TypeGetType () const
void Print () const
llvm::Constant * GetConstant (const Type *type) const
ExprTypeCheck ()
ExprOptimize ()
int EstimateCost () const
int AsBool (bool *, bool forceVarying=false) const
int AsInt8 (int8_t *, bool forceVarying=false) const
int AsUInt8 (uint8_t *, bool forceVarying=false) const
int AsInt16 (int16_t *, bool forceVarying=false) const
int AsUInt16 (uint16_t *, bool forceVarying=false) const
int AsInt32 (int32_t *, bool forceVarying=false) const
int AsUInt32 (uint32_t *, bool forceVarying=false) const
int AsFloat (float *, bool forceVarying=false) const
int AsInt64 (int64_t *, bool forceVarying=false) const
int AsUInt64 (uint64_t *, bool forceVarying=false) const
int AsDouble (double *, bool forceVarying=false) const
int Count () const

Private Member Functions

AtomicType::BasicType getBasicType () const

Private Attributes

const Typetype
union {
   int8_t   int8Val [ISPC_MAX_NVEC]
   uint8_t   uint8Val [ISPC_MAX_NVEC]
   int16_t   int16Val [ISPC_MAX_NVEC]
   uint16_t   uint16Val [ISPC_MAX_NVEC]
   int32_t   int32Val [ISPC_MAX_NVEC]
   uint32_t   uint32Val [ISPC_MAX_NVEC]
   bool   boolVal [ISPC_MAX_NVEC]
   float   floatVal [ISPC_MAX_NVEC]
   double   doubleVal [ISPC_MAX_NVEC]
   int64_t   int64Val [ISPC_MAX_NVEC]
   uint64_t   uint64Val [ISPC_MAX_NVEC]
}; 

Detailed Description

Expression representing a compile-time constant value.

This class can currently represent compile-time constants of anything that is an AtomicType or an EnumType; for anything more complex, we don't currently have a representation of a compile-time constant that can be further reasoned about.

Definition at line 340 of file expr.h.


Constructor & Destructor Documentation

ConstExpr::ConstExpr ( const Type t,
int8_t  i,
SourcePos  p 
)

Create a ConstExpr from a uniform int8 value

Definition at line 4991 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), int8Val, type, and AtomicType::UniformInt8.

ConstExpr::ConstExpr ( const Type t,
int8_t *  i,
SourcePos  p 
)

Create a ConstExpr from a varying int8 value

Definition at line 5000 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), int8Val, type, AtomicType::UniformInt8, and AtomicType::VaryingInt8.

ConstExpr::ConstExpr ( const Type t,
uint8_t  u,
SourcePos  p 
)

Create a ConstExpr from a uniform uint8 value

Definition at line 5011 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), type, uint8Val, and AtomicType::UniformUInt8.

ConstExpr::ConstExpr ( const Type t,
uint8_t *  u,
SourcePos  p 
)

Create a ConstExpr from a varying uint8 value

Definition at line 5020 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), type, uint8Val, AtomicType::UniformUInt8, and AtomicType::VaryingUInt8.

ConstExpr::ConstExpr ( const Type t,
int16_t  i,
SourcePos  p 
)

Create a ConstExpr from a uniform int16 value

Definition at line 5031 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), int16Val, type, and AtomicType::UniformInt16.

ConstExpr::ConstExpr ( const Type t,
int16_t *  i,
SourcePos  p 
)

Create a ConstExpr from a varying int16 value

Definition at line 5040 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), int16Val, type, AtomicType::UniformInt16, and AtomicType::VaryingInt16.

ConstExpr::ConstExpr ( const Type t,
uint16_t  u,
SourcePos  p 
)

Create a ConstExpr from a uniform uint16 value

Definition at line 5051 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), type, uint16Val, and AtomicType::UniformUInt16.

ConstExpr::ConstExpr ( const Type t,
uint16_t *  u,
SourcePos  p 
)

Create a ConstExpr from a varying uint16 value

Definition at line 5060 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), type, uint16Val, AtomicType::UniformUInt16, and AtomicType::VaryingUInt16.

ConstExpr::ConstExpr ( const Type t,
int32_t  i,
SourcePos  p 
)

Create a ConstExpr from a uniform int32 value

Definition at line 5071 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), int32Val, type, and AtomicType::UniformInt32.

ConstExpr::ConstExpr ( const Type t,
int32_t i,
SourcePos  p 
)

Create a ConstExpr from a varying int32 value

Definition at line 5080 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), int32Val, type, AtomicType::UniformInt32, and AtomicType::VaryingInt32.

ConstExpr::ConstExpr ( const Type t,
uint32_t  u,
SourcePos  p 
)

Create a ConstExpr from a uniform uint32 value

Definition at line 5091 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), Type::IsUniformType(), NULL, type, uint32Val, and AtomicType::UniformUInt32.

ConstExpr::ConstExpr ( const Type t,
uint32_t *  u,
SourcePos  p 
)

Create a ConstExpr from a varying uint32 value

Definition at line 5102 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), NULL, type, uint32Val, AtomicType::UniformUInt32, and AtomicType::VaryingUInt32.

ConstExpr::ConstExpr ( const Type t,
float  f,
SourcePos  p 
)

Create a ConstExpr from a uniform float value

Definition at line 5114 of file expr.cpp.

References AssertPos, Type::Equal(), floatVal, Type::GetAsConstType(), type, and AtomicType::UniformFloat.

ConstExpr::ConstExpr ( const Type t,
float *  f,
SourcePos  p 
)

Create a ConstExpr from a varying float value

Definition at line 5123 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), floatVal, Type::GetAsConstType(), type, AtomicType::UniformFloat, and AtomicType::VaryingFloat.

ConstExpr::ConstExpr ( const Type t,
double  d,
SourcePos  p 
)

Create a ConstExpr from a uniform double value

Definition at line 5174 of file expr.cpp.

References AssertPos, doubleVal, Type::Equal(), Type::GetAsConstType(), type, and AtomicType::UniformDouble.

ConstExpr::ConstExpr ( const Type t,
double *  d,
SourcePos  p 
)

Create a ConstExpr from a varying double value

Definition at line 5183 of file expr.cpp.

References AssertPos, Count(), doubleVal, Type::Equal(), Type::GetAsConstType(), type, AtomicType::UniformDouble, and AtomicType::VaryingDouble.

ConstExpr::ConstExpr ( const Type t,
int64_t  i,
SourcePos  p 
)

Create a ConstExpr from a uniform int64 value

Definition at line 5134 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), int64Val, type, and AtomicType::UniformInt64.

ConstExpr::ConstExpr ( const Type t,
int64_t *  i,
SourcePos  p 
)

Create a ConstExpr from a varying int64 value

Definition at line 5143 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), int64Val, type, AtomicType::UniformInt64, and AtomicType::VaryingInt64.

ConstExpr::ConstExpr ( const Type t,
uint64_t  i,
SourcePos  p 
)

Create a ConstExpr from a uniform uint64 value

Definition at line 5154 of file expr.cpp.

References AssertPos, Type::Equal(), Type::GetAsConstType(), type, uint64Val, and AtomicType::UniformUInt64.

ConstExpr::ConstExpr ( const Type t,
uint64_t *  i,
SourcePos  p 
)

Create a ConstExpr from a varying uint64 value

Definition at line 5163 of file expr.cpp.

References AssertPos, Count(), Type::Equal(), Type::GetAsConstType(), type, uint64Val, AtomicType::UniformUInt64, and AtomicType::VaryingUInt64.

ConstExpr::ConstExpr ( const Type t,
bool  b,
SourcePos  p 
)

Create a ConstExpr from a uniform bool value

Definition at line 5194 of file expr.cpp.

References AssertPos, boolVal, Type::Equal(), Type::GetAsConstType(), type, and AtomicType::UniformBool.

ConstExpr::ConstExpr ( const Type t,
bool *  b,
SourcePos  p 
)

Create a ConstExpr from a varying bool value

Definition at line 5203 of file expr.cpp.

References AssertPos, boolVal, Count(), Type::Equal(), Type::GetAsConstType(), type, AtomicType::UniformBool, and AtomicType::VaryingBool.

ConstExpr::ConstExpr ( ConstExpr old,
double *  values 
)
ConstExpr::ConstExpr ( ConstExpr old,
SourcePos  pos 
)

Member Function Documentation

int ConstExpr::AsBool ( bool *  b,
bool  forceVarying = false 
) const

Return the ConstExpr's values as booleans, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5516 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), UnaryExpr::Optimize(), BinaryExpr::Optimize(), SelectExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsDouble ( double *  d,
bool  forceVarying = false 
) const

Return the ConstExpr's values as doubles, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5474 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), UnaryExpr::Optimize(), BinaryExpr::Optimize(), SelectExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsFloat ( float *  fp,
bool  forceVarying = false 
) const

Return the ConstExpr's values as floats, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5495 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), BinaryExpr::Optimize(), SelectExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsInt16 ( int16_t *  ip,
bool  forceVarying = false 
) const

Return the ConstExpr's values as int16s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5579 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), and TypeCastExpr::Optimize().

int ConstExpr::AsInt32 ( int32_t ip,
bool  forceVarying = false 
) const

Return the ConstExpr's values as int32s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5621 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), lCheckIndicesVersusBounds(), UnaryExpr::Optimize(), BinaryExpr::Optimize(), SelectExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsInt64 ( int64_t *  ip,
bool  forceVarying = false 
) const

Return the ConstExpr's values as int64s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5432 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), SelectExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsInt8 ( int8_t *  ip,
bool  forceVarying = false 
) const

Return the ConstExpr's values as int8s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5537 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), and TypeCastExpr::Optimize().

int ConstExpr::AsUInt16 ( uint16_t *  up,
bool  forceVarying = false 
) const

Return the ConstExpr's values as uint16s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5600 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), and TypeCastExpr::Optimize().

int ConstExpr::AsUInt32 ( uint32_t *  up,
bool  forceVarying = false 
) const

Return the ConstExpr's values as uint32s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5642 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), lEmitEnumDecls(), UnaryExpr::Optimize(), BinaryExpr::Optimize(), and TypeCastExpr::Optimize().

int ConstExpr::AsUInt64 ( uint64_t *  up,
bool  forceVarying = false 
) const

Return the ConstExpr's values as uint64s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5453 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), lIsAllIntZeros(), and TypeCastExpr::Optimize().

int ConstExpr::AsUInt8 ( uint8_t *  up,
bool  forceVarying = false 
) const

Return the ConstExpr's values as uint8s, doing type conversion from the actual type if needed. If forceVarying is true, then type convert to 'varying' so as to always return a number of values equal to the target vector width into the given pointer.

Definition at line 5558 of file expr.cpp.

References boolVal, Count(), doubleVal, FATAL, floatVal, getBasicType(), int16Val, int32Val, int64Val, int8Val, lConvert(), AtomicType::TYPE_BOOL, AtomicType::TYPE_DOUBLE, AtomicType::TYPE_FLOAT, AtomicType::TYPE_INT16, AtomicType::TYPE_INT32, AtomicType::TYPE_INT64, AtomicType::TYPE_INT8, AtomicType::TYPE_UINT16, AtomicType::TYPE_UINT32, AtomicType::TYPE_UINT64, AtomicType::TYPE_UINT8, uint16Val, uint32Val, uint64Val, and uint8Val.

Referenced by GetConstant(), and TypeCastExpr::Optimize().

int ConstExpr::Count ( ) const

Return the number of values in the ConstExpr; should be either 1, if it has uniform type, or the target's vector width if it's varying.

Definition at line 5663 of file expr.cpp.

References g, GetType(), Type::IsVaryingType(), Globals::target, and Target::vectorWidth.

Referenced by AsBool(), AsDouble(), AsFloat(), AsInt16(), AsInt32(), AsInt64(), AsInt8(), AsUInt16(), AsUInt32(), AsUInt64(), AsUInt8(), ConstExpr(), GetConstant(), lConstFoldBinArithOp(), lConstFoldBinIntOp(), lConstFoldBinLogicalOp(), lConstFoldBoolBinOp(), and Print().

int ConstExpr::EstimateCost ( ) const

Definition at line 5817 of file expr.cpp.

AtomicType::BasicType ConstExpr::getBasicType ( ) const [private]
llvm::Constant * ConstExpr::GetConstant ( const Type type) const [virtual]

If this is a constant expression that can be converted to a constant of the given type, this method should return the corresponding llvm::Constant value. Otherwise it should return NULL.

Reimplemented from Expr.

Definition at line 5669 of file expr.cpp.

References AsBool(), AsDouble(), AsFloat(), AsInt16(), AsInt32(), AsInt64(), AsInt8(), AssertPos, AsUInt16(), AsUInt32(), AsUInt64(), AsUInt8(), Count(), Globals::ctx, Debug(), Type::Equal(), Module::errorCount, g, Type::GetAsNonConstType(), Type::GetString(), int32_t, ISPC_MAX_NVEC, Type::IsUniformType(), Type::IsVaryingType(), LLVMBoolVector(), LLVMDouble(), LLVMDoubleVector(), LLVMFalse, LLVMFloat(), LLVMFloatVector(), LLVMInt16(), LLVMInt16Vector(), LLVMInt32(), LLVMInt32Vector(), LLVMInt64(), LLVMInt64Vector(), LLVMInt8(), LLVMInt8Vector(), LLVMTrue, Type::LLVMType(), LLVMUInt16(), LLVMUInt16Vector(), LLVMUInt32(), LLVMUInt32Vector(), LLVMUInt64(), LLVMUInt64Vector(), LLVMUInt8(), LLVMUInt8Vector(), m, NULL, AtomicType::UniformBool, AtomicType::UniformDouble, AtomicType::UniformFloat, AtomicType::UniformInt16, AtomicType::UniformInt32, AtomicType::UniformInt64, AtomicType::UniformInt8, AtomicType::UniformUInt16, AtomicType::UniformUInt32, AtomicType::UniformUInt64, AtomicType::UniformUInt8, AtomicType::VaryingBool, AtomicType::VaryingDouble, AtomicType::VaryingFloat, AtomicType::VaryingInt16, AtomicType::VaryingInt32, AtomicType::VaryingInt64, AtomicType::VaryingInt8, AtomicType::VaryingUInt16, AtomicType::VaryingUInt32, AtomicType::VaryingUInt64, and AtomicType::VaryingUInt8.

const Type * ConstExpr::GetType ( ) const [virtual]
llvm::Value * ConstExpr::GetValue ( FunctionEmitContext ctx) const [virtual]
Expr * ConstExpr::Optimize ( ) [virtual]

This method should perform early optimizations of the expression (constant folding, etc.) and return a pointer to the resulting expression. If an error is encountered during optimization, NULL should be returned.

Implements Expr.

Definition at line 5805 of file expr.cpp.

void ConstExpr::Print ( ) const [virtual]
Expr * ConstExpr::TypeCheck ( ) [virtual]

This method should perform type checking of the expression and return a pointer to the resulting expression. If an error is encountered, NULL should be returned.

Implements Expr.

Definition at line 5811 of file expr.cpp.


Member Data Documentation

union { ... } [private]
bool ConstExpr::boolVal[ISPC_MAX_NVEC]
double ConstExpr::doubleVal[ISPC_MAX_NVEC]
float ConstExpr::floatVal[ISPC_MAX_NVEC]
int16_t ConstExpr::int16Val[ISPC_MAX_NVEC]
int32_t ConstExpr::int32Val[ISPC_MAX_NVEC]
int64_t ConstExpr::int64Val[ISPC_MAX_NVEC]
int8_t ConstExpr::int8Val[ISPC_MAX_NVEC]
const Type* ConstExpr::type [private]

Definition at line 484 of file expr.h.

Referenced by ConstExpr(), getBasicType(), GetType(), and GetValue().

uint16_t ConstExpr::uint16Val[ISPC_MAX_NVEC]
uint32_t ConstExpr::uint32Val[ISPC_MAX_NVEC]
uint64_t ConstExpr::uint64Val[ISPC_MAX_NVEC]
uint8_t ConstExpr::uint8Val[ISPC_MAX_NVEC]

The documentation for this class was generated from the following files: