Intel SPMD Program Compiler  1.9.1
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 llvm::Constant * 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 583 of file expr.h.

Constructor & Destructor Documentation

PtrDerefExpr::PtrDerefExpr ( Expr e,
SourcePos  p 
)

Definition at line 7579 of file expr.cpp.

Member Function Documentation

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

Definition at line 587 of file expr.h.

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

Definition at line 588 of file expr.h.

References ASTNode::getValueID(), and ASTNode::PtrDerefExprID.

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 7626 of file expr.cpp.

References AssertPos, COST_DEREF, COST_GATHER, Module::errorCount, DerefExpr::expr, Expr::GetType(), Type::IsVaryingType(), and m.

const Type * PtrDerefExpr::GetType ( ) const
virtual

Returns the Type of the expression.

Implements Expr.

Definition at line 7585 of file expr.cpp.

References AssertPos, Module::errorCount, DerefExpr::expr, Type::GetAsVaryingType(), Type::GetBaseType(), Expr::GetType(), Type::IsUniformType(), and m.

Referenced by Print().

void PtrDerefExpr::Print ( ) const
virtual

Prints the expression to standard output (used for debugging).

Implements Expr.

Definition at line 7643 of file expr.cpp.

References DerefExpr::expr, GetType(), Expr::Print(), and SourcePos::Print().

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 7601 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: