Intel SPMD Program Compiler  1.9.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Function Class Reference

#include <func.h>

Collaboration diagram for Function:
Collaboration graph
[legend]

Public Member Functions

 Function (Symbol *sym, Stmt *code)
 
const TypeGetReturnType () const
 
const FunctionTypeGetType () const
 
void GenerateIR ()
 

Private Member Functions

void emitCode (FunctionEmitContext *ctx, llvm::Function *function, SourcePos firstStmtPos)
 

Private Attributes

Symbolsym
 
std::vector< Symbol * > args
 
Stmtcode
 
SymbolmaskSymbol
 
SymbolthreadIndexSym
 
SymbolthreadCountSym
 
SymboltaskIndexSym
 
SymboltaskCountSym
 
SymboltaskIndexSym0
 
SymboltaskCountSym0
 
SymboltaskIndexSym1
 
SymboltaskCountSym1
 
SymboltaskIndexSym2
 
SymboltaskCountSym2
 

Detailed Description

Definition at line 44 of file func.h.

Constructor & Destructor Documentation

Function::Function ( Symbol sym,
Stmt code 
)

Member Function Documentation

void Function::emitCode ( FunctionEmitContext ctx,
llvm::Function *  function,
SourcePos  firstStmtPos 
)
private

Given the statements implementing a function, emit the code that implements the function. Most of the work do be done here just involves wiring up the function parameter values to be available in the function body code.

Definition at line 241 of file func.cpp.

References FunctionEmitContext::AddElementOffset(), FunctionEmitContext::AddInstrumentationPoint(), FunctionEmitContext::All(), FunctionEmitContext::AllocaInst(), args, Assert, FunctionEmitContext::BranchInst(), CHECK_MASK_AT_FUNCTION_START_COST, code, FunctionEmitContext::CreateBasicBlock(), Globals::ctx, Debug(), Opt::disableCoherentControlFlow, Opt::disableMaskAllOnOptimizations, Stmt::EmitCode(), FunctionEmitContext::EmitFunctionParameterDebugInfo(), FunctionEmitContext::EmitVariableDebugInfo(), EstimateCost(), g, FunctionEmitContext::GetCurrentBasicBlock(), FunctionEmitContext::GetFullMaskPointer(), FunctionEmitContext::GetFunctionMask(), Target::getISA(), Target::getMaskingIsFree(), FunctionType::GetReturnType(), FunctionType::GetString(), FunctionEmitContext::InitializeLabelMap(), LLVMTypes::Int32Type, FunctionType::isExported, FunctionType::isTask, FunctionType::isUnmasked, Type::IsVoidType(), lCopyInTaskParameter(), LLVMInt32(), LLVMMaskAllOn, FunctionEmitContext::LoadInst(), m, maskSymbol, LLVMTypes::MaskType, Module::module, Symbol::name, Globals::NoOmitFramePointer, Globals::opt, Symbol::pos, ASTNode::pos, FunctionEmitContext::ReturnInst(), FunctionEmitContext::SetCurrentBasicBlock(), FunctionEmitContext::SetDebugPos(), FunctionEmitContext::SetFunctionMask(), Symbol::storagePtr, FunctionEmitContext::StoreInst(), sym, Globals::target, taskCountSym, taskCountSym0, taskCountSym1, taskCountSym2, taskIndexSym, taskIndexSym0, taskIndexSym1, taskIndexSym2, threadCountSym, threadIndexSym, Symbol::type, and Warning().

Referenced by GenerateIR().

void Function::GenerateIR ( )
const Type * Function::GetReturnType ( ) const
const FunctionType * Function::GetType ( ) const

Definition at line 188 of file func.cpp.

References Assert, sym, and Symbol::type.

Member Data Documentation

std::vector<Symbol *> Function::args
private

Definition at line 59 of file func.h.

Referenced by emitCode(), and Function().

Stmt* Function::code
private

Definition at line 60 of file func.h.

Referenced by emitCode(), Function(), and GenerateIR().

Symbol* Function::maskSymbol
private

Definition at line 61 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::sym
private

Definition at line 58 of file func.h.

Referenced by emitCode(), Function(), GenerateIR(), GetReturnType(), and GetType().

Symbol * Function::taskCountSym
private

Definition at line 63 of file func.h.

Referenced by emitCode(), and Function().

Symbol * Function::taskCountSym0
private

Definition at line 64 of file func.h.

Referenced by emitCode(), and Function().

Symbol * Function::taskCountSym1
private

Definition at line 65 of file func.h.

Referenced by emitCode(), and Function().

Symbol * Function::taskCountSym2
private

Definition at line 66 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::taskIndexSym
private

Definition at line 63 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::taskIndexSym0
private

Definition at line 64 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::taskIndexSym1
private

Definition at line 65 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::taskIndexSym2
private

Definition at line 66 of file func.h.

Referenced by emitCode(), and Function().

Symbol * Function::threadCountSym
private

Definition at line 62 of file func.h.

Referenced by emitCode(), and Function().

Symbol* Function::threadIndexSym
private

Definition at line 62 of file func.h.

Referenced by emitCode(), and Function().


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