Intel® Implicit SPMD Program Compiler (Intel® ISPC)
1.13.0
|
Public Member Functions | |
VectorMemberExpr (Expr *e, const char *id, SourcePos p, SourcePos idpos, bool derefLValue) | |
llvm::Value * | GetValue (FunctionEmitContext *ctx) const |
llvm::Value * | GetLValue (FunctionEmitContext *ctx) const |
const Type * | GetType () const |
const Type * | GetLValueType () const |
int | getElementNumber () const |
const Type * | getElementType () const |
Public Member Functions inherited from MemberExpr | |
llvm::Value * | GetValue (FunctionEmitContext *ctx) const |
llvm::Value * | GetLValue (FunctionEmitContext *ctx) const |
const Type * | GetType () const |
Symbol * | GetBaseSymbol () const |
void | Print () const |
Expr * | Optimize () |
Expr * | TypeCheck () |
int | EstimateCost () const |
std::string | getCandidateNearMatches () const |
MemberExpr (Expr *expr, const char *identifier, SourcePos pos, SourcePos identifierPos, bool derefLValue, unsigned scid) | |
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 (VectorMemberExpr const *) |
static bool | classof (ASTNode const *N) |
Static Public Member Functions inherited from MemberExpr | |
static MemberExpr * | create (Expr *expr, const char *identifier, SourcePos pos, SourcePos identifierPos, bool derefLvalue) |
static bool | classof (MemberExpr 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 *) |
Private Attributes | |
const VectorType * | exprVectorType |
const VectorType * | memberType |
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 MemberExpr | |
Expr * | expr |
std::string | identifier |
const SourcePos | identifierPos |
bool | dereferenceExpr |
Public Attributes inherited from ASTNode | |
SourcePos | pos |
Protected Attributes inherited from MemberExpr | |
const Type * | type |
const Type * | lvalueType |
VectorMemberExpr::VectorMemberExpr | ( | Expr * | e, |
const char * | id, | ||
SourcePos | p, | ||
SourcePos | idpos, | ||
bool | derefLValue | ||
) |
Definition at line 4646 of file expr.cpp.
References AssertPos, exprVectorType, PointerType::GetBaseType(), VectorType::GetElementType(), Type::GetReferenceTarget(), Expr::GetType(), MemberExpr::identifier, and memberType.
Referenced by MemberExpr::create().
|
inlinestatic |
|
inlinestatic |
Definition at line 4631 of file expr.cpp.
References StructMemberExpr::getElementNumber(), StructMemberExpr::getElementType(), MemberExpr::GetLValue(), StructMemberExpr::GetLValueType(), StructMemberExpr::GetType(), MemberExpr::GetValue(), ASTNode::getValueID(), and ASTNode::VectorMemberExprID.
|
virtual |
Implements MemberExpr.
Definition at line 4802 of file expr.cpp.
References Error(), MemberExpr::identifier, and lIdentifierToVectorElement().
|
virtual |
|
virtual |
For expressions that can provide an lvalue (e.g. array indexing), this function should emit IR that computes the expression's lvalue and returns the corresponding llvm::Value. Expressions that can't provide an lvalue should leave this unimplemented; the default implementation returns NULL.
Reimplemented from Expr.
Definition at line 4689 of file expr.cpp.
References MemberExpr::GetLValue(), and MemberExpr::identifier.
|
virtual |
Returns the type of the value returned by GetLValueType(); this should be a pointer type of some sort (uniform or varying).
Reimplemented from Expr.
Definition at line 4697 of file expr.cpp.
References AssertPos, MemberExpr::dereferenceExpr, Module::errorCount, MemberExpr::expr, PointerType::GetAsFrozenSlice(), Type::GetBaseType(), Expr::GetLValueType(), Type::GetReferenceTarget(), Expr::GetType(), PointerType::GetUniform(), PointerType::GetVarying(), MemberExpr::identifier, Type::IsUniformType(), MemberExpr::lvalueType, and m.
Referenced by GetType().
|
virtual |
Returns the Type of the expression.
Implements Expr.
Definition at line 4663 of file expr.cpp.
References exprVectorType, Type::GetAsUniformType(), Type::GetAsVaryingType(), VectorType::GetElementType(), GetLValueType(), MemberExpr::identifier, Type::IsUniformType(), Type::IsVaryingType(), memberType, and MemberExpr::type.
|
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 4736 of file expr.cpp.
References FunctionEmitContext::AddElementOffset(), FunctionEmitContext::AllocaInst(), AssertPos, MemberExpr::dereferenceExpr, Error(), Module::errorCount, MemberExpr::expr, exprVectorType, VectorType::GetElementType(), FunctionEmitContext::GetFullMask(), Expr::GetLValue(), Expr::GetLValueType(), Type::GetReferenceTarget(), Expr::GetType(), PointerType::GetUniform(), Expr::GetValue(), MemberExpr::GetValue(), PointerType::GetVarying(), MemberExpr::identifier, Type::IsUniformType(), lIdentifierToVectorElement(), LLVMGetName(), FunctionEmitContext::LoadInst(), m, memberType, FunctionEmitContext::SetDebugPos(), and FunctionEmitContext::StoreInst().
|
private |
Definition at line 4642 of file expr.cpp.
Referenced by GetType(), GetValue(), and VectorMemberExpr().
|
private |
Definition at line 4643 of file expr.cpp.
Referenced by getElementType(), GetType(), GetValue(), and VectorMemberExpr().