Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
A list of expressions. More...
#include <expr.h>
Public Member Functions | |
ExprList (SourcePos p) | |
ExprList (Expr *e, SourcePos p) | |
llvm::Value * | GetValue (FunctionEmitContext *ctx) const |
const Type * | GetType () const |
void | Print () const |
std::pair< llvm::Constant *, bool > | GetStorageConstant (const Type *type) const |
std::pair< llvm::Constant *, bool > | GetConstant (const Type *type) const |
ExprList * | Optimize () |
ExprList * | TypeCheck () |
int | EstimateCost () const |
Public Member Functions inherited from Expr | |
Expr (SourcePos p, unsigned scid) | |
virtual llvm::Value * | GetLValue (FunctionEmitContext *ctx) const |
virtual const Type * | GetLValueType () const |
virtual Symbol * | GetBaseSymbol () const |
Public Member Functions inherited from ASTNode | |
ASTNode (SourcePos p, unsigned scid) | |
virtual | ~ASTNode () |
unsigned | getValueID () const |
Static Public Member Functions | |
static bool | classof (ExprList 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 *) |
Public Attributes | |
std::vector< Expr * > | exprs |
Public Attributes inherited from ASTNode | |
SourcePos | pos |
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 } |
A list of expressions.
These are mostly used for representing curly-brace delimited initializers for initializers for complex types and for representing the arguments passed to a function call.
|
inlinestatic |
|
inlinestatic |
Definition at line 255 of file expr.h.
References ASTNode::EstimateCost(), ASTNode::ExprListID, Expr::GetConstant(), Expr::GetStorageConstant(), Expr::GetType(), Expr::GetValue(), ASTNode::getValueID(), Expr::Optimize(), Expr::Print(), and Expr::TypeCheck().
|
virtual |
|
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 and a flag denoting if it's valid for multi-target compilation for use as an initializer of a global variable. Otherwise it should return the llvm::constant value as NULL.
Reimplemented from Expr.
Definition at line 3932 of file expr.cpp.
References lGetExprListConstant().
|
virtual |
If this is a constant expression that can be converted to a constant of storage type of the given type, this method should return the corresponding llvm::Constant value and a flag denoting if it's valid for multi-target compilation for use as an initializer of a global variable. Otherwise it should return the llvm::constant value as NULL.
Reimplemented from Expr.
Definition at line 3929 of file expr.cpp.
References lGetExprListConstant().
|
virtual |
|
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 3767 of file expr.cpp.
References FATAL.
|
virtual |
|
virtual |
Prints the expression to standard output (used for debugging).
Implements Expr.
Definition at line 3938 of file expr.cpp.
References SourcePos::Print().
Referenced by FunctionCallExpr::Print().
|
virtual |
std::vector<Expr *> ExprList::exprs |
Definition at line 266 of file expr.h.
Referenced by PrintStmt::EmitCode(), FullResolveOverloads(), FunctionCallExpr::GetValue(), InitSymbol(), lGetExprListConstant(), BinaryExpr::Optimize(), ArrayType::SizeUnsizedArrays(), FunctionCallExpr::TypeCheck(), and WalkAST().