|
Intel SPMD Program Compiler
1.3.0
|
Statement implementation for parallel 'foreach' loops. More...
#include <stmt.h>


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 |
| Stmt * | TypeCheck () |
| int | EstimateCost () const |
Public Attributes | |
| std::vector< Symbol * > | dimVariables |
| std::vector< Expr * > | startExprs |
| std::vector< Expr * > | endExprs |
| bool | isTiled |
| Stmt * | stmts |
| 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.
| std::vector<Symbol *> ForeachStmt::dimVariables |
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().
| bool ForeachStmt::isTiled |
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().
1.7.5.1