Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
Expression that represents dereferencing a pointer to get its value. More...
#include <expr.h>
Public Member Functions | |
PtrDerefExpr (Expr *e, SourcePos p) | |
const Type * | GetType () const |
void | Print () const |
Expr * | TypeCheck () |
int | EstimateCost () const |
Public Member Functions inherited from DerefExpr | |
DerefExpr (Expr *e, SourcePos p, unsigned scid=DerefExprID) | |
llvm::Value * | GetValue (FunctionEmitContext *ctx) const |
llvm::Value * | GetLValue (FunctionEmitContext *ctx) const |
const Type * | GetLValueType () const |
Symbol * | GetBaseSymbol () const |
Expr * | Optimize () |
Public Member Functions inherited from Expr | |
Expr (SourcePos p, unsigned scid) | |
virtual std::pair< llvm::Constant *, bool > | GetStorageConstant (const Type *type) const |
virtual std::pair< llvm::Constant *, bool > | GetConstant (const Type *type) const |
Public Member Functions inherited from ASTNode | |
ASTNode (SourcePos p, unsigned scid) | |
virtual | ~ASTNode () |
unsigned | getValueID () const |
Static Public Member Functions | |
static bool | classof (PtrDerefExpr const *) |
static bool | classof (ASTNode const *N) |
Static Public Member Functions inherited from DerefExpr | |
static bool | classof (DerefExpr const *) |
static bool | classof (ASTNode const *N) |
Static Public Member Functions inherited from Expr | |
static bool | classof (Expr const *) |
static bool | classof (ASTNode const *N) |
Static Public Member Functions inherited from ASTNode | |
static bool | classof (ASTNode const *) |
Additional Inherited Members | |
Public Types inherited from ASTNode | |
enum | ASTNodeTy { AddressOfExprID, AssignExprID, BinaryExprID, ConstExprID, DerefExprID, PtrDerefExprID, RefDerefExprID, ExprListID, FunctionCallExprID, FunctionSymbolExprID, IndexExprID, StructMemberExprID, VectorMemberExprID, NewExprID, NullPointerExprID, ReferenceExprID, SelectExprID, SizeOfExprID, SymbolExprID, SyncExprID, TypeCastExprID, UnaryExprID, MaxExprID, AssertStmtID, BreakStmtID, CaseStmtID, ContinueStmtID, DeclStmtID, DefaultStmtID, DeleteStmtID, DoStmtID, ExprStmtID, ForeachActiveStmtID, ForeachStmtID, ForeachUniqueStmtID, ForStmtID, GotoStmtID, IfStmtID, LabeledStmtID, PrintStmtID, ReturnStmtID, StmtListID, SwitchStmtID, UnmaskedStmtID } |
Public Attributes inherited from DerefExpr | |
Expr * | expr |
Public Attributes inherited from ASTNode | |
SourcePos | pos |
Expression that represents dereferencing a pointer to get its value.
|
inlinestatic |
|
inlinestatic |
Definition at line 562 of file expr.h.
References ASTNode::EstimateCost(), Expr::GetType(), ASTNode::getValueID(), Expr::Print(), ASTNode::PtrDerefExprID, and Expr::TypeCheck().
|
virtual |
Estimate the execution cost of the node (not including the cost of the children. The value returned should be based on the COST_* enumerant values defined in ispc.h.
Implements ASTNode.
Definition at line 7306 of file expr.cpp.
References AssertPos, COST_DEREF, COST_GATHER, Module::errorCount, DerefExpr::expr, Expr::GetType(), Type::IsVaryingType(), and m.
|
virtual |
Returns the Type of the expression.
Implements Expr.
Definition at line 7272 of file expr.cpp.
References AssertPos, Module::errorCount, DerefExpr::expr, Type::GetAsVaryingType(), Type::GetBaseType(), Expr::GetType(), Type::IsUniformType(), and m.
Referenced by Print().
|
virtual |
Prints the expression to standard output (used for debugging).
Implements Expr.
Definition at line 7321 of file expr.cpp.
References DerefExpr::expr, GetType(), Expr::Print(), and SourcePos::Print().
|
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 7286 of file expr.cpp.
References AssertPos, Error(), Module::errorCount, DerefExpr::expr, Type::GetString(), Expr::GetType(), and m.