Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Member Functions | Static Public Member Functions | List of all members
PtrDerefExpr Class Reference

Expression that represents dereferencing a pointer to get its value. More...

#include <expr.h>

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

Public Member Functions

 PtrDerefExpr (Expr *e, SourcePos p)
 
const TypeGetType () const
 
void Print () const
 
ExprTypeCheck ()
 
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 TypeGetLValueType () const
 
SymbolGetBaseSymbol () const
 
ExprOptimize ()
 
- 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
Exprexpr
 
- Public Attributes inherited from ASTNode
SourcePos pos
 

Detailed Description

Expression that represents dereferencing a pointer to get its value.

Definition at line 557 of file expr.h.

Constructor & Destructor Documentation

◆ PtrDerefExpr()

PtrDerefExpr::PtrDerefExpr ( Expr e,
SourcePos  p 
)

Definition at line 7270 of file expr.cpp.

Member Function Documentation

◆ classof() [1/2]

static bool PtrDerefExpr::classof ( PtrDerefExpr const *  )
inlinestatic

Definition at line 561 of file expr.h.

◆ classof() [2/2]

static bool PtrDerefExpr::classof ( ASTNode const *  N)
inlinestatic

◆ EstimateCost()

int PtrDerefExpr::EstimateCost ( ) const
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.

◆ GetType()

const Type * PtrDerefExpr::GetType ( ) const
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().

◆ Print()

void PtrDerefExpr::Print ( ) const
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().

◆ TypeCheck()

Expr * PtrDerefExpr::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 7286 of file expr.cpp.

References AssertPos, Error(), Module::errorCount, DerefExpr::expr, Type::GetString(), Expr::GetType(), and m.


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