Intel SPMD Program Compiler  1.3.0
Public Member Functions | Public Attributes
ForeachStmt Class Reference

Statement implementation for parallel 'foreach' loops. More...

#include <stmt.h>

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

List of all members.

Public Member Functions

 ForeachStmt (const std::vector< Symbol * > &loopVars, const std::vector< Expr * > &startExprs, const std::vector< Expr * > &endExprs, Stmt *bodyStatements, bool tiled, SourcePos pos)
void EmitCode (FunctionEmitContext *ctx) const
void Print (int indent) const
StmtTypeCheck ()
int EstimateCost () const

Public Attributes

std::vector< Symbol * > dimVariables
std::vector< Expr * > startExprs
std::vector< Expr * > endExprs
bool isTiled
Stmtstmts

Detailed Description

Statement implementation for parallel 'foreach' loops.

Definition at line 242 of file stmt.h.


Constructor & Destructor Documentation

ForeachStmt::ForeachStmt ( const std::vector< Symbol * > &  loopVars,
const std::vector< Expr * > &  startExprs,
const std::vector< Expr * > &  endExprs,
Stmt bodyStatements,
bool  tiled,
SourcePos  pos 
)

Definition at line 1260 of file stmt.cpp.


Member Function Documentation

void ForeachStmt::EmitCode ( FunctionEmitContext ctx) const [virtual]

Emit LLVM IR for the statement, using the FunctionEmitContext to create the necessary instructions.

Implements Stmt.

Definition at line 1371 of file stmt.cpp.

References FunctionEmitContext::AddInstrumentationPoint(), FunctionEmitContext::AllocaInst(), AssertPos, FunctionEmitContext::BinaryOperator(), LLVMTypes::BoolType, FunctionEmitContext::BranchInst(), FunctionEmitContext::CmpInst(), FunctionEmitContext::CreateBasicBlock(), dimVariables, FunctionEmitContext::DisableGatherScatterWarnings(), Stmt::EmitCode(), FunctionEmitContext::EmitVariableDebugInfo(), FunctionEmitContext::EnableGatherScatterWarnings(), endExprs, FunctionEmitContext::EndForeach(), FunctionEmitContext::EndScope(), FunctionEmitContext::FOREACH_REGULAR, g, FunctionEmitContext::GetCurrentBasicBlock(), FunctionEmitContext::GetFunction(), FunctionEmitContext::GetFunctionMask(), FunctionEmitContext::GetInternalMask(), FunctionEmitContext::I1VecToBoolVec(), FunctionEmitContext::InsertInst(), LLVMTypes::Int32Type, LLVMTypes::Int32VectorType, isTiled, lGetSpans(), LLVMFalse, LLVMInt32(), LLVMMaskAllOff, LLVMMaskAllOn, LLVMTrue, FunctionEmitContext::LoadInst(), lUpdateVaryingCounter(), LLVMTypes::MaskType, NULL, FunctionEmitContext::RestoreContinuedLanes(), FunctionEmitContext::SetContinueTarget(), FunctionEmitContext::SetCurrentBasicBlock(), FunctionEmitContext::SetDebugPos(), FunctionEmitContext::SetFunctionMask(), FunctionEmitContext::SetInternalMask(), startExprs, FunctionEmitContext::StartForeach(), FunctionEmitContext::StartScope(), stmts, FunctionEmitContext::StoreInst(), Globals::target, and Target::vectorWidth.

int ForeachStmt::EstimateCost ( ) const

Definition at line 1869 of file stmt.cpp.

References COST_SIMPLE_ARITH_LOGIC_OP, COST_UNIFORM_LOOP, and dimVariables.

void ForeachStmt::Print ( int  indent) const [virtual]

Print a representation of the statement (and any children AST nodes) to standard output. This method is used for debuggins.

Implements Stmt.

Definition at line 1875 of file stmt.cpp.

References dimVariables, endExprs, NULL, Stmt::Print(), startExprs, and stmts.

Stmt * ForeachStmt::TypeCheck ( ) [virtual]

Implements Stmt.

Definition at line 1826 of file stmt.cpp.

References dimVariables, endExprs, Error(), NULL, startExprs, TypeConvertExpr(), and AtomicType::UniformInt32.


Member Data Documentation

Definition at line 255 of file stmt.h.

Referenced by EmitCode(), EstimateCost(), Print(), and TypeCheck().

std::vector<Expr *> ForeachStmt::endExprs

Definition at line 257 of file stmt.h.

Referenced by EmitCode(), Print(), and TypeCheck().

Definition at line 258 of file stmt.h.

Referenced by EmitCode().

std::vector<Expr *> ForeachStmt::startExprs

Definition at line 256 of file stmt.h.

Referenced by EmitCode(), Print(), and TypeCheck().

Definition at line 259 of file stmt.h.

Referenced by EmitCode(), and Print().


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