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

A sync statement in the program (waits for all launched tasks before proceeding). More...

#include <expr.h>

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

Public Member Functions

 SyncExpr (SourcePos p)
 
llvm::Value * GetValue (FunctionEmitContext *ctx) const
 
const TypeGetType () const
 
ExprTypeCheck ()
 
ExprOptimize ()
 
void Print () const
 
int EstimateCost () const
 
- Public Member Functions inherited from Expr
 Expr (SourcePos p, unsigned scid)
 
virtual llvm::Value * GetLValue (FunctionEmitContext *ctx) const
 
virtual const TypeGetLValueType () const
 
virtual SymbolGetBaseSymbol () const
 
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 (SyncExpr 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 ASTNode
SourcePos pos
 

Detailed Description

A sync statement in the program (waits for all launched tasks before proceeding).

Definition at line 710 of file expr.h.

Constructor & Destructor Documentation

◆ SyncExpr()

SyncExpr::SyncExpr ( SourcePos  p)
inline

Definition at line 712 of file expr.h.

Member Function Documentation

◆ classof() [1/2]

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

Definition at line 714 of file expr.h.

◆ classof() [2/2]

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

◆ EstimateCost()

int SyncExpr::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 8051 of file expr.cpp.

References COST_SYNC.

◆ GetType()

const Type * SyncExpr::GetType ( ) const
virtual

Returns the Type of the expression.

Implements Expr.

Definition at line 8043 of file expr.cpp.

References AtomicType::Void.

◆ GetValue()

llvm::Value * SyncExpr::GetValue ( FunctionEmitContext ctx) const
virtual

This is the main method for Expr implementations to implement. It should call methods in the FunctionEmitContext to emit LLVM IR instructions to the current basic block in order to generate an llvm::Value that represents the expression's value.

Implements Expr.

Definition at line 8045 of file expr.cpp.

References FunctionEmitContext::SetDebugPos(), and FunctionEmitContext::SyncInst().

◆ Optimize()

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

◆ Print()

void SyncExpr::Print ( ) const
virtual

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

Implements Expr.

Definition at line 8053 of file expr.cpp.

References SourcePos::Print().

◆ TypeCheck()

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


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